# Loading External Text Files into Flash MX

**URL:** https://forum.kirupa.com/t/loading-external-text-files-into-flash-mx/26694
**Category:** flash
**Created:** [July 25, 2003, 11:14am UTC](https://forum.kirupa.com/t/loading-external-text-files-into-flash-mx/26694 "2003-07-25T11:14:02Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![andyBateman](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@andyBateman](https://forum.kirupa.com/u/andyBateman)
#### Post date: [July 25, 2003, 11:14am UTC](https://forum.kirupa.com/t/loading-external-text-files-into-flash-mx/26694/1 "2003-07-25T11:14:02Z")

</div>

Hi Guy’s and Gall’s

I have a couple problems, i imagine probably easily fixed, but over my head 🙂

Number 1…

My flash movie loads an external text file on loading, then display’s it in another scene in a scrolling box.  
The problem is all the line breaks, it seems to add 2 for every 1, is that to do with the text file? or have i missed something in flash? can i remove them with action script?

Number 2…

The Flash movie doesn’t reload the text file every time you oven the page, it seems to open a ‘cached’ version, can i do anything about this?

[www.bexinoz.com](http://www.bexinoz.com)

Thanks in anticipation of any help you guys can give me!

Andy

---

<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: [July 25, 2003, 11:29am UTC](https://forum.kirupa.com/t/loading-external-text-files-into-flash-mx/26694/2 "2003-07-25T11:29:44Z")

</div>

for the second problem, this should help you

[http://www.kirupaforum.com/forums/showthread.php?threadid=27234&highlight=cache+text](http://www.kirupaforum.com/forums/showthread.php?threadid=27234&highlight=cache+text)

for the carriage return, i know there’s a fix, and has been discussed before here on the forums, but i can’t seem to find the thread ☹

---

<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: [July 25, 2003, 11:29am UTC](https://forum.kirupa.com/t/loading-external-text-files-into-flash-mx/26694/3 "2003-07-25T11:29:47Z")

</div>

1. Take a look at this thread, I posted a sample fla that uses a undocumented feature called condenseWhite. It will remove the extra line spaces.

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=10394&highlight=condensewhite](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=10394&highlight=condensewhite)

1. Read this, it will show you how to prevent caching.

[http://www.macromedia.com/support/flash/ts/documents/prevent\_caching.htm](http://www.macromedia.com/support/flash/ts/documents/prevent_caching.htm)

---

<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: [July 25, 2003, 11:33am UTC](https://forum.kirupa.com/t/loading-external-text-files-into-flash-mx/26694/4 "2003-07-25T11:33:18Z")

</div>

here

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=10394](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=10394)

[edit]

oops, that’s the link i was looking for 😛

---

<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: [July 25, 2003, 1:25pm UTC](https://forum.kirupa.com/t/loading-external-text-files-into-flash-mx/26694/5 "2003-07-25T13:25:41Z")

</div>

You could also use this little function to remove them… 😉  
[AS]String.prototype.removeCR = function() {  
var t = [], s = escape(this), r = “”, i;  
t = s.split("%0D");  
for (i=0; i\<t.length; i++) r += t\*;  
return unescape®;  
};[/AS]
