title: AS3 How do I stop sound and video when clicking a menu button to go to another frame?
body: <p>I have a problem with my slideshow script.
  I have embedding a flash video file into my website with this slideshow called monoslideshow, and everything seems to work perfectly. Trouble is, when I am clicking on another menu button that should jump to another frame, it still keeps playing the video and sound while displaying the new menu data.
  So I will probably need some code that stops the video instantly, when another menu button is clicked. But how do I write it and where do I put it?</p>
  
  <p>Here is my actionscript for the video file to show:</p>
  
  <pre><code>var loaderSlide:Loader = new Loader();
  var monoslideshow:Object;
  
  loaderSlide.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
  addChild(loaderSlide);
  
  loaderSlide.load(new URLRequest("monoslideshow.swf"));
  
  function onLoadComplete(event:Event):void { 
      monoslideshow = event.target.content;
      monoslideshow.showLogo = false;
      monoslideshow.setViewport(new Rectangle(730, 20, 700, 660));
      var xml:XML = 
  
  &lt;album title="TITLE" itemPath="photography/makingoff/" thumbnailPath="thumbnails/"&gt;
  &lt;contents&gt;
  &lt;video source="VIDEO.flv" /&gt;
  &lt;/contents&gt;
  &lt;/album&gt;
      monoslideshow.loadXML(xml);
  }
  </code></pre>
  
  <p>It would be great to get a solution to this problem, otherwise my website will be kinda messy ;)</p>
  
  <p>THANK YOU!!</p>