Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, Is it possible to add an ina

Status
Not open for further replies.

cawthor

Programmer
Joined
May 31, 2001
Messages
89
Location
US
Hi,

Is it possible to add an inactivity timer to a movie? I want to redirect to a separate URL if the keys are not pressed and the mouse is not moved for a set period of time.
 
function callback() {
getUrl("}
function timer(Fsec) {
var intervalID;
_root.intervalID = setInterval(callback, Fsec*1000);
}
// timer cal ends here
// timer calls
function fxtimer() {
// set your own interval " timer(your own time)"
timer(3);
}
// Key and mouse listener object
myListener = new Object();
myListener.onKeyDown = myListener.onKeyUp=myListener.onMouseMove=function () {
clearInterval(_root.intervalID);
fxtimer();
};
Key.addListener(myListener);
Mouse.addListener(myListener);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top