hehehe, very that's easy.
though i'd suggest to create one movieclip with a text field in it, and export it for actionscript; this way you can attach it how many times you want and also set it's default attributes (font, font size, font color) and embed it as well.
anyway, about your problem:
for ( i = 0; i < 10; i++ )
{
this.createTextField("textbox"+i, i, -120, -40.0+(i*10), 240, 80);
this["textbox"+i].selectable = false;
this["textbox"+i].text = "label";
trace ( " text " + i + ": " + this["textbox"+i].text );
}
- for ( i = 0; i < 10; i++ )
- {
- this.createTextField("textbox"+i, i, -120, -40.0+(i*10), 240, 80);
- this["textbox"+i].selectable = false;
- this["textbox"+i].text = "label";
- trace ( " text " + i + ": " + this["textbox"+i].text );
- }
with attaching movies would be like this: Place a text field on the stage, name it's instance to txt. Select it and press F8 to make it a movieclip, name it textbox. Then delete it from the stage and go to the library, right click on it -> linkage export for actionscript.
this.createEmptyMovieClip("mcTexts", this.getNextHighestDepth());
var crtMC:MovieClip;
for ( i = 0; i < 10; i++ )
{
crtMC = mcTexts.attachMovie("textbox", "textbox"+i, i);
crtMC._x = -120;
crtMC._y = -40.0+(i*10);
crtMC.txt.selectable = false;
crtMC.txt.text = "label";
trace ( " text " + i + ": " + crtMC.txt.text );
}
- this.createEmptyMovieClip("mcTexts", this.getNextHighestDepth());
- var crtMC:MovieClip;
- for ( i = 0; i < 10; i++ )
- {
- crtMC = mcTexts.attachMovie("textbox", "textbox"+i, i);
- crtMC._x = -120;
- crtMC._y = -40.0+(i*10);
- crtMC.txt.selectable = false;
- crtMC.txt.text = "label";
- trace ( " text " + i + ": " + crtMC.txt.text );
- }
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”