Frame Delay in FLASH
- Started
- Last post
- 15 Responses
- DenisLirette
Can anyone tell me how to set a delay of a couple of seconds in a keyframe?
Can't find anything in flashkit and I don't really know what to look for in flash help. Nothing relevant is coming up.
Thank you!
- InVivio0
The "getTimer" function will tell you how many milliseconds have elapsed from the start of your movie.
- jawbreaker0
If you're using MX, checkout setInterval in the actionscript dictionary:
- DL0
Does anyone know how to create a frame delay in the middle of a movie?
- unknown0
hmm
- DL0
It's probobly real simple and i'll feel like an idiot if it is ... i just never needed to use such a thing before tonight.
tried goolge, flashkit, flashguru ... nada.
i'm desperate. i hope someone can help, or knows someone who can ...
- majman0
try putting this on empty movieclip in a key frame w/ a stop command on it:
on clipevent(load){
beginTime = getTimer();
endTime = (seconds)*1000;
}
on clipevent(enterFrame){
elapseTime = getTimer();
if((elapseTime - beginTime) > endTime){
_parent.gotoAndPlay(_parent.curr...
}
}there is probably an easier way to do it. oh replace 'seconds' w/ the number of seconds you wanted it to pause.
- DL0
http://www.flashkit.com/tutorial…
close but no cigar.
WHY IS THIS SO HARD TO FIND?? I'm sure i'm not the only one who wants to have a frame delay in the middle of a movie?!?!?
- majman0
did that help at all?
- DL0
still trying. there must be an easier way though ....
hmmm
- majman0
for the _parent.gotoAndPlay(), you can just put a frame number inside the parenthesis also...
if you wanted to advance to a different frame after the pause.
- DL0
I never noticed J.Lo is sporting an iPod in her latest video. hmmm... booty.
Anyway, i'm till trying to figure out the simplest way to a frame delay. thanks for your help so far majman.. i tried what you suggested, and it's not quite working out ...
- gabe0
try this...
setInterval( _root.movie.gotoAndPlay(), 5*1000 );
5*1000 = 5 seconds, so adjust accordingly.
- gabe0
you might have to do it like this:
function delayIt() {
_root.name.gotoAndPlay(1);
}setInterval( delayIt, 5*1000 );
- DL0
it's not workign for me. feel free to email me a sample fla file.
thank you for your help so far guys
- gabe0
ah, that code won't work exactly like that, it will make it loop. let me email you the proper source