-
I want to put a time delay into my animation. so when the playhead gets to say frame 10, it waits 5 second and carries out a another instruction or loops the animation again or whatever. I'm just interested in adding the delay in seconds to my scripts. How?
-
http://www.actionscripts.org/tutoria...ts/index.shtml
(I find this a bit confusing, if anyone has a easier solution, please post it)
-
-
Originally posted by Aelo
I think this is much simpler...
first frame of animation>>
Code:
var startTime = getTimer();
var countAmount = 5;
var elapsed = 0;
I think something is missing here...
-
I think this is much simpler...
first frame of animation timeline>>
Code:
var startTime = getTimer();
var countAmount = 5;
var elapsed = 0;
last frame of animation timeline>>
Code:
elapsed = getTimer() -starTime;
if (elapsed > countAmount *1000) {
gotoAndPlay(1);
} else {
stop();
}
It's not working though. What am I missing?
-
Someone please help. If the aniimation is 30 frames, I have the top script in frame 1 and the second script in frame 30 in seperate scripts layer. What am I missing with regard to it holding for 30 seconds and then proceeding to loop again?
-
your 'if' statement only checks once
so if elapsed is not > 5000 on the first check
then it just stops
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
|