How to createEmptyMovieClips

I haven’t been able to figure out to how do what createEmptyMovieClip does in AS 2.0 in AS 3.0. The documentation says to use the new operator, but it doesn’t have the same ability to create new names on the fly. Has anyone come up with a class or code that accomplishes dynamic naming?

var myMC:MovieClip = new MovieClip();

And if you wanna create a bunch:

var mc:MovieClip;
for(var i:int = 0; i < 3; i++) {
     mc = new MovieClip();
     mc.name = "myMC" + i;
}

And to access them:

getChildByName("myMC" + i);

But I would reccomend just storing them all in an array.

thanks alot, you helped me out of a jam - big time.

No prob :hoser: