Resize problem

Hi,

Let’s say I have the following code:


...
function resizeDisplay(event:Event):void {
            box.width = stage.stageWidth;
            box.height = 40;
        }
        
        function boxanim():void {
            Tweener.addTween(box, {width:stage.stageWidth, height:1, x:0, y:0, transition:"Bounce", delay:0, time:0.5, onComplete:boxanim2});
        }
        
        function boxanim2():void {
            Tweener.addTween(box, {width:stage.stageWidth, height:40, x:0, y:0, transition:"Bounce", delay:0.2, time:0.5});
        }
...

Everything works fine but if I resize the window 2 or 3 times (very fast) during the tweens animation, my second tween (boxanim2) will fill only half of the stage width.

How can I solve the problem? I want the resize function to work well during anytime of the tween animation.