mouseChildren?
Posted: 06/02/08
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
Popular categories:
Recent posts:
- Mac OS find files using regex
- ADB device driver won't install
- Eclipse: An error has occurred. See the log file .metadata/.log
- Updated blinkbox iPad app
- Nexus 7 doesn't appear in adb devices list
- Improve the keyboard in the Samsung ICS update
- 403 Forbidden error on Mac web server
- Getting error with manually created NIB?
- Adding/removing items from PATH on Mac
- Presenting at Flash Oxford
- more...
Publications:
Places you'll find me:
Archive:
- March 2024
- February 2024
- January 2024
- December 2023
- November 2023
- October 2023
- September 2023
- August 2023
- July 2023
- June 2023
- May 2023
- April 2023