Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

createTextField problem

Status
Not open for further replies.

QTip

Programmer
Mar 7, 2001
66
BE
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 = &quot;text1&quot;;
test2.text = &quot;text2&quot;;
test3.text = &quot;text3&quot;;
test4.text = &quot;text4&quot;;
test5.text = &quot;text5&quot;;
test6.text = &quot;text6&quot;;
test7.text = &quot;text7&quot;;
test8.text = &quot;text8&quot;;
test9.text = &quot;text9&quot;;
test10.text = &quot;text10&quot;;
test11.text = &quot;text11&quot;;
test12.text = &quot;text12&quot;;
test13.text = &quot;text13&quot;; // Flash only displays this one

// end of code

Hopefully someone can help me!
 
ok, I know what my problem was... I didn't use the deepth property!! ... now it works!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top