Stewie for President!
New member
Okay so I want to create text to appear letter by letter in a text box. I have the following code:
typeText = "TEXT GOES HERE";
typeInterval = setInterval(typeThis, 70, typeText);
counter = 0;
function typeThis(thisString) {
preloading_txt.text += thisString.charAt(counter);
counter++;
//if (thisString._width > preloading_txt._width)
//thisString += "\n";
if (preloading_txt.text == typeText) {
{
clearInterval(typeInterval);
}
}
};
This works, the problem is that it gets cut off once it reaches the end, so my question is:
HOW DO YOU MAKE TEXT APPEAR LETTER BY LETTER, LINE BY LINE?
thanks
typeText = "TEXT GOES HERE";
typeInterval = setInterval(typeThis, 70, typeText);
counter = 0;
function typeThis(thisString) {
preloading_txt.text += thisString.charAt(counter);
counter++;
//if (thisString._width > preloading_txt._width)
//thisString += "\n";
if (preloading_txt.text == typeText) {
{
clearInterval(typeInterval);
}
}
};
This works, the problem is that it gets cut off once it reaches the end, so my question is:
HOW DO YOU MAKE TEXT APPEAR LETTER BY LETTER, LINE BY LINE?
thanks