开发者

loaded SWF (using Loader) event listeners sometimes fails

开发者 https://www.devze.com 2023-03-11 05:51 出处:网络
i made a SWF which contains a loader which loads any SWF file passed to it... the problem I\'m encountering is that for some SWFs, some event listeners doesn\'t fire anymore... my own SWF file (which

i made a SWF which contains a loader which loads any SWF file passed to it... the problem I'm encountering is that for some SWFs, some event listeners doesn't fire anymore... my own SWF file (which contains the loader) doesn't really have any other element except for the Loader object and so I cannot understand what seems to be preventing the loa开发者_运维知识库ded SWF (loaded by my Loader) from receiving some mouse events

Got some more details about my problem... it seems that the for the SWF where I'm having this problem, the listener seems to be tied up to a location in the stage or somewhere else, and so whenever I resize, the listeners is not responding on the right place, for example, the button appears on a certain position but the listener's hit test or whatever the SWF is using to detect the mouse click is positioned somewhere else


I've encounter such problem as well. It's not the listeners that changed their location, it's the Mouse orientation that changed.

Did you made any scale modifications? This what caused the problem for me.

You can try and fix it by changing the stage.scaleMode to:

stage.scaleMode = StageScaleMode.NO_SCALE;

Solved that problem for me.

Note you can also set the stage.align.

0

精彩评论

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

关注公众号