AS3 Basics: Where’s my hand cursor gone?

One of the first things you will notice when you start using Actionscript 3 is Movieclip’s no longer automatically invoke the hand cursor once you set a mouse event. Fortunately the solution is simple:

yourBtn.buttonMode=true;
yourBtn.useHandCursor=true;

Now if you just have a textfield inside your Movieclip you are probably wondering why that blasted hand cursor is still hiding from you. To solve this add:

yourBtn.mouseChildren=false;

Setting mouseChildern to false ignores the mouse clicks of all the children inside the Movieclip. What’s super handy about this property is you no longer need to included hidden hotspots as the whole text area becomes the hotspot (not just the text)

The discussion so far...
Yvo
2 years, 2 months ago

Great simple tip. Thanks for the share.

Quote

Gareth
2 years, 2 months ago

Yvo said: Great simple tip. Thanks for the share.

You’re welcome. Its one of the things that will drive you insane if you don’t know it.

Quote

workplace injury lawyers
8 months, 4 weeks ago

Please tell me that youre heading to keep this up! Its so very good and so important. I cant wait to read a lot more from you. I just feel like you know so a lot and know how to make people listen to what you have to say. This weblog is just as well cool to become missed. Great stuff, seriously. Please, PLEASE keep it up!

Quote

Hoselelsroarp
2 months ago

[url=http://angry-birds-online.it]Angry Birds[/url]

Quote



Leave a Reply

SEO Powered by Platinum SEO from Techblissonline