mouseChildren?

Posted: 06/02/08

An image of mouseChildren?

Yet another quirk of buttonMode in AS3.0 is the art of getting your MovieClips to behave like buttons to useHandCursor. Simply setting buttonMode=true will only partially solve the problem, and leave you with a display object that doesn't implement a hand cursor over all of the contents. Instead, set the MovieClip.mouseChildren property to false, and this should make the hand cursor apply to the whole MovieClip, children and all! Also, using this technique won't cause the hand cursor to flicker on and off when you roll onto areas of your MovieClip that don't have child display objects (no need for fudging the hitArea).

So in summary

MovieClip.buttonMode=true;

MovieClip.mouseChildren=false;

Keywords for this post: flash, actionscript 3, mouse, hand cursor, movieclip, hitarea