Archive

Archive for November, 2009

AS3 mouseEnabled not working with nested Movieclips

November 2nd, 2009 jeff No comments

Had a little bit of a problem with mouseEnabled= false not working.

I had two movieclips. One was a button and one a ‘tooltip’ mc that was on top of the button. The button mc had mouseEvent listeners for mouseover and mouseout. Now the standard thing to do to stop recieving mouse interactivity on a display object is to set mouseEnabled = false. (It is set to true by default and stops you pressing ‘thru’ display objects) However it was not working. In my setup i had nested Moviclips but i had assumed setting this on the parent would affect all mouse ‘enabling’

The thing to use is:

mouseEnabled = false; //as well as
mouseChildren = false;

this should tell actionscript to stop listening to nested mc’s as well.

Post to Twitter Post to Facebook

Categories: Flash Tags:

Videos, Slideshows and Podcasts by Cincopa Wordpress Plugin