While working on a recent Flex project I found a code sample that someone created because they were having trouble getting the useHandCursor to work. It was pretty obvious what they were trying to do, take a look:
<mx:Canvas width="176" height="87"> <mx:Link height="100%" width="100%" /> <mx:Image width="100%" height="100%" source="@Embed(''images/logo.swf'')" mouseDown="doThis()" /> </mx:Canvas>
They obviously wanted to call an event handler when someone clicked on the image, but because they couldn”t get useHandCursor to work, they used an alternative method, albeit not all that pretty.
The solution is rather simple though. Just add a mouseOver event to the component and set it to the following:
Works pretty much anywhere.
UPDATED For Flex 2:
You may have noticed that the above does not work in Flex 2. This process has been replaced. It is now done through a set of properties that are inherited from the Sprite class.
Add these properties to your component and you”re all set. Now, that was easy!