# Using external text files in a flash

**URL:** https://forum.kirupa.com/t/using-external-text-files-in-a-flash/2888
**Category:** Uncategorized
**Created:** [March 16, 2002, 10:41pm UTC](https://forum.kirupa.com/t/using-external-text-files-in-a-flash/2888 "2002-03-16T22:41:13Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 16, 2002, 10:41pm UTC](https://forum.kirupa.com/t/using-external-text-files-in-a-flash/2888/1 "2002-03-16T22:41:13Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 17, 2002, 1:58pm UTC](https://forum.kirupa.com/t/using-external-text-files-in-a-flash/2888/2 "2002-03-17T13:58:50Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 17, 2002, 2:11pm UTC](https://forum.kirupa.com/t/using-external-text-files-in-a-flash/2888/3 "2002-03-17T14:11:12Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 17, 2002, 3:39pm UTC](https://forum.kirupa.com/t/using-external-text-files-in-a-flash/2888/4 "2002-03-17T15:39:10Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 17, 2002, 5:27pm UTC](https://forum.kirupa.com/t/using-external-text-files-in-a-flash/2888/5 "2002-03-17T17:27:55Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 17, 2002, 6:40pm UTC](https://forum.kirupa.com/t/using-external-text-files-in-a-flash/2888/6 "2002-03-17T18:40:52Z")

</div>

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](http://jeremydecker.s5.com/news.txt)\r:) \rjeremy
