you have to use the .text propertie
mc.txt.text = _root["winner"+i+"PercentPayout"];
--Pedro Taranto
Johan Nyberg escreveu:
I tried to get help here a couple of days ago, but alas to no avail.
Please give me a hand with this if you can:
How do I 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.
_______________________________________________
[email protected]
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