|
-
another stupid timer question...sorry
I know I know...I've looked at 30 posts on this and still can't get it to do what I want. Sorry for posting it again, but I've been beating myself over the head, and I have to get this done.
Now,
I have a MC on stage named Fred. Fred has 4 frames. I want to change to a random frame in fred every 5 seconds.
Fred has a stop() in his first frame.
Here's what I have placed on fred:
onClipEvent(load) {
fred.gotoAndStop(random(4)+1);
delay = 5000; // a 5 second delay
resetTime = getTimer() + delay;
}
onClipEvent(enterFrame) {
if (getTimer() > resetTime) {
gotoAndStop(random(4)+1);
}
}
When the movie starts fred waits 5 seconds then he just starts flippin through his 4 frames.
Anybody?
Thanks,
-Lemorris
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
|