Home Tutorials Forums Articles Blogs Movies Library Employment Press

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

Reply
 
Thread Tools Rate Thread Display Modes
Old 07-18-2004, 05:53 PM   #1
sure
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
curryjon51
Registered User
 
Join Date: Jul 2003
Posts: 257
Default

Hi

Couple of things you can do.

First...

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...

if(_root.go){
// do your tell target
}else{
gotoAndPlay(1)
}

or

Second...

something like:

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

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

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.

on(release){
_level0.my_condition = true;
}

Frame 60...

if(_level0.my_condition){
// 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
sure
Registered User
 
sure's Avatar
 
Join Date: May 2004
Location: Bedford, England
Posts: 6
Default

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
Reply


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 12:47 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.