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!

Sorry but... how do you load a txt file into a dynamic text box 1

Status
Not open for further replies.

chinoka

Programmer
Jun 13, 2002
7
AR
Sorry but... how do you load a txt file into a dynamic text box. I know that every body knows that... i don't, so please help me
 
Put this in your flash movie:

loadVariables ("file.txt");
// txtBx is name of dynamic text field
txtBx = txtVar;

Put this in your text file:

txtVar=Hello Regards
David Byng
spider.gif

davidbyng@hotmail.com
 
Thnx!!! but you just missed two thing!! (or at least, in FLASH MX i have to do it this way)

1)it's txtBx.TEXT = txtvar; !!!!
2)it's loadvariables ("file.txt","") becuase flash mx sais that loadvariables needs the target or the level to be set.

Thanks again!!
 
Sorry to jump in but this finally answered my question also.
If I may ask a question.
Once I have the file open is there a way to read a certain
line and position in that line of text?
 
Yes, as you can see, when you load the txt you specify the variable as txtvar=
After the "=" the text is assigned. If you enter another varaible as txtvar2 you can assign an specific line to that var and load it into a dynamic text... it should work....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top