开发者

AS3 ScrollPane dispatch event to content

开发者 https://www.devze.com 2023-01-11 15:57 出处:网络
i\'ve loaded external swf into ScrollPane and i need to dispatch click event to this external swf. is it possible? ScrollPane.content.dispatchEvent(new MouseEvent(MouseEvent.CLICK,true)); doesn\'t wor

i've loaded external swf into ScrollPane and i need to dispatch click event to this external swf. is it possible? ScrollPane.content.dispatchEvent(new MouseEvent(MouseEvent.CLICK,true)); doesn't work. this is obvious cuz ScrollPane.content is an DisplayObject and it have not CLICK event...

I can't use MovieClip as container for external swf cuz external swf is a documents converted to swfs using openoff开发者_如何学运维ice and it doesn't want to load inside MovieClip but perfectly loads inside ScrollPane and react on mouse clicks,but i need to simulate mouse click on it.


so you're saying that the following won't work or you haven't tried it?

var exSWF:MovieClip = MovieClip( ScrollPane.content );

or

var exSWF:Sprite = Sprite( ScrollPane.content );

Not sure to understand what you mean when you say that your external SWF won't load into a MovieClip.

Do you know what version of Actionscript was used for the external SWF, you can check that in debug mode by looking at the properties of the ScrollPane.content?

0

精彩评论

暂无评论...
验证码 换一张
取 消