PDA

View Full Version : Delay And Than gotoAndPlay don't know if possible ??


eroteme
06-29-2004, 05:47 AM
Hello all Im brand new here. First off I want to say that even though this might be found somewhere I really don't even have the first clue what to look under since it seems unusual. Well here goes .... I have my menu buttons and after lets say a certain amount of time I want this tween effect to go thru buttons. I have it set up that in the area of the tweens is a label so I can easily use the gotoAndPlay("start") (or whatever label im using). Now the problem is I want it to go back to that label after every 60 seconds or something. I really have no clue how to go about this, don't even know what Im looking for Im still very very new to actionscript. As Im reading Im not even sure if this is possible without it being inside a movieclip? Well I hope someone can help me out not even sure if this question made sense. Thanks a ton for listening though!

oldnewbie
06-29-2004, 05:59 AM
You could set off a timer function at the end of the first tween pass, and then simply make it play again from your labeled frame...

eroteme
06-29-2004, 02:54 PM
well that is basically what I want I have actually 4 tween passes on 4 different layers and right after the last tween i have a stop(); action because its a button menu. Now after say 60 seconds I want it to replay those tweens but since I run at 20 frames a second I dont wanna really extend my timeline to something like 700 frames. Any way you can point me in the right direction of setting a timer function? As I said Im brand new to this and trying to learn as much as possible. Thanks for the help.

yncleben
06-29-2004, 05:09 PM
you could do this.
timer=0
onEnterFrame=function(){
timer++
if (timer==sometime){
gotoAndPlay(whatever)
timer=0
}
that should i think.

GaJl
06-29-2004, 06:26 PM
HI, you might try this nifty Smart Clip (see attached)... but I think the code it uses is very much the same as the code tips yncleben gave ya. The official description follows…

This Smart Clip adds a pause to your movie on a specific frame. Drag an instance of the waitAtFrame clip from the library onto the stage at the frame where you want a pause, then set the parameters of the pause using the clip parameters inspector (Window>Panels>Clip Parameters).

This Smart Clip will be available under Window>Common Libraries>waitAtFrame. Drag the waitAtFrame Smart Clip to the stage from this Library. Choose Window>Panels>Clip Parameters to configure this item.

eroteme
06-29-2004, 06:41 PM
ah thanks for the replies its really helpful. Now I got that SmartClip to work, you just set the parameters and it does what you need it to do. Thanks for that :) . Few questions though if I was to stick with this SmartClip since its an extension does it compile with the .swf or do I have to like upload the .mxp file also to my server? Next thing I really really wanna learn actionscript as I have a lot of books sitting infront of me, I get really confused though :( , but anyways If I wanted to take the chance and try it myself like with the code yncleben posted I still can't get it to work. Like all I do is enter on the frame I want the action to happen on:

timer=0
onEnterFrame=function(){
timer++
if (timer==sometime){
gotoAndPlay(whatever)
timer=0
}

and I would assume "sometime is where I put the number in milliseconds I want for the delay" and the "timer=0" is there supposed to be a number? Sorry I sound like an idiot but I really wanna learn and Im real confused but thanks for the replies and especially the smartclip thing!

yncleben
07-01-2004, 02:14 PM
Yes ur correct on the first part, but on the second part u leave it the same. After the timer gets to the time u won't it will reset it to 0 and do it all over again. Do u kinda see where Im getting at. Im still kinda new at this stuff to so nobody sounds like an idoit.