Funny, I couldn’t find the answer to this anywhere, either the answers are unrelated or they are overly complicated. So here is what I did:
var imageLoader:Loader = new Loader(); imageLoader.load(new URLRequest("path to your image/some image.png")); var button:Sprite = new Sprite(); button.addChild(imageLoader); button.buttonMode = true; button.useHandCursor = true; addChild(button);
THAT’S IT!!!
UPDATE:
There is a useful comment bellow by Dan and I thought I should include it in this post so it’s easier for everyone to get the info:
Dan:
To get it to work with a Movieclip you need to set the movieclip as button mode true.
If its the entire stage that needs the hand icon you can add to your script layer.
myMc.buttonMode = true; myMc.useHandCursor = true;
I use it with an Event listener to only use hand cursor on specific movieclips.
myMc.addEventListener(MouseEvent.ROLL_OVER,myMcOver); function myMcOver (e:MouseEvent):void { myMc.buttonMode = true; myMc.useHandCursor = true; }
I'm a programmer at 