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 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);
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.