# Tween Size Problem

**URL:** <https://forum.kirupa.com/t/tween-size-problem/168348>\
**Category:** flash\
**Created:** [November 6, 2005, 11:55am UTC](https://forum.kirupa.com/t/tween-size-problem/168348 "2005-11-06T11:55:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alonsomoseley](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@alonsomoseley](https://forum.kirupa.com/u/alonsomoseley)\
**Post date:** [November 6, 2005, 11:55am UTC](https://forum.kirupa.com/t/tween-size-problem/168348/1 "2005-11-06T11:55:14Z")

</div>

Hi everyone!

this is my first post here and I have a general tweening question.  
I’m working on a flash 8 portfolio and using the TWEEN class.

first I create 5 buttons:

```auto
for (i=0;i<5;i++)
{
 var button:MovieClip = this.attachMovie("PButton", "button"+i, i);  

```

I load a different image for each button and then I create some rollover effects:

```auto
 
 button.onRollOver=function()
 {
  var tweenin=new Tween(this, "_width", Elastic.easeOut, 103, 203, 20, false);
  new Tween(this, "_height", Elastic.easeOut, 75, 198, 20, false);
 }
 button.onRollOut=function()
 {
  new Tween(this, "_width", Strong.easeOut, 203, 103, 5, false);
  new Tween(this, "_height", Strong.easeOut, 198, 75, 5, false);
 }

```

This works only half the time ☹  
Sometimes, a tween is’nt finished correctly.  
I have a feeling this has something to do with the fact that while (elastic) tweening, my rollover and rollout are fired again (without moving the mouse).

Does anybody recognize this problem?  
And more important: Can you tell me if this is a good general solution for size tweening?

Kind Regards,  
Alonso
