更新时间:2022-06-18 14:58:42
使用计时器:
var string:String = "TEXT REMOVED";
var myArray:Array = string.split("");
var timer : Timer = new Timer (1000, myArray.length);
timer.addEventListener (TimerEvent.TIMER, frameLooper);
timer.start();
function frameLooper(event:Event):void {
text1.appendText(myArray.shift());
}
这将每秒执行 frameLooper,次数与数组的长度完全相同.
This will execute the frameLooper on every second for exactly as many times as the length of the array.