PDA

View Full Version : Jumping Frame Conundrum


GoodStuff
09-02-2003, 08:51 PM
Can anybody help?
I have a movie with 3 buttons,
when you press any of them, I want to jump to an animation that starts at frame 30 and finishes at frame 45. (this bit I know how to do).
... Then, when the playhead gets to frame 45 I want it to jump to different frames depending which button was pressed at the start.

so...
if you press the red button go to frame 30 and when you get to frame 45 jump to frame 50.
if you press the blue button go to frame 30 and when you get to frame 45 jump to frame 60.
if you press the green button go to frame 30 and when you get to frame 45 jump to frame 70.

Basically, I want to find a way so I dont have to repeat the animation for each button.

So, can YOU help?

If you can, I would be extremely greatful.
Thank you

lochwinnoch
09-03-2003, 08:43 AM
Need to set a variable in _global or on a timeline.

// on red button
on (release) {
_global.toGoTo = 50;
gotoAndPlay(30);
}

// on blue button
on (release) {
_global.toGoTo = 60;
gotoAndPlay(30);
}

// on green button
on (release) {
_global.toGoTo = 70;
gotoAndPlay(30);
}

// on frame 45
gotoAndPlay(_global.toGoTo);


loch

GoodStuff
09-05-2003, 08:06 AM
Thanks, it works like a charm. Its easy when you know how.
I appreciate the help.
GS