title: ActionScript 3 - Add and remove child from stage
body: <p>I am just learning ActionScript 3, so this is probaly an eazy question for you pro's. 
  I created movie clips that I want to add to the stage (from the library) by the use of buttons. I have a total of six buttons (and six moviclips) but I am trying to get the first two to work before I move on to the next buttons. The problem is I can't seem to remove the movie clip when another button is clicked, or the same button... Like I said I am new at this and I think a created a mess of things... I am getting error 2007 now</p>
  
  <pre><code>import flash.events.MouseEvent;
  import flash.display.MovieClip;
  
  mix_btn.addEventListener(MouseEvent.CLICK, addbear);
  function addbear(event:MouseEvent):void
  {
      var movieClip:bear1 = new bear1();
      addChild(movieClip);
      movieClip.x = 240;
      movieClip.y = 45;
  
  
  mix_btn.removeEventListener(MouseEvent.CLICK, addbear);
  mix_btn.addEventListener(MouseEvent.CLICK, removebear);
  }
  function removebear(event:MouseEvent):void
  {
      var movieClip:bear1 = null;
      removeChild(movieClip);
      mix_btn.removeEventListener(MouseEvent.CLICK, removebear);
  /*  mix_btn.addEventListener(MouseEvent.CLICK, addbear);*/
  }
  shake_btn.addEventListener(MouseEvent.CLICK, addbear3);
  function addbear3(event:MouseEvent):void
  {
      var movieClip:bear3 = new bear3();
      addChild(movieClip);
      movieClip.x = 240;
      movieClip.y = 45;
  
      shake_btn.removeEventListener(MouseEvent.CLICK, addbear3);
      shake_btn.addEventListener(MouseEvent.CLICK, removebear3);
  }
  function removebear3(event:MouseEvent):void
  {
      var movieClip:bear3 = null;
      removeChild(movieClip);
      shake_btn.removeEventListener(MouseEvent.CLICK, removebear3);
      shake_btn.addEventListener(MouseEvent.CLICK, addbear3);
  }
  </code></pre>