Replay app from frame 1 when not in use
Hi all again...
I am using this code to try to restart my app for a touch screen in a kiosk, from frame 1 when nobody touch it for 1 min, but it's not working it starts randomly when I touch in the screen ...
Am I doing something wrong?
Even if I try it in the computer, with the mouse instead of the touch screen, it happens the same...
var myTimer:Timer = new Timer(50000, 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