When I roll over a mc an enter frame triggers a function that is designed to evaluate when the mouse moves off the mc...how do you test for the opposite of a hitTest? I though in an "!", but didn't work.
PHP Code:
var buttonTarget:String = "targetMarkets_mc";
root[buttonTarget].addEventListener(MouseEvent.MOUSE_OVER, overHandler);
function overHandler (event:MouseEvent){
root[buttonTarget].gotoAndStop ("active");
root[buttonTarget].addEventListener(MouseEvent.MOUSE_MOVE, mouseEval);
};
function mouseEval (event:MouseEvent) {
if (!root[buttonTarget].hitTestPoint (mouseX, mouseY, true)) {
root[buttonTarget].gotoAndStop ("inactive");
root[targetMC].removeEventListener (MouseEvent.MOUSE_MOVE, mouseEval);
}
};
Also, how do you remove the event listener? Is there a need?