Skip to main content
October 9, 2010
Answered

Pause btn goes back to beginning of movie

  • October 9, 2010
  • 1 reply
  • 424 views

Hello,

Actionscript 2.0

I have a play and stop button in a movie clip. The actual button works great but does not pause the movie and then resume playback where it left off. Instead the movie goes back to the very beginning and stop/starts there. I need the button to resume playback where the movie was stopped—like a pause and resume button. The videos load exernally through an FLVPlayback component (myVideo).

The code is on the main time line in Actions layer.

Here's the code for the button:

_root.StopNGo_mc.onRelease = function() {
    if (_root.StopNGo_mc._currentFrame == 1) {
        _root.StopNGo_mc.gotoAndStop(2);
        _root.myVideo.stop();
    } else {
        _root.StopNGo_mc.gotoAndStop(1);
        _root.myVideo.play();
    }
}

Once again,

Many thanks,

Andrea

This topic has been closed for replies.
Correct answer Ned Murphy

If you are using an FLVPlayback component for the video, you should be able to use the pause() method instead of the stop() method.

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
October 10, 2010

If you are using an FLVPlayback component for the video, you should be able to use the pause() method instead of the stop() method.

October 10, 2010

Yes, that did it!

Thank you thank you!

Ned Murphy
Legend
October 10, 2010

You're welcome