I want to create a MovieClip button that when the mouse rolls over it, it scales larger and then when the mouse rolls out of it, it scales back to normal size.
If i move the mouse cursor over and out of it slowly, the animation is fine, but if enter the mouse over it on one side and out on the other side or jerk my mouse around it acts as if the EventListeners and their respective Tween code has been reversed. I have even seen on occasion the square filling the whole screen.
Here’s my code:
(this is written from memory and not copy pasted from flash, but before you say anything, I do have the proper imports for classes in the code so I wont include them here.
var yTween:Tween = new Tween(myMc, "scaleY", Elastic.easeOut, 1, 2, 2, true);
yTween.stop();
myMc.buttonMode = true;
myMc.addEventListener(MouseEvent.ROLL_OVER, onRollOverHandler);
myMc.addEventListener(MouseEvent.ROLL_OUT, onRollOutHandler);
function onRollOverHandler (myevent:MouseEvent) {
yTween.start();
}
function onRollOutHandler (myevent:MouseEvent) {
yTween.yoyo();
}
It is important to note that when I Tween other properties like transparency or alpha or color, everything is fine…this just happens when there is movement or scaling or animation in involved.
any help would be GREATLY appreciated since i have been stuck on this for awhile!
Thanks