title: How to unload audio when a video is deleted
body: <p>I've created a video player into which I dynamically load video from another component:</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()"  &gt;   
  &lt;mx:Script&gt;
      &lt;![CDATA[
  [Bindable] public var videoAddress:String 
  private static const YOUTUBE_EMBED_URL:String =  "http://www.youtube.com/v/";           
  [Bindable] public var videoUrl:String;                                  
  private function init():void {
      videoUrl = YOUTUBE_EMBED_URL+videoAddress;
  }           
  
      ]]&gt;
  &lt;/mx:Script&gt;    
  &lt;mx:SWFLoader id="swfLoader" source="{videoUrl}"  width="800" height="600"  /&gt;
  &lt;/mx:Canvas&gt;
  </code></pre>
  
  <p>Here's how I load the video:</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
   &lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600"&gt;
  &lt;mx:Script&gt;
      &lt;![CDATA[
          private var videoPlayer:VideoPlayer;
          protected function button1_clickHandler(event:MouseEvent):void{         
              if(this.videoPlayer != null){
                  this.videoPlayer.removeAllChildren();
              }
              videoPlayer = new VideoPlayer();
              videoPlayer.videoAddress = "_OBlgSz8sSM";                  
              this.addChild(videoPlayer);             
          }           
          protected function button2_clickHandler(event:MouseEvent):void{         
              if(this.videoPlayer != null){
                  this.videoPlayer.removeAllChildren();
              }
              videoPlayer = new VideoPlayer();
              videoPlayer.videoAddress = "tvmIEP_BP9Q";                  
              this.addChild(videoPlayer);             
          }
      ]]&gt;
  &lt;/mx:Script&gt;
  &lt;mx:HBox  top="600"&gt;
      &lt;mx:Button  label="Button 1" click="button1_clickHandler(event)" /&gt;     
      &lt;mx:Button  label="Button 2" click="button2_clickHandler(event)" /&gt;     
  &lt;/mx:HBox&gt;
   &lt;/mx:Application&gt;
  </code></pre>
  
  <p>The problem I'm experiencing is that when I load another video, the old video is removed and the new video loads, but the old audio keeps playing. </p>
  
  <p>How can I remove the audio?</p>