Timer to go back to frame 1 and play
Hi,
I have already posted a similar question to this one but wasn't able to solve my problem yet.
I have a few applications for museum kiosks that I want to restart after a few time without any touch.
I was using an AS3 that isn't working. It looks like it's working but after a few minutes it goes wierd and goes back to frame 1 even if there is someone touching the screen.
The AS3 I was using is:
var myTimer:Timer = new Timer(30000, 1);
myTimer.addEventListener(TimerEvent.TIMER, timerHandler);
myTimer.start();
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveMouse);
function moveMouse(evt:MouseEvent):void {
myTimer.reset();
myTimer.start();
}
function timerHandler(evt:TimerEvent):void {
gotoAndPlay(1);
}
Thank you all
AB
