Load .txt file with this code added?

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

http://www.kirupa.com/developer/mx/externaldata.htm

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