Problem of market timer / stop

I have a timer set up like this:

function headlineTimer() {}
var: timer = new Timer (3000, 20);
timer.addEventListener (TimerEvent.TIMER, timerComplete);
Timer.Start ();
}
function timerComplete(e:TimerEvent):void {}
trace ("times up");
nextFrame();

}

The problem is that I can not understand how to stop or reset it after that it goes to the next section.  Can someone help me with this? Thanks in advance.

Try:

var: timer;
Stop();
headlineTimer();

function headlineTimer() {}
Timer = new Timer (3000, 20);
timer.addEventListener (TimerEvent.TIMER, timerComplete);
Timer.Start ();
}
function timerComplete(e:TimerEvent):void {}
trace ("times up");
stopTimer(); It's really necessary.
nextFrame();
}
function stopTimer (): void {}
Timer.Stop ();
}

Tags: Adobe Animate

Similar Questions

Maybe you are looking for