Thursday 8 May 2008 @ 6:15 pm
You want your Image to behave like a Button with a hand-cursor?
Set buttonMode and useHandCursor to “true” and that’s it:
[Bindable] [Embed(source="/path/to/my/image.png")] private var myIcon:Class; private function handleImageClick(event:Event):void { // your click handler code } <mx:Image source="{myIcon}" useHandCursor="true" buttonMode="true" click="handleImageClick(event)" />








Yeah, you have to set BOTH too, which is what a spent an hour of my life figuring out a while back.
You can do this with most components, just make sure that you also set the mouseChildren to false if the component has children. Particularly if the component has a text child, like Label.