Hi!
I have like a 100 names in a database table, I want to get
them with a LoadVars in actionscript.
I wonder if there is a way of writing instead of this:
something mor like this:
I wonder what I can write instead of ???? so I don't need to write
a 100 lines of code.
Thx
I have like a 100 names in a database table, I want to get
them with a LoadVars in actionscript.
I wonder if there is a way of writing instead of this:
Code:
myData = new LoadVars();
myData.onLoad = function() {
textfield1.text = myData.name1;
textfield2.text = myData.name2;
textfield3.text = myData.name3;
...
textfield100.text = myData.name100;
};
Code:
myData = new LoadVars();
myData.onLoad = function() {
for( i = 1; i < 101; i++){
this["textfield"+i].text = myData.????;
}
};
a 100 lines of code.
Thx
Comment