Copy link to clipboard
Copied
hello there guys..,
i need help in understanding external swf parent,let me describe it a little more about what i mean:
"is it by default when we load and external swf and eventhought we add it as a child of container (an instance of sprite class which we create and then add it to the stage) that the parent of that loaded swf is stage??? "
i do ask this question because i tried to load an external swf and then add it to the container but when i trace it the loaded swf does not count as the child of the container but the stage (i do this by tracing the stage.numChildren and container.numChildren)
thanks for your time and your help..,
i do appreciate any help greatly..,
if you load a swf (using the loader class), the swf is a child of the loader and the swf's parent is the loader.
if you add the loader to the displaylist, then the loaded swf's parent.parent is a displaylist object.
Copy link to clipboard
Copied
if you load a swf (using the loader class), the swf is a child of the loader and the swf's parent is the loader.
if you add the loader to the displaylist, then the loaded swf's parent.parent is a displaylist object.
Copy link to clipboard
Copied
i'm sorry i don't really get it but is right if i coclude it like this: "basically the loaded swf will become child of where ever i add it as child"
Copy link to clipboard
Copied
as long as the loaded swf is an as3 swf, you can reparent the loader's content property, AFTER loading is complete.
Copy link to clipboard
Copied
ok thanks kglad..,
with this i shall look into my code again..,
Copy link to clipboard
Copied
you're welcome.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more