The following example shows how you can display a hand cursor when the user’s mouse is over the Button component instance by setting the useHandCursor property to true.
Full code after the jump.
// ActionScript 3.0 import fl.controls.Button; var myButton:Button = new Button(); myButton.label = "useHandCursor = true"; myButton.width = 160; myButton.move(10, 10); myButton.useHandCursor = true; addChild(myButton);
{ 2 comments… read them below or add one }
There’s no such thing as a button in Actionscript 3. Replaced by SimpleButton.
rootfroot:
They most certainly do exist.
The code above assumes a Button Component Instance, as cited, somewhere either in the library or on the stage.
In a similar vein, if one is drawing buttons from scratch from movie clips, applying the following code will allow for the hand cursor:
myClip_mc.buttonMode = true;
myClip_mc.useHandCursor = true;