title: as3 check if child exists - removeChild();
body: <p>The code below creates a MovieClip called "circle" and checks if it exists and deletes it via removeChild();  It removed the circle but the [object MovieClip] is still there.</p>
  
  <p>How can I check if a child is "on stage" or removed using removeChild?</p>
  
  <pre><code>import flash.display.MovieClip;
  import flash.events.MouseEvent;
  
  var circle:MovieClip  = new MovieClip();
  circle.graphics.beginFill(0xFF794B);
  circle.graphics.drawCircle(50, 50, 30);
  circle.graphics.endFill();
  addChild(circle);
  circle.addEventListener(MouseEvent.CLICK, test);
  
  function test(event:MouseEvent)
  {
      trace(circle);
      if(circle)
      {
       trace("Called if Circle");
       removeChild(circle);
      }
      trace(circle);
  }
  </code></pre>