I have tried to figure out how to get an animation to pause at a desired frame after a click rather than just stopping it at that exact frame or putting a stop action at the desired frame. My goal is to have a movie sequence play continuesly and when a user so desires he/she can click and stop the movie, but rather than stop it while it is in transition at that exact frame, the movie should continue to a point where it is logical for the movie to stop.(example: the movie is at frame 2 when the user clicks, but instead of stopping at frame 2 it continues to frame 10, and then stops) Then on another click the movie will continue through it’s sequence as it was before. I would like to use a MC, onClipEvent to handle the script in Flash MX. If anyone has any ideas please let me know what they are.
Thanks, and Cheers
erok
Button1:
on (release) {
_global.pressed = true
}
Frame10:
if (_global.pressed) {
this.stop();
}
Button2:
on (release) {
_global.pressed = false;
_root.MC.play(); //MC is your movieclip
}
That’s one way i can think of…but i’m sure there are many other ways
sure but I’m not using buttons. onMouseDown, or onClipEvent would be best and then I would need an if then statement, which I can’t figure out but I know is simple. HMMMMM
thanks though
How else is the user going to stop the movie…you said this urself:
My goal is to have a movie sequence play continuesly and when a user so desires he/she can click and stop the movie…
give the movieclip an instance name mc.
in its first frame type
if (_parent.stopped != false) {
stop();
} else {
play();
}
in any other frames which you think are good stopping points type
if (_parent.stopped != false) {
stop();
}
on the main timeline
stopped = true;
onMouseDown = function () {
(stopped=!stopped) ? trace(“stopping”) : mc.play();
};