Hold for 5 secs

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.

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

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.

=) Thanks a lot!!! No worries about the delay, I appreciate the help - whenever it comes!!

Peace