Beginner needs help with tweens

Hello, I’m having issues with this simple program I made. There’s two rectangles, a holder and a dragger. When you click the dragger, you can drag it until you mouse_up and it will return back to the position of the holder via tweens. It works fine, if you give enough time for the tween to fully take action and let it return to its proper place, but if you reclick it before it’s finished, the dragger gets stuck and misaligned. Here’s the code I have so far, thank you so much! :bounce:


package
{
    import flash.display.*;
    import flash.events.*;
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import fl.transitions.TweenEvent;
    
    public class script extends MovieClip
    
    {
        public var mcRectangleDragger:MovieClip = new MovieClip( );
        public var mcRectangleHolder:MovieClip = new MovieClip( );
        
        public var twnMoveX:Tween;
        public var twnMoveY:Tween;
        
        public function script( )
        {
            mcRectangleHolder.graphics.lineStyle( 1 );
            mcRectangleHolder.graphics.beginFill( 0x0000FF );
            mcRectangleHolder.graphics.drawRect( 100, 100, 150, 100 );
            mcRectangleHolder.graphics.endFill( );
            
            mcRectangleDragger.graphics.lineStyle( 1 );
            mcRectangleDragger.graphics.beginFill( 0xFF0000 );
            mcRectangleDragger.graphics.drawRect( 100, 100, 150, 100 );
            mcRectangleDragger.graphics.endFill( );
            mcRectangleDragger.addEventListener( MouseEvent.MOUSE_DOWN, rectangleEventDrag_handler );
            this.addEventListener( MouseEvent.MOUSE_UP, mouseUp_handler );
            //
            this.addChild(mcRectangleHolder);
            this.addChild(mcRectangleDragger);
        }
        
        private function rectangleEventDrag_handler( e:Event ):void
        {
            mcRectangleDragger.startDrag( );
        }
        
        private function mouseUp_handler( e:Event ):void
        {
            mcRectangleDragger.stopDrag( );
            
            twnMoveX = new Tween( mcRectangleDragger, "x", Strong.easeOut, mcRectangleDragger.x, mcRectangleHolder.x, 1.0, true );
            twnMoveY = new Tween( mcRectangleDragger, "y", Strong.easeOut, mcRectangleDragger.y, mcRectangleHolder.y, 1.0, true );
            
            twnMoveX.addEventListener( TweenEvent.MOTION_STOP, tweenStop_handler );
        }
        
        private function tweenStop_handler( e:TweenEvent ):void
        {
            trace( "finished" );
        }
    }
}