title: How can I stop a movie from playing when I click on next frame - FLASH CS4?
body: <p>I have four movie clips (.f4v) in 4 frames in a movie with <em>watch</em> buttons.. These f4vs have been imported into a main movie container that has next and previous buttons. However if i play a movie then hit next frame, the movie continues to play in the background.  How can I shop this?  The code below shows the actionscript for one of the movie clips and then the actionscript in the main movie. I am a flash newbie, so all help appreciated.
  Many thanks.</p>
  
  <pre><code>stop();
  
  watch1_btn.addEventListener(MouseEvent.CLICK, playMovie1);
  
  function playMovie1(event:MouseEvent):void
  {
      movie1_mc.play();
  }
  
  // Button Listeners
  next_btn.addEventListener(MouseEvent.CLICK, nextSection);
  prev_btn.addEventListener(MouseEvent.CLICK, prevSection);
  
  function nextSection(event:MouseEvent):void {
  
      var thisLabel:String = pages_mc.currentLabel; // gets current frame label as string
      var thisLabelNum:String = thisLabel.replace("sct", ""); // cuts the leading letters off of the number
      var curNumber:Number = Number(thisLabelNum); // converts that string number to a real number
      if (curNumber &lt; 5){
          var nextNum:Number = curNumber + 1; // adds 1 to the number so we can go to next frame label
          pages_mc.gotoAndStop("sct" + nextNum); // This allows us to go to the next frame label
          }
  }
  ///////////////////////////////////////////////////////////////////////////
  function prevSection(event:MouseEvent):void {
  
      var thisLabel:String = pages_mc.currentLabel; // gets current frame label as string
      var thisLabelNum:String = thisLabel.replace("sct", ""); // cuts the leading letters off of the number
      var curNumber:Number = Number(thisLabelNum); // converts that string number to a real number
      var prevNum:Number = curNumber - 1; // subtracts 1 from the number so we can go to next frame label
      pages_mc.gotoAndStop("sct" + prevNum); // This allows us to go to the previous frame label
  
  }
  </code></pre>