2 things:
- your for loop is erroneous... your "dt" variable isn't used as
expected (increment it in the for statement) and your "i" variable is
unused and shouldn't be here ;-).
- you should prefix all your textfields with _root as they are created
on _root level.
Change your code as below, and you'll see plenty of textfields :)
for (var dt:Number = 0; dt <= 70; dt++) {
dtd = "var"+dt;
trace (dtd);
trace (dt);
_root.createTextField (dtd, dt, 50+dt, 50+dt, 200, 100);
_root[dtd].text="dr";
_root[dtd].border = true;
_root[dtd].background = true;
}
CARABUS plus a écrit :
Hello,
I create dynamic textfield with functions and I try to field them without
success, Have you got an idea ?
Thank you
var dt:Number = 0;
var dtd;
for (var dt:Number = 0; dt <= 70; i++) {
dtd = "var"+dt;
trace (dtd);
trace (dt);
_root.createTextField (dtd, dt, 50+dt, 50+dt, 200, 100);
dtd.text="dr";
dtd.border = true;
dtd.background = true;
dt += 1;
}
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders