PDA

View Full Version : Child MovieClips interfering with Mouse Events?!


moopa
05-18-2008, 07:15 PM
I have a movieClip in the library called btnGetStarted. This movie comprises of other movieclips:-
outer
inner
textLabel

If i put an instance of btnGetStarted on the stage and do something like:-

btnGetStarted.buttonmode = true;
btnGetStarted.addEventListener(MouseEvent.MOUSE_OV ER,btnGetStartedOverHandeler);
public function btnGetStartedOverHandeler(e:MouseEvent):void
{
trace("Mouse over");
}

when the mouse moves over each element the event will end and if the mouse goes over the textLabel (dynamic text) it will stop.
Why is this??

Thanks

moopa
05-18-2008, 07:30 PM
I worked this out for anyone having a similar problem

You should add

btnGetStarted.mouseChildren = false;

This makes only the parent fire the event.

Cheers