开发者

In Flex/AIR, how can I keep a loaded SWFs stage property localized to that swf?

Does anyone know of a workaround for loading an AS3 swf into an existing AIR/Flex (Flex 3) application and having the loaded SWF retain its own reference to its stage (not the loader's stage)?

I've tried the loadForCompatibility property on SWFLoader, but that isn't giving me the behavior I'm wanting. The loaded swf still开发者_C百科 has the main AIR app's stage set.

Anyone know of any workarounds or some property I'm missing?


Perhaps you are looking for the DisplayObject 'root' property and not the 'stage' property. According to the docs the root property is the top-most display object in the portion of the display list's tree structure represented by that SWF file. So it will always be relative to the loaded file not the parent application.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜