removeChild problem

I’m trying to remove a linked MC once it reaches a certain point on the stage, but it seems to remove all the MC’s. How do I single out just the specific one that is at that stage position?

Here is my code:



package
{
    import flash.display.MovieClip;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import caurina.transitions.*;
    
    public class DocumentClass extends MovieClip
    {
        private var timer:Timer = new Timer(100);
        
        public function DocumentClass():void
        {
            timer.addEventListener(TimerEvent.TIMER, makeStar);
            timer.start();
        }
        
        private function makeStar(e:TimerEvent):void
        {
            var star:Star = new Star();
            star.scaleX = star.scaleY = Math.random();
            star.x = Math.random() * this.stage.stageWidth
            star.y = 400;
            Tweener.addTween(star, {y:-20,time:5, transition:"easeoutExpo"});
            this.addChild(star);
            
            if(star.y >= 10)
            {
                trace("this is working");
                /*this.removeChild(star);*/
            }
            
        }
    }
}


maybe I wasn’t clear in my code or my explanation.

When the stars reach a certain height I want them to be removed from the stage.
I set this to y=10 for this so you can see them, in the final movie they will be removed once they are at some point off stage.



package
{
    import flash.display.MovieClip;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import caurina.transitions.*;
    
    public class DocumentClass extends MovieClip
    {
        private var timer:Timer = new Timer(100);
        
        public function DocumentClass():void
        {
            timer.addEventListener(TimerEvent.TIMER, makeStar);
            timer.start();
        }
        
        private function makeStar(e:TimerEvent):void
        {
            var star:Star = new Star();
            star.scaleX = star.scaleY = Math.random();
            star.x = Math.random() * this.stage.stageWidth
            star.y = 400;
            Tweener.addTween(star, {y:20,time:5, transition:"easeoutExpo"});
            this.addChild(star);    
        }
    }
}

I need to to remove just one instance the specific star that is at that point not all of them.

Any extra insight would be appreciated.

~reblis