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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I load a text file into a List Box

Status
Not open for further replies.

rick1111

Programmer
Nov 25, 2001
16
US
I am using MX and want to load a list of names from a text file into a List box. I now have the names hardcoded in my Action Script with the "list.addItem()".

Any help you can give would be appreciated.

Rick
 
Well, to load the text in as a number of variables, create a text file using the following format:

var1=var1text
&var2=place variable 2 text here
&thirdvariable=this is the third variable

or like this:
var1=var1text&var2=variable 2 text here&thirdvariable=3rd variable&var4=this is fun


then, load the texfile into the flash movie, creating/updating the variables. To load the text file use the following script:

loadVariablesNum("filename.txt", 0);

the zero afterward is the target level to load the variables into.


Hope This Helps!
Lumstar

______________________________________
Keep On Coding!!
If my post helped you, please give me a star.
If your post helps me, I'll give you one!
scifi-alien-with-red-boots-DW.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top