-
succesive gotoandplay commands
I made a page which has 2 buttons each to a different frame, but before I play that frame, (lets say button 1 goes to frame 20 and button 2 to 25) I want to play an outro for the main page and then go to there respective frame
For example
BTN1.on(release) gotoandplay(frame 12-15) and after playing those frames gotoandplay(frame 20)
and
BTN2.on(release) gotoandplay(frame 12-15) and then frame gotoandplay(frame 25)
Is this possible??
I´ve already searched everywhere, I know I could just copy the outro for each frame but I would like to know how to do it with code
-
Senior Member
I would say.. first always nest your clips/animations..etc into a movieClip..and NOT on the main timeline...
second, I would have your button set a variable: targetFrame for example.
and in frame 15 of the 'outro' have a line that says gotoAndPlay(targetFrame);
where your button code would set that targetFrame = 20; (or 25 respectively)
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
|