Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)

Thread Tools Rate Thread Display Modes
Old 07-18-2004, 05:53 PM   #1
Registered User
sure's Avatar
Join Date: May 2004
Location: Bedford, England
Posts: 6
Default Delay response in looping animation?

I've yet another stupid question - this has to be simple right?
I have a movie that loops, say when it reaches frame 60 it starts over at 0. I need a button that when pressed will allow the movie to continue to 60, and THEN do a telltarget or a gotoframe or something - so that it can blend seamlessly (into another movieclip or frame within the same) no matter which frame was being played when the button was pressed.
Thanks to anyone who can help me on this!
sure is offline   Reply With Quote
Old 07-18-2004, 11:00 PM   #2
Registered User
Join Date: Jul 2003
Posts: 257


Couple of things you can do.


Have your button set a "flag" variable on say the _root.timeline... eg _root.go = true.

Then on your frame60, wrap your (now outdated) tell target in an if statement...

// do your tell target



something like:

bttn.onRelease = function(){
_root.createEmptyMovieClip("waiter", 999)
_root.waiter.onEnterFrame = function(){
// do your tell target
Will have to check syntax of above ... is just off top of my head, and not checked.

curryjon51 is offline   Reply With Quote
Old 07-18-2004, 11:01 PM   #3
Banned by AS.org Staff
Join Date: Mar 2002
Posts: 10,533

Just set a variable to true on the button press. Then on frame 60, check to see if that condition is true and have your movie clip then do something else than looping back to frame 1.

_level0.my_condition = true;

Frame 60...

// do something else...

With the above, your clip should loop until the condition is true...
oldnewbie is offline   Reply With Quote
Old 07-18-2004, 11:56 PM   #4
Registered User
sure's Avatar
Join Date: May 2004
Location: Bedford, England
Posts: 6

Ah yes, that makes sense! Thanks a lot, perfect. It's so great to get answers like this, many thanks.
sure is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 10:17 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.