AS3 - how to refer to a dynamically added child swf
Posted on 2008-10-21
This has got to be so easy but I can't figure it out. In AS2, if you wanted to add a child swf to a parent, you'd create an empty movieclip and then load the swf into the movieclip. Then if you wanted to refer to the swf, you'd refer to the movieclip. For example,
this.childMovie._x = 20;
OK, so I'm working on an AS3 project now and I've loaded a child swf with the loader and I'm displaying it with addChild. Everything's great, except now I want to add some children to the child swf and I don't know what to call it! Is it's name the loader name? Is it stored there, sorta so that to refer to it, I'd say
I'm just not sure and I'm getting some errors so I don't know if that means that I'm doing it wrong or if I just have an error somewhere else that I need to fix.