View Full Version : Buttons That Don't Change Cursor Into Hand
liquidgraph
06-23-2007, 08:47 AM
I've got some invisible buttons set up in Flash that I use to trigger events. However, I don't want the user's cursor to change to a hand icon when he/she rolls over these buttons. Can this default behavior be altered?
_Aerospace_Eng_
06-23-2007, 10:06 AM
What version of actionscript are you using? 2.0 or 3.0?
liquidgraph
06-23-2007, 07:41 PM
Actionscript 2. Sorry, should have mentioned that. But I'd like to know the Actionscript 3 solution as well, for future cases. :)
_Aerospace_Eng_
06-24-2007, 12:35 AM
For actionscript 2 you can use
instancename.useHandCursor = false;
For actionscript 3 to even make a button work you need to create a new Sprite since Actionscript 3 is a little more object oriented. You also need add an event listener to the button in order to trigger onmouseover or onmouseout.
var newbutton:Sprite = new Sprite();
newbutton.buttonMode = false; /*this is the part that causes the hand*/
newbutton.addChild(instancename);
addChild(newbutton);
this.instancename.addEventListener("mouseOver",doOver);
function doOver(evt:MouseEvent)
{
// do something
}
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.