macromedia.flash
[Top] [All Lists]

Re: Quick newbie question on dynamically named variables

Subject: Re: Quick newbie question on dynamically named variables
From: "rritchey" <webforumsuser@xxxxxxxxxxxxxx>
Date: Sat, 30 Aug 2008 11:51:11 +0000 (UTC)
Newsgroups: macromedia.flash

my apologies, I missed the AS3 in your original question.

 The point remains the same, though the syntax differs slightly.

 for(var i:uint = 0 ; i < 10 ; i++){

 var mc:MovieClip = new myClassFromLibrary();
 mc.name = "myMovie"+i;

 root.clipContainer_mc.addChild(mc);

 }

 Then later, you can get that instance again:

 root.clipContainer_mc.getChildByName("myMovie"+i);


<Prev in Thread] Current Thread [Next in Thread>