Hi, I have a problem with the property createTextField.
What I need to do is to read a range of txt files into flash. The exact amount of txt files can be different so I have to work with the 'createTextField' property.
For testing, I tried it with 13 textfiles, so I created 13 textFields in a do while loop. When I want to display some text in the textFields, only the last textfield (so textfield number13) displays the text... I seems like flash only knows the textField I created at last.
Anyone got an idea why Flash only recognizes my last textField and not the others?
Here is my code:
// start of code
var i=0;
var strY=0;
do {
i = i + 1;
strText = "test" + i + ".txt";
loadVariables(strText, ""
strInstance = "test" + i;
strY = strY + 50;
_root.createTextField(strInstance,0,50,strY,200,50);
} while ( i < 13 )
test1.text = "text1";
test2.text = "text2";
test3.text = "text3";
test4.text = "text4";
test5.text = "text5";
test6.text = "text6";
test7.text = "text7";
test8.text = "text8";
test9.text = "text9";
test10.text = "text10";
test11.text = "text11";
test12.text = "text12";
test13.text = "text13"; // Flash only displays this one
// end of code
Hopefully someone can help me!
What I need to do is to read a range of txt files into flash. The exact amount of txt files can be different so I have to work with the 'createTextField' property.
For testing, I tried it with 13 textfiles, so I created 13 textFields in a do while loop. When I want to display some text in the textFields, only the last textfield (so textfield number13) displays the text... I seems like flash only knows the textField I created at last.
Anyone got an idea why Flash only recognizes my last textField and not the others?
Here is my code:
// start of code
var i=0;
var strY=0;
do {
i = i + 1;
strText = "test" + i + ".txt";
loadVariables(strText, ""
strInstance = "test" + i;
strY = strY + 50;
_root.createTextField(strInstance,0,50,strY,200,50);
} while ( i < 13 )
test1.text = "text1";
test2.text = "text2";
test3.text = "text3";
test4.text = "text4";
test5.text = "text5";
test6.text = "text6";
test7.text = "text7";
test8.text = "text8";
test9.text = "text9";
test10.text = "text10";
test11.text = "text11";
test12.text = "text12";
test13.text = "text13"; // Flash only displays this one
// end of code
Hopefully someone can help me!