âš ī¸ Warning âš ī¸ Deprecated Code! This video tutorial contains outdated code.
💡 If you wish to update it, any AI assistant will update the code for you in seconds.

Typing Text Animation Array Tutorial

Published : November 14, 2014   •   Last Edited : November 24, 2025   •   Author : Adam Khoury
Learn to program arrays in flash to animate typing text. We use an EnterFrame event to animate the plucking of the array elements(by using shift()) that are created by using split() on any string of text content. This can also easily have dynamic and external string data applied to the animation.
var myString:String = "Put as much string data as you wish to here";
var myArray:Array = myString.split("");
addEventListener(Event.ENTER_FRAME, frameLooper);
function frameLooper(event:Event):void {
	if (myArray.length > 0) {
	    tf.appendText(myArray.shift());
	} else {
	    removeEventListener(Event.ENTER_FRAME, frameLooper);
	}
}