Typewriter Effect From A Text File

Typewriter Effect From A Text File is ther any on ho knows??

/M

this is off the top of my head but it should work.It works from a string NOT a text file but that should be easy enough to change. Just copy and paste this on the first keyframe of a new flash FLA.
then test movie.
//***********************************
var test:String = “hello this is a typing test.”;
var testTwo = test.split("");
for (var i = 0; i<testTwo.length; i++) {
this.createEmptyMovieClip(“text”+i, this.getNextHighestDepth());
_root[“text”+i].createTextField(“txt”, 1, 5, 5, 20, 20);
_root[“text”+i].txt.text = testTwo*;
_root[“text”+i]._x = _root[“text”+i]._x+10*i;
_root[“text”+i]._visible = false;
}
var x = setInterval(fade, 200);
cnt = 0;
function fade() {
_root[“text”+cnt]._visible = true;
cnt++;
}

//***********************************
hope this helps

revision
oops… did not have flash running when I submitted first response.

//***********************************
var test:String = “hello this is a typing test.”;
var testTwo = test.split(“”);
for (var i = 0; i<testTwo.length; i++) {
this.createEmptyMovieClip(“text”+i, this.getNextHighestDepth());
_root[“text”+i].createTextField(“txt”, 1, 5, 5, 20, 20);
_root[“text”+i].txt.text = testTwo*;
_root[“text”+i]._x = _root[“text”+i]._x+10*i;
_root[“text”+i]._visible = false;
}
var x = setInterval(fade, 200, testTwo.length);
cnt = 0;
function fade(z) {
if (cnt<z) {
_root[“text”+cnt]._visible = true;
} else {
clearInterval(x);
}
cnt++;
}
//***********************************

thanks you but this isent a exturnal file.

What ipaqflash was saying was you can use his method that he just posted, and you can modify it to use an external file. What will probably work is if you have a movie clip (box) that you’re loading your text into, get the actionscript to take the text that it’s loading and turn it into a string which would then work in the above code.

theREAL–thx
nessie theREal id correct
load any text/xml–or mc (box) [theREal]
make a string
and u should b cool
hope this helps
thx again theREal

Thanks TheRealAlan. The problen is that i´m no god at this so if you have the time i would be more then happy if you could help me with a .fla file that i could learn from.

Thanks!

/m

well i’ve been working with this for a little while now and i’m having a bit of trouble with it. I can’t get the dynamic text to load. The code that ipaqflash posted works perfectly on its own, but when i try to load the dynamic text into that string it’s just blank. I’ve never worked with externally loaded text files though so i’m probably doing something wrong. Can anyone please give me the proper code for loading a text file in as a string? I know you make a variable in the text file, but in AS, how do I get to that? Thanks.