-
I'm trying to insert delays in my movie. Can anyone tell me an easy way to insert a three second delay between frames?
"..when the user presses the right arrow, it should take three seconds until he can see the next(target) frame.."
-
You can use a movie clip as a timer
make a movie clip
in the first frame of your movie clip have a stop action
in the second frame
x = getTimer();
play ();
3rd frame
play();
4th frame
if ((getTimer())>(x)+3000) {
_root.gotoAndplay(1)
} else {
prevFrame ();
}
this timer is for 3 seconds
1sec = 100 milliseconds
target this movie clip in the main timelinewhenever you want the timer to start
on (keyPress "<Right>") {
tellTarget ("timermovie") {
gotoAndPlay (2);
}
}
Hope I am clear
Regards...
-
Movieclip timer; helpful, but...
Hi, thanks for your help.
I tried your method, but couldn't get it to work. I placed the new movie with your code in, in a new layer in my main movie. Please explain what you mean here, in the last frame of timermovie:
if ((getTimer())>(x)+3000) { <---if 3 seconds have passed
_root.gotoAndplay(1) <---Goto frame 1. (Which
movie? Timermovie
or my main movie?)
} else {
prevFrame (); <---If not go to previous
frame in timermovie (3)
}
cheers..
g
Originally posted by vinaya
You can use a movie clip as a timer
make a movie clip
in the first frame of your movie clip have a stop action
in the second frame
x = getTimer();
play ();
3rd frame
play();
4th frame
if ((getTimer())>(x)+3000) {
_root.gotoAndplay(1)
} else {
prevFrame ();
}
this timer is for 3 seconds
1sec = 100 milliseconds
target this movie clip in the main timelinewhenever you want the timer to start
on (keyPress "<Right>") {
tellTarget ("timermovie") {
gotoAndPlay (2);
}
}
Hope I am clear
Regards...
-
Re: Movieclip timer; helpful, but...
if ((getTimer())>(x)+3000) { <---if 3 seconds have passed
_root.gotoAndplay(1) <---Goto frame 1. (of your main movie in the main time line"_root" refers to the main time line
} else {
prevFrame (); <---If not go to previous
frame in timermovie
}
so that it will check if 3 seconds have gone and if three seconds are over it will go to yourmain time line and play else it will go to the previous frame in your timer movieclip
Regards...
-
Hello.
Now I must be bothering you...sorry about that. Hope you don't mind too much, but if you haven't got the time don't worry.
You see, I'm trying to make a simple navigation system based on using the arrows on your keyboard to move "focus" and spacebar to go there. Just like buttons, only instead on using the mouse use arrows and instead of click use space. With a 3 second delay on every button.
The way you explained me works fine, but to get the timer to work it requires 5 different timer movies per focus area! Which is 14 per scene (5*14*5!!) Do you see my problem?!
thanks
g
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|