all groups > flash actionscript > december 2004 >
You're in the

flash actionscript

group:

Refresh Mechanism


Re: Refresh Mechanism Trevor Nielson
12/23/2004 1:41:13 PM
flash actionscript:
Or:
time = 0;
this.onMouseMove = function(){
if (getTimer()/1000 - time >= 120)
myFunction();
time = getTimer()/1000;
}

Kappy


[quoted text, click to view]

Refresh Mechanism Atkob
12/23/2004 9:17:38 PM
Hey, I hope you can help me with this:

I would like to implement some sort of refresh mechanism in a flash movie taht
allows me to reverts it back to beginning after being idle for 2 minutes.

Do you know how to do it?..
Best
Happy Holidays
Cesar

Re: Refresh Mechanism juankpro
12/23/2004 9:23:36 PM
myInterval = setInterval(this, "myFunction", 120000);

function myFunction(){
_root.gotoAndPlay(1);
Re: Refresh Mechanism Blade alSlayer
12/23/2004 9:26:28 PM
Define idle...
If it is "not moving the mouse" it wouldn't be easy (if it is possible at all)
otherwise you could restart a time interval each time an "action" occures.
Re: Refresh Mechanism juankpro
12/23/2004 9:31:53 PM
Sorry you have to write something like this in the root:

_root.onMouseMove = function(){
clearInterval(myInterval);
myInterval = setInterval(this, "myFunction", 120000);
};

function myFunction(){
clearInterval(myInterval);
_root.gotoAndPlay(1);
}

Re: Refresh Mechanism Atkob
12/24/2004 11:59:32 PM
Muchisimas Gracias,
Happy Holidays
AddThis Social Bookmark Button