Typewriter Effect using apendText that can shift the body of text up as new lines are added
I'm simulating a computer typing on code - I've got a rather long string that's typing on using apendText (script below). My problem is that when my text reaches the border of the dynamic text field it stops displaying. I need the size of the text field as it currently is for design purposes.
I'm wanting the text to continue to type on at the bottom line of the Dynamic text field and shift the previous lines up for each new line that's typed on. Hopefully what I'm trying to accomplish makes sense.
I also want my string to loop infinately so the same block of code starts over after the last line of the previous loop.
Thanks in advance for your help!
var myString:String =" long text string here...";
var myArray:Array = myString.split("");
addEventListener(Event.ENTER_FRAME, streamingCode);
function streamingCode(event:Event): void {
if (myArray.length > 0) {
myCode.appendText(myArray.shift());
}
