Dynamic text

How do you go about making a dynamic text box in Flash load text from an external source like a .txt file?

make a textbox. Change the variable name whatever you like (for example “textbox” :slight_smile: )
Then You put an action on a frame or a movieclip… or whatever

loadVariables("textfile.txt",0);

where “textfile.txt” is the textfile you are trying to get the text from…
If you put it on a frame then it should be as it is but if you prefer a movieclip then make it

onClipEvent(load) {
loadVariables("textfile.txt",0);
}

And in the textfile you put “textbox=” in front of your text (“textbox” is the textbox’s variable name). So it should be
textbox=bla bla bla

May I also suggest to put “?var=num” in the loadVariables action
like this:

loadVariables("textfile.txt**?var=num**",0);

where “var” is a variable (change it to whatever you like) and
num is a number " (change it to whatever you like)
And when you update your text file then you have to change the number or the variable as well. Otherwize the people who visit the site won’t see the updated information.
note: if you put “?var=num” in there it won’t work on you computer. It brings up an error message but if you upload it to the net everything works fine.
I hope you got it all right.
For more information about loadVariables and Loadmovie
visit the link:
http://www.kirupaforum.com/showthread.php?s=&threadid=27

Thanks so much!