Small bug as usual

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

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);