title: Remove all instances of a movie clip from stage AS3
body: <p>I am trying to have some dots follow my cursor but I can't delete the old dots so all that ends up happening is I get a lot of dots on a grid. I've tried removeChild and some other methods but none of them work.
  Theres 2 parts to this code because I was hoping to alternate between them so one could delete/remove the other while it was running. All of this is contained within a timer that runs every half second.</p>
  
  <pre><code>if(radius&lt;8 &amp;&amp; counter%2!=0){
      xCoord = ((radius*Math.cos(theta))*25)+275;
      yCoord = ((radius*Math.sin(theta))*(-1)*25)+225;
      for(dots = 1; dots&lt;=ship; dots++){
          var dotInstance2:dot = new dot();
          dotSprite2.addChild(dotInstance2);
          mcArray2.push(dotInstance2);
          dotInstance2.x=xCoord;
          dotInstance2.y=yCoord;
          xCoord = ((xCoord-275)/25);
          yCoord = ((yCoord-225)/25)*(-1);
          theta = Math.atan(yCoord/xCoord)-(15*(Math.PI/180));
          if(xCoord&lt;0){
              theta = theta + Math.PI;
          }
          xCoord = ((radius*Math.cos(theta))*25)+275;
          yCoord = ((radius*Math.sin(theta))*(-1)*25)+225;
      }
  }
  </code></pre>
  
  <p>The dots are supposed to snap to a polar grid (which I already have done and that works) I just need to be able to delete the old dots after there are more than "ship" (a number) dots on the stage.</p>
  
  <p>There are no test ways of removing the instances in this code because none of them worked.
  What I have tried is adding the instances to an array and removing all the values from the array, using removeChild and removeChildAt, also trying to remove the sprites I have (dotSprite2 in this example)</p>