Copy link to clipboard
Copied
Flash is throwing errors when I try it. "Scene 1, Layer 'Layer 3', Frame 1, Line 177 1061: Call to a possibly undefined method addChild through a reference with static type flash.display:DisplayObject."
How could I do this without knowing the name of the child, only the number?
Thsi is what I tried: myMC.getChildAt(3).addChild(imgLoader);
cast that child as a displayobjectcontainer:
DisplayObjectContainer(myMC.getChildAt(3)).addChild(imgLoader);
Copy link to clipboard
Copied
cast that child as a displayobjectcontainer:
DisplayObjectContainer(myMC.getChildAt(3)).addChild(imgLoader);