ice78991
Programmer
- Nov 20, 2006
- 216
I am using actionscript to generate a set of links at the top of my page. I am creating a movie clip which contains a textfield for the label.
I am using the following code but cannot create the textfield
trace(mc) shows the clip but trace(this["link"+i+"_txt"]); returns undefined.
for(var i:Number = 0; i< 3; i++)
{
var mc:MovieClip = createEmptyMovieClip("link"+i+"_mc",i);
mc.createTextField("link"+i+"_txt",1,0,0);
trace(mc);
trace(this["link"+i+"_txt"]);
trace(mc["link"+i+"_txt"]);
}
I am using the following code but cannot create the textfield
trace(mc) shows the clip but trace(this["link"+i+"_txt"]); returns undefined.
for(var i:Number = 0; i< 3; i++)
{
var mc:MovieClip = createEmptyMovieClip("link"+i+"_mc",i);
mc.createTextField("link"+i+"_txt",1,0,0);
trace(mc);
trace(this["link"+i+"_txt"]);
trace(mc["link"+i+"_txt"]);
}