uh hey guys,
just wanted to know
how to add a timer-based actions,
like say, if it is already 5 seconds on a current frame,
then go and play on the next
can any1 help?
thnx a bunches!!!
:D
Printable View
uh hey guys,
just wanted to know
how to add a timer-based actions,
like say, if it is already 5 seconds on a current frame,
then go and play on the next
can any1 help?
thnx a bunches!!!
:D
I've used the simplest timer movie clip of all for stuff like that, where you want to go from frame to frame, that holds say,images. I just made a clip that had a stop in frame 1, then enough frames to eat up 5 seconds at the movie frame rate, then in the last frame, code to make the timeline jump to nextFrame(); In the frames of the timeline you want to use it in, add this to each frame,
_root.timerMc.play();
Simple and dumb, but dang me if it doesn't work every time. I did it this way, because I found that coaded timer didn't always work as expected. :)
haha, ok
but i in my case, i would need the coded timer since
it goes like this,
I have a character, now when you press jump,
it will go to a frame where he is ready to jump
now, there is a new button there called "jump now"
everytime you press it, he will jump
but within that, i want to have a set time before
it will go back to the frame where it sez "jump"
well, i could be wrong about not using your style,
but i think im more comfortable with AS
(not that im good at it)
anyway, thnx a bunchez!:D
Here is one way:
Paste it into the main frame to test it
Code:function doSomething() {
trace("Tada");
}
setInterval(doSomething, 5000);