# Resize problem

**URL:** https://forum.kirupa.com/t/resize-problem/254227
**Category:** flash
**Created:** [March 9, 2008, 11:57pm UTC](https://forum.kirupa.com/t/resize-problem/254227 "2008-03-09T23:57:44Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![RubenDoliveira](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rubendoliveira/32/3905_2.png) [@RubenDoliveira](https://forum.kirupa.com/u/RubenDoliveira)
#### Post date: [March 9, 2008, 11:57pm UTC](https://forum.kirupa.com/t/resize-problem/254227/1 "2008-03-09T23:57:44Z")

</div>

Hi,

Let’s say I have the following code:

```auto

...
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.
