If I set the mouseEnabled property of a button to false, it automatically triggers the MOUSE_OUT (and ROLL_OUT) event.
Is there a way of avoiding this? I don't want any events to be active after setting this property. I attached an FLA, also here is the code:
Actionscript Code:
exterior_btn.addEventListener(MouseEvent.CLICK, Click);
exterior_btn.addEventListener(MouseEvent.ROLL_OVER, Rollover);
exterior_btn.addEventListener(MouseEvent.ROLL_OUT, Rollout);
exterior_btn.mouseChildren = false;
exterior_btn.buttonMode = true;
exterior_btn.useHandCursor = true;
function Rollover(e:MouseEvent):void
{
trace('Rollover');
}
function Rollout(e:MouseEvent):void
{
//trace('\n'+e+'\n');
trace('Rollout');
}
function Click(e:MouseEvent):void
{
exterior_btn.mouseEnabled = false;
}
Thanks