Using external text files in a flash

I am fairly new to Flash 5, I have been using Swish for about 1.5 years. I want to advance to a new level though. I have asked this question at others boards, and haven’t yet got a detailed enough answer for me to understand it and work it. Either that, or I am making just a tiny error. If anyone could explain in detail how to show a .txt file inside a flash OR give me a link to a detailed tutorial then that would be great.

1/make your text file (“myvars.txt”), separate each variable by & (like var1=this&var2=that…), no spaces. Save next to the swf.\r2/flash: make one (or more) dynamic text field(s) and name them the same as the variables in your textfile (var1, var2…)\r3/in first keyframe, add action loadVariables (“myvars.txt”)\r\rimprovements: move dynamic textfields on frame 2, add “stop” on frame 1, add “onClipEvent(data){gotoAndStop(2)}” after the loadVariables…this is not cut’n’paste script, check the exact syntax in flash…

just so your text files are less confusing you can also do this:\rsVar1=make sure you put&\r&sVar2=amphersands at the&\r&sVar3=beginning and end of&\r&sVar4=each line - except&\r&sVar5=the first and last lines\r\r:) \rjeremy

Ok thx guys. I’ll try that. What if I only want to add ONE variable in the news.txt file I am making. I am doing this so I can update my news easily. Also I want to include html in the .txt file. Is this still done the same way as you described above?

Yes. Just need to check the “html” checkbox for your dynamic text field in Flash

i have my news set up the same way, except with 2 variables…one is the news, and one is a flag that flash uses to make sure the text loaded.\rhere’s the url: jeremydecker.s5.com/news.txt\r:) \rjeremy