as3 - controlling flicker when scaling up a button or movieclip

Posted by sol on Stack Overflow See other posts from Stack Overflow or by sol
Published on 2009-09-09T18:36:48Z Indexed on 2010/03/25 5:03 UTC
Read the original article Hit count: 406

Filed under:
|
|
|
|

This is a situation I run into a lot but never seem to find a good solution. I have movieclips that I scale up slightly on rollover, but if you hover over the edge of the movieclip it just sits there and flickers, continuously receiving mouseOver and mouseOut events. How do you deal with this? Again, it's usually a problem when tweening the scale of a movieclip or button.

my_mc.addEventListener(MouseEvent.MOUSE_OVER, mOver);
my_mc.addEventListener(MouseEvent.MOUSE_OUT, mOut);

private function mOver(m:MouseEvent) {      		
   TweenLite.to(m.target, .2, { scaleX:1.1, scaleY:1.1} );
}

private function mOut(m:MouseEvent) {
   TweenLite.to(m.target, .2, { scaleX:1, scaleY:1} );
}

© Stack Overflow or respective owner

Related posts about as3

Related posts about movieclip