Mouse listener

Hi

I am having problems setting up a mouse listener to control onRollOver and onRollOut stats of 9 different mc’s. The mc’s all have nested button so it’s not possible to use simple onRollOver and onRollOut since this would disable the button actions.

So far my code looks this:

var mouseListener1:Object = new Object();
mouseListener1.onMouseMove = function() {
if (pol_1.hitTest(_xmouse, _ymouse, true)) {
whichBtn = “pol_1”
} else {
TweenMax.to(pol_1,0.5,{transformMatrix: {_xscale:90, _yscale:90}});
}
};
Mouse.addListener(mouseListener1);

I have set up 9 different listeners and the code works. But the the animation is not smooth.

I hope some here has an idea on how to set up just 1 listener to control which of the 9 mc is rollOver / rollOut.

Many thanks :slight_smile: