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.
精彩评论