johan
August 30, 2002, 10:22am
1
Hi everybody,
ive got a problem with a counter… i like to have it like this… its displays the time for 5 secs (ok, that no problem… here it comes…) theni want it to go to frame 2 and show that frame for 5 secs and back to frame 1 (almost like a loop)
is that possible? thanks in advance!!
Cheers!
/J.
system
August 30, 2002, 5:13pm
2
This script will loop over ‘n’ number of frames for ‘t’ seconds.
Hope this helps you out!
pauseDuration = t*1000;
framesInLoop = n;
if (startTime == null) {
startTime = getTimer();
gotoAndPlay (_currentframe-framesInLoop);
} else {
lapsedTime = getTimer()-startTime;
if (lapsedTime < pauseDuration) {
gotoAndPlay (_currentframe-framesInLoop);
} else {
startTime = null;
}
}
Peace
system
August 30, 2002, 5:57pm
3
Okay, Ryall… I’ve been a bad, bad, man… I’ve decided to not answer any posts until I look at yours. Going there now…
Sorry for the delay.
system
August 30, 2002, 6:04pm
4
=) Thanks a lot!!! No worries about the delay, I appreciate the help - whenever it comes!!
Peace