How do I display a hand cursor over a component in Flex?

by Niklas Richardson 6:07 pm Monday, 28 November 2005.

Displaying a hand cursor over a component in Flex 1.5 is fairly straightforward however you need to perform two things to get it to work. Use the following code on your component to make it work:

mouseOver="event.target.onRelease=null;event.target.useHandCursor=true;"

Unfortunately, you can’t just get away with using the useHandCursor=true, you must first specify event.target.onRelease=null.

Here it is in action:


And, here is the code:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" width="250" height="150" marginLeft="10" marginRight="10">

<mx:HBox width="200" height="100" backgroundColor="0xFFFFFF" mouseOver="event.target.onRelease=null;event.target.useHandCursor=true;" >
<mx:Text width="100%" text="Display Hand Cursor over this white box" />
</mx:HBox>

</mx:Application>

Comments (12)



Charlie Arehart presents BlueDragon at UKCFUG on Thursday 17 Nov

by Niklas Richardson 2:01 pm Wednesday, 16 November 2005.

Charlie Arehart, CTO of New Atlanta Communications will be giving an introduction to BlueDragon and will demonstrate how to deploy ColdFusion apps on .NET using BlueDragon. Also, New Atlanta are putting some money behind the bar for after meeting drinks!

Meeting Details: New Atlanta’s Charlie Arehart presents on BlueDragon

Comments (0)



MAX Day 1 & Day 2 Keynote Videos

by Niklas Richardson 10:02 am Tuesday, 1 November 2005.

The MAX 2005 conference Day 1 and Day 2 keynote videos are now online:

http://www.macromedia.com/macromedia/events/max/max2005/video/

Comments (0)