Dunno why I copy pasted 2 times!

The only changes were in the three lines where I replaced dtd with
_root[dtd]

You could use _root. dtd as well.

Of course you will have to optimize the code.


var dtd;
var spa;
var spa1;
var _txt:TextField;
var dt = 0;
while (dt<=99) {
   dtd = "var"+dt;
   spa = dt*5;
   spa1 = (dt*15)+45;
   _root.createTextField(dtd, dt, 0, spa1, 100, 15);
   _txt = _root[dtd];
   _txt.text=spa1;
   _txt.border=true;
   _txt.selectable=false;
   dt++;
}

Reason why it didnt work in your case - when you said "dtd.text" you were
actually trying to access a text property of the string dtd. And it silently
failed ( coz dtd was not strictly typed)

You would've caught these kinda issues if you had used strict data typing :)

~Arul Prasad.




On 3/21/06, Arul Prasad <[EMAIL PROTECTED]> wrote:
>
> var dtd;
> var spa;
> var spa1;
> var dt = 0;
> while (dt<=99) {
>    dtd = "var"+dt;
>    spa = dt*5;
>    spa1 = (dt*15)+45;
>    _root.createTextField(dtd, dt, 0, spa1, 100, 15);
>    _root[dtd].text=spa1;
>    _root[dtd].border=true;
>    _root[dtd].selectable=false;
>    dt++;
> }
>
> note: var dtd;
>
> var spa;
> var spa1;
> var dt = 0;
> while (dt<=99) {
>    dtd = "var"+dt;
>    spa = dt*5;
>    spa1 = (dt*15)+45;
>    _root.createTextField(dtd, dt, 0, spa1, 100, 15);
>    _root[dtd].text=spa1;
>    _root[dtd].border=true;
>    _root[dtd].selectable=false;
>    dt++;
> }
>
> ~Arul Prasad
>
>
>
> On 3/21/06, Laurent CUCHET <[EMAIL PROTECTED]> wrote:
> >
> > Good morning,
> >
> > 1) I  create dynamic textfield with while option
> >     I try to create dynamic border and content without success
> >
> > Have you got a tips to done it
> >
> > Thank you
> >
> > /////////////////////////////
> > var dtd;
> > var spa;
> > var spa1;
> > var dt = 0;
> > while (dt<=99) {
> >     dtd = "var"+dt;
> >     spa = dt*5;
> >     spa1 = (dt*15)+45;
> >     _root.createTextField(dtd, dt, 0, spa1, 100, 15);
> >     dtd.text=spa1 ;
> >     dtd.border=true;
> >     dtd.selectable=false;
> >     dt++;
> > }
> >
> >
> >
> > _______________________________________________
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
>
>
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to