# Small bug as usual

**URL:** https://forum.kirupa.com/t/small-bug-as-usual/286979
**Category:** Uncategorized
**Created:** [April 23, 2009, 9:45pm UTC](https://forum.kirupa.com/t/small-bug-as-usual/286979 "2009-04-23T21:45:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Emmanuel27](https://avatars.discourse-cdn.com/v4/letter/e/ed8c4c/32.png) [@Emmanuel27](https://forum.kirupa.com/u/Emmanuel27)
#### Post date: [April 23, 2009, 9:45pm UTC](https://forum.kirupa.com/t/small-bug-as-usual/286979/1 "2009-04-23T21:45:23Z")

</div>

Hi to everybody…i’m new to the forum and got a problem wich should be quite easy to solve…but not for me 😃

I have tried to script a simple button wich should scale his size when the event Mouse\_OVER appears…and resize when the event Mouse\_OUT happens…so far so good…but if i’m moving my cursor quick out of the buttonfield before the button is scaled to its full size a bug occurs.

thx for any suggestions or sulutions :hat:

import fl.transitions.Tween;  
import fl.transitions.easing.\*;

function mouseOverHandler(e:MouseEvent):void {  
new Tween(Button1\_mc,“scaleX”, Strong.easeOut, 1, 1.5, 20, false);  
new Tween(Button1\_mc,“scaleY”, Strong.easeOut, 1, 1.5, 20, false);  
}

function mouseOutHandler(e:MouseEvent):void {  
new Tween(Button1\_mc,“scaleX”,Strong.easeOut, 1.5, 1, 10, false);  
new Tween(Button1\_mc,“scaleY”,Strong.easeOut, 1.5, 1, 10, false);  
}

Button1\_mc.buttonMode = true;

Button1\_mc.addEventListener(MouseEvent.ROLL\_OVER, mouseOverHandler, );  
Button1\_mc.addEventListener(MouseEvent.ROLL\_OUT, mouseOutHandler);
