User Guide
164 Chapter 2: ActionScript Language Reference
Button.useHandCursor
Availability
Flash Player 6.
Usage
my_btn.useHandCursor:Boolean
Description
Property; a Boolean value that, when set to true (the default), indicates whether a pointing hand
(hand cursor) displays when the mouse rolls over a button. If this property is set to
false, the
arrow pointer is used instead.
You can change the
useHandCursor property at any time; the modified button immediately takes
on the new cursor behavior. The
useHandCursor property can be read out of a prototype object.
Example
Create two buttons on the Stage with the instance names myBtn1_btn and myBtn2_btn. Enter
the following ActionScript in Frame 1 of the Timeline:
myBtn1_btn.useHandCursor = false;
myBtn1_btn.onRelease = buttonClick;
myBtn2_btn.onRelease = buttonClick;
function buttonClick() {
trace(this._name);
}
When the mouse is over and clicks myBtn1_btn, there is no pointing hand. However, you see the
pointing hand when the button is over and clicks
myBtn2_btn.