How would I get a timer function to reset after no buttons were pressed for 3 minutes?
Right now I have my timer starting on load, and then when a button is pressed, it stops it. I basically want to restart it after 3 minutes.
the code I have:
PHP Code:
var timer:Timer = new Timer(5000);
timer.addEventListener(TimerEvent.TIMER, playSlides);
timer.start();
function playSlides(event:Event):void{
var i:Number = Math.round(Math.random()*slideinfo.length());
loader.load(new URLRequest(xml.slide[i].@data));
caption.text = xml.slide[i].@caption;
}
then the timer.stop(); attached to the buttons...
thanks