Anyone know how to make a connection between a TextField and an array with the variable property when creating TextFields dynamically?

Now I'm doing a work around where I create a variables on the fly, fill it with values from the array (winnerPercentPayout), and then connect the variable with the TextField.

for(var i:Number=0; i<=100; i++){
mc = settings_mc.winner_mc.container_mc.attachMovie("txt30DynDark","col0_"+i+"_mc",100+i);
   _root["winner"+i+"PercentPayout"] = winnerPercentPayout[i];
   mc.txt.variable = "_root.winner"+i+"PercentPayout";
}

mc.txt is the instance name of the textfield. What I would like to do is to connect the TextFields with the array directly, like this (which doesn't work):

for(var i:Number=0; i<=100; i++){
mc = settings_mc.winner_mc.container_mc.attachMovie("txt30DynDark","col0_"+i+"_mc",100+i);
   _root["winner"+i+"PercentPayout"] = "_root.winnerPercentPayout["+i+"]";
}

Grateful for help with this.

--
Johan Nyberg

Web Guide Partner
Sergels Torg 12, 8 tr
111 57 Stockholm 070 - 407 83 00

_______________________________________________
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