Recipe 9.14. Hiding the Hand Cursor


Problem

You want Flash to continue to display the arrow mouse icon instead of the hand icon even when the mouse is moved over a button (or movie clip acting as a button).

Solution

Set the useHandCursor property to false for all the movie clips and buttons for which you wish Flash to continue to use the arrow icon.

Discussion

The default behavior for Flash is that when the user moves the mouse over any button instance or any movie clip instance with button event handlers, the cursor changes from the arrow icon to a hand icon. However, it is possible for you to tell Flash to retain the arrow icon throughout by setting the useHandCursor property for the button and movie clip instances. For example, if you want Flash to retain the arrow icon even when the user moves the mouse over a button instance named btSubmit, you can use the following code on a keyframe within the timeline in which the button instance exists:

 btSubmit.useHandCursor = false; 

If at a later point you want Flash to use the hand cursor again when the user moves the mouse over objects, you can set the useHandCursor property to true again.




Flash 8 Cookbook
Flash 8 Cookbook (Cookbooks (OReilly))
ISBN: 0596102402
EAN: 2147483647
Year: 2007
Pages: 336
Authors: Joey Lott

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net