title: Need to remove a child using hit test object function
body: <p>i am trying to make a function where i drop some seeds into a bucket and the seeds are removed however the function will just be the seeds colliding with the bucket.</p>
  
  <p>I have both of the objects as movieclips and have a basic hitTestObject conditional statement, i have no idea why the feed_mc wont be removed.</p>
  
  <pre><code>    if(bucket_mc.hitTestObject(feed_mc))
      {
      if(stage.contains(feed_mc))
      removeChild(feed_mc);
      }
  </code></pre>
  
  <p>thank you in advance</p>
  
  <p>Sorry should have edited here</p>
  
  <p>my code</p>
  
  <pre><code>   var Necessities:Array = new Array (Seed, shelter, water);
  
     for(var i:int = 0; i&lt; 10; i++)
     {
     var pickObjects = Necessities[int(Math.random()* Necessities.length)];
     var Objects:MovieClip = new pickObjects();
     addChild(Objects);
  
     Objects.x = Math.random() + 600;
     Objects.y = Math.random() * stage.stageHeight;
  
     }
  
  
     stage.addEventListener(Event.ENTER_FRAME, feedHen);
  
  
     function feedHen(e:Event):void {
  
     if(hen_mc.hitTestObject(Objects))
  
     {
      if (Objects.parent)
     Objects.parent.removeChild(Objects);
     }
     }
  </code></pre>