# Load .txt file with this code added?

**URL:** https://forum.kirupa.com/t/load-txt-file-with-this-code-added/66057
**Category:** Uncategorized
**Created:** [October 2, 2004, 12:12am UTC](https://forum.kirupa.com/t/load-txt-file-with-this-code-added/66057 "2004-10-02T00:12:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![bamski](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@bamski](https://forum.kirupa.com/u/bamski)
#### Post date: [October 2, 2004, 12:12am UTC](https://forum.kirupa.com/t/load-txt-file-with-this-code-added/66057/1 "2004-10-02T00:12:13Z")

</div>

## Question:

I was curious if I could make Flash grab the text to use with the code from an external text file rather than from within the AS provided. I found this script on the Kirupa forums somewhere.

## Here is the code:

//position of text box  
x=50  
y=70  
//MAIN TEXT BOX  
content = “Some filler text for the text box. Some filler text for the text box.Some filler text for the text box.Some filler text for the text box.”;

createTextField(“display\_tf”, 1, x, y, 240, 300);  
display\_tf.wordWrap = true;

from = content.length;

setInterval(spill, 0001);

function spill() {  
if (from\>0) {  
from -= 5;  
to = content.length;  
display\_tf.text = content.substring(from, to);

```
} 

```

}

Thanks in advance to anyone who attempts this !!

From,

bamski

---

<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: [October 2, 2004, 12:19am UTC](https://forum.kirupa.com/t/load-txt-file-with-this-code-added/66057/2 "2004-10-02T00:19:33Z")

</div>

[http://www.kirupa.com/developer/mx/externaldata.htm](http://www.kirupa.com/developer/mx/externaldata.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: [October 2, 2004, 12:40am UTC](https://forum.kirupa.com/t/load-txt-file-with-this-code-added/66057/3 "2004-10-02T00:40:14Z")

</div>

Thanks Digital,

```
Couldn't get it to quite work like that though. I am able to load text files dynamically no problem, but when I try and get them to work with that code it becomes a major problem.

```

From,

bamski
