Having a little issue here with TIMER, basically I am looking for the timeline to advance 1 frame after 3 seconds, OR on MouseEvent.CLICK advance to next frame (before the 3 seconds it up). Which would then reset the TIMER. So, on CLICK go to next frame, OR wait 3 seconds and go to next frame (while having the TIMER reset both times). So…
Wait 3, (timer resets) wait 3, (timer resets) CLICK, (timer resets) CLICK, (timer resets) CLICK, (timer resets) wait 3, (timer resets)wait 3, (timer resets)CLICK, (timer resets)CLICK… You get the idea.
My issue is the timeline, over time the TIMER time doubles, it doesn’t reset…
I am sure this is pretty basic and I am over thinking.
HELP?!? :crying:
stop();
var timerA:Timer = new Timer(3000); // 3 second delay
// 1000 milliseconds = 1 second
timerA.addEventListener(TimerEvent.TIMER, goNext);
timerA.start();
function goNext(event:TimerEvent):void {
nextFrame();
}
FWDbtn.addEventListener(MouseEvent.CLICK, goNEXT);
function goNEXT(e:MouseEvent):void {
timerA.reset();
timerA.start();
nextFrame();
}
PREVbtn.addEventListener(MouseEvent.CLICK, goBACK);
function goBACK(e:MouseEvent):void {
timerA.reset();
timerA.start();
prevFrame();
}