PDA

View Full Version : Movie Clip Hit state Problem



adnan794
February 4th, 2009, 09:46 AM
Hi

I have a movie clip for which I am listening for mouse out,over and click event inside that movie clip I HAVE another movieclip called tooltip for which I am not listening for any events

the code that i AM using to achieve that



tooltip.mouseEnabled = false;
tooltip.mouseChildren = false;
But for some reason its not stopping the event from firing and I get a very strage behaviour.

Please see the attached image file.

Thanks in advance for the help

cbeech
February 4th, 2009, 09:53 AM
if you want the 'other' movie not to receive events you'd need to apply mouseEnabled=false to it, not the tooltip - is that what you mean?

adnan794
February 4th, 2009, 10:04 AM
yes I have done that If you see the attached image. tool tip is inside the main MC button clip

here is the code on the main timeline


mainButton.addEventListener(MouseEvent.MOUSE_OVER, onOver);
mainButton.addEventListener(MouseEvent.MOUSE_OUT, onOut);

function onOver(event:MouseEvent)
{
mainButton.gotoAndPlay("over");
trace("over")

}
function onOut(event:MouseEvent)
{
mainButton.gotoAndPlay("out");
trace("out")

}

cbeech
February 4th, 2009, 10:27 AM
ahhh - i see ;) it's member of the button clip - so you need to apply mouseChildren = false - to the 'container' mainButton mc, and mouseEnabled false to the tootip.

adnan794
February 4th, 2009, 10:48 AM
Thanks Cbeech I was about to reply that I sorted it out usind the same thing you just said mouseChildren = false and yes its working

Thanks you saved my day:)

Cheers