I know you can do this in as3 pretty easily, but is there a way to get a list of all the children in a moviclip in as2?
Printable View
I know you can do this in as3 pretty easily, but is there a way to get a list of all the children in a moviclip in as2?
yep, suppose your movieclip has an instance name mc, then the following will do the trick:
Code:getAllBabies(mc);
function getAllBabies(movie:MovieClip):Void {
for (var i:String in movie) {
if (movie[i] instanceof MovieClip) {
trace(movie[i]);
getAllBabies(movie[i]);
}
}
}
cute. Thanks. I love getting all the babies.
lol your welcome