Hi,
How can I create paragraphs wherever it is required. Currently it writes everything in a single paragraph. How to modify it?
var myString:String = "Learn to program arrays in flash to animate typing text. We use an EnterFrame event to animate the plucking of the array elements 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 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);
}
}