Dear Kirupa members,
Can anyone teach me how to do a timer to redirect the page in browser by using flash action script? Your reply will be kindly appreciate.
Best Regards,
Clement
Dear Kirupa members,
Can anyone teach me how to do a timer to redirect the page in browser by using flash action script? Your reply will be kindly appreciate.
Best Regards,
Clement
im actually developing a kiosk program. when the user stop moving the mouse on the screen for 30 second. the current page will automatically back to main page. Im using flash mx. i already using getTimer() function. The problem is that how im i going to detect the mouse movement. if the mouse move the timer will start to count again until the user not doing anything or idle for 30 second. please helps
u can set AS with an event handler
on(mousemove){
get timer()
}
this should give u the time elapsed since the last mouse move
and hence u can set if ==30 sec(ur time limit){
(perform action)
}
i think this should be of some help to you.
i have tried the code but i cant make it work. on (mouseMove) event handler need to be in button. Can u send me a working FLA? thank you.
seconds = 30;//how many seconds of inactivity
function screenSaver() {
//actions to be performed if the idle
//time is equal to the value of seconds
}
this.onEnterFrame = function() {
elapsedTime = Math.floor(getTimer()/1000-initial);
if(elapsedTime == seconds){
screenSaver();
}
};
this.onMouseMove = function() {
initial = getTimer()/1000;
};
Thanks claudio & tulika. Its helps a lot. Thank You.
Anytime
It’s ok Clement. Thanks to claudio.
:: Copyright KIRUPA 2024 //--