AS3 Screensaver that starts when no mouse / touch activity

[COLOR=#000000][FONT=verdana]Hi guys[/FONT][/COLOR]

[COLOR=#000000][FONT=verdana]Need your assistance.[/FONT][/COLOR]

[COLOR=#000000][FONT=verdana]i try to create interactive advertising but stuck with the codes. [/FONT][/COLOR]

[COLOR=#000000][FONT=verdana]There is a main .swf page with few buttons to call another swf files (located in /swfs) …[/FONT][/COLOR]

[COLOR=#000000][FONT=verdana]The AS3 code as below:[/FONT][/COLOR]

*var Xpos:Number = 110;
var Ypos:Number = 180;
var swf:MovieClip;
var loader:Loader = new Loader();

var defaultSWF:URLRequest = new URLRequest(“swfs/eyesClosed.swf”);

loader.load(defaultSWF);
loader.x = Xpos;
loader.y = Ypos;
addChild(loader);
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Btns Universal function
function btnClick(event:MouseEvent):void {

removeChild(loader);
var newSWFRequest:URLRequest = new URLRequest(“swfs/” + event.target.name + “.swf”);
loader.load(newSWFRequest);
loader.x = Xpos;
loader.y = Ypos;
addChild(loader);
}
// Btn listeners
eyesClosed.addEventListener(MouseEvent.CLICK, btnClick);
stingray.addEventListener(MouseEvent.CLICK, btnClick);
demon.addEventListener(MouseEvent.CLICK, btnClick);
strongman.addEventListener(MouseEvent.CLICK, btnClick);

AND MY WISH IS… IF NO INTERACTION (TOUCH / MOUSE MOVEMENT) AFTER 2 MINUTES… THE MAIN PAGE WILL RUN THE SCREENSAVER (MOVIECLIP IN MAIN PAGE OR CALL ANOTHER .SWF FILES TO START PLAYING)

How do I do this? What would be the best way… just have the screensaver (movieclip) OR call external .SWF

I found this AS2 Scripts but could integrate.

*code:
***// initialise time passed already

var timeAccounted = 0;

//track time upto 10 mins

this.onEnterFrame = function () {

// get time elapsed since the start

now = getTimer () - timeAccounted;

if (now >= 600000) {

// if timer gets to 10 mins (600000ms), start playing your screensaver (for testing purposes decrease this number in line above!)

gotoAndPlay (“yourScene”, “startFrame”);

}

};

this.onMouseMove = function () {

// mouse moved? reset elapsed time

timeAccounted = getTimer ();

};
Then on your button (or in the timeline for the next scene):
code:
yourButton.onRelease = function () {

gotoAndPlay(“mainMovie”, “startFrame”);

}


Txs in advance guys. your assistance highly appreciated. **