title: How to stop the song from playing in Action Script 3
body: <p>I am trying to stop the song from playing when user clicks on a button, this is my code :</p>
  
  <pre><code>var mySound:MainSound = new MainSound();
  var cmyChannel :SoundChannel;
  
  animation_play.addEventListener(MouseEvent.CLICK, playSound);
  
  function playSound(event:Event) {
  mySound.play();
  }
  
  animation_stop.addEventListener(MouseEvent.CLICK, stopSound);
  function stopSound(event:Event) {
  mySound.stop();
  }
  
  
  animation_play.addEventListener(MouseEvent.CLICK,    fl_ClickToGoToAndPlayFromFrame_3);
  
  function fl_ClickToGoToAndPlayFromFrame_3(event:MouseEvent):void
  {
     gotoAndPlay(2);
  }
  </code></pre>
  
  <p>when i click on the animation_play object it works perfectly fine, it does as how it should be by playing the sound and starting the animation from the specified frame. however if i click on animation_stop object i get an error </p>
  
  <pre><code>TypeError: Error #1006: stop is not a function.
  </code></pre>
  
  <p>Anyone know how to go about fixing this ?</p>