我如何获取其中的下一个数组并在循环中一次又一次地在文本字段中显示它,直到数组达到其最大值有一个计时器在影片剪辑触及空间(movieclip)时触发,然后计时器使每次触发计时器时,氧气都会下降数十
oTimer.addEventListener(TimerEvent.TIMER, O2);
stage.addEventListener(Event.ENTER_FRAME, outerSpace);
var oPercent:Array = ["100", "90", "80", "70", "60", "50", "40", "30", "20", "10", "0"]
var txtFld:TextField = new TextField();
var oTimer:Timer = new Timer();
addChild(txtFld);
txtFld.text = "Oxygen: " + oPercent[0];
function O2(evt:TimerEvent)
{
for(var i:int = 0; i < 10; i++)
{
oTimer.start();
txtFld.text = "Oxygen: " + oPercent[];
}
}
function outerSpace(evt:TimerEvent)
{
if(char.hitTestObject(Space))
{
oTimer.start();
{
}