how to play and pause movie clip in flash

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mukeshrasm
    Contributor
    • Nov 2007
    • 254

    how to play and pause movie clip in flash

    Hi

    I want to play/pause a movie clip when I click a button and the value of button should changed to play when it is paused and pause when it is playing.

    I am new to flash so how can I do it.
  • kestrel
    Recognized Expert Top Contributor
    • Jul 2006
    • 1071

    #2
    Look through the tutorials listed on the sticky on the Flash Forum. You can find all that you need there.

    --
    Kestrel

    Comment

    • jitu78
      New Member
      • Aug 2006
      • 30

      #3
      Originally posted by mukeshrasm
      Hi

      I want to play/pause a movie clip when I click a button and the value of button should changed to play when it is paused and pause when it is playing.

      I am new to flash so how can I do it.

      you need to create a common movie clip for play pause control, and flag there with play and pause on different frames for each state.
      now, change position on click event.

      - Jitendra
      [removed link]

      Comment

      • kelleyg
        New Member
        • Jun 2008
        • 4

        #4
        Your response states, "Look through the tutorials listed on the sticky on the Flash Forum. You can find all that you need there."

        What is a 'sticky?' I am new to this forum and have not been able to find any area called 'sticky.'

        Comment

        • joedeene
          Contributor
          • Jul 2008
          • 579

          #5
          Originally posted by kelleyg
          What is a 'sticky?' I am new to this forum and have not been able to find any area called 'sticky.'
          If you still don't know what a sticky is or are still working on this project let me know, and a sticky is just threads that have been posted by Moderators or Administrators that are called sticky because they are always the top on the list and never get moved down(rather than normal questions that have been posted to be answered). I believe the 'sticky' he was talking about was this one. Stickies are not just a section or their own forum, each forum has different ones, depending on what has been posted by the Admins or Mods to remain sticky. There is also a yellow strip that says sticky under the threads...

          joedeene

          Comment

          • Fabez
            New Member
            • Oct 2008
            • 29

            #6
            Make a move clip with two frames, on the first one put a play symbol and on the second one a stop symbol. On both of the frames place the code.

            Code:
            stop();
            Then go back to the main time line and give your movie clip an instance name in the properties box at the bottom. For example you could call it StopNGo_mc. After you have done this, then add the following code to your main timeline.

            Code:
            _root.StopNGo_mc.onRelease = function() {
            	if (_root.StopNGo._currentFrame == 1) {
            		_root.StopNGo.gotoAndStop(2);
            		_root.Movie_mc.stop();
            	} else {
            		_root.StopNGo.gotoAndStop(1);
            		_root.Movie_mc.play();
            	}
            };
            In the code above, Movie_mc is the instance name of the movieclip you want to control. If you have any questions, just ask.

            Comment

            Working...