now all is right. I'm trying
if you have a document class you can add the following:
package{
import flash.events.Event;
import flash.events.TimerEvent;
import flash.events.MouseEvent;
import flash.display.MovieClip;
import flash.utils.Timer;
public class Main extends MovieClip{
var idleTime:uint = 1000; // assign the value you want
var idleEvent:Event = new Event("IDLE_EVENT");
var timer:Timer = new Timer(idleTime,0);
function Main(){
timer.addEventListener(TimerEvent.TIMER,dispatchEventF);
timer.start();
stage.addEventListener(MouseEvent.MOUSE_MOVE,resetF);
}
private function dispatchEventF(e:TimerEvent){
dispatchEvent(idleEvent);
}
private function resetF(e:MouseEvent){
timer.reset();
timer.start();
}
}
}
and you can add a listener to your main timeline or that class for the "IDLE_EVENT"