Products

Products
Viewing By Entry / Main
April 18, 2006

Clickable images in Flex 1.5

Far too long I haven't put anything in my blog and today it changes. I'll put anything useful in here when I come upon it and try to grow it like I envisioned from the beginning. So expect a lot of little tid bits from small things you already know to bigger or lesser known things.

Try as you may to use 'click' attribute in the mx:Image tag and it will not work. Then how do you make the image 'clickable'? First use a Canvas the size of your image, then put in a Link the same size with no label, then put in your image. Give the link the 'click' action to take.

<mx:Canvas width="727" height="595">
<mx:Link id="homeImageLink" width="727" height="595" click="_level0.fedexchangeViewStack.selectedIndex = 1;" />
<mx:Image source="@Embed('images/fedex_home_draft.jpg')" id="homeImage" width="727" height="595"
showEffect="fadeInEffect"
visible="false"
creationComplete="homeImage.visible=true"
mouseOver="event.target.useHandCursor=true;" />

</mx:Canvas>

I also included the code to give your image a hand.

Comments

Does the Image really need the useHandCursor statement? Seems like the Link already takes care of that. Setting it to false still gives me the hand.

Great solution, but shocking to understand such trick is necessary for such common web functionality!! :(


<mx:Image source="@Embed('images/fedex_home_draft.jpg')" useHandCursor="true" buttonMode="true" click="_level0.fedexchangeViewStack.selectedIndex = 1;" />


When the wolf [url=http://www.game4power.com/]wow gold [/url] finally found the hole

[url=http://www.game4power.com]Buy Wow Gold[/url] in the chimney he

[url=http://www.wowgoldone.com/]Cheap WoW Gold[/url] crawled down and KERSPLASH right into

that kettle of water [url=http://www.wowgoldone.com/]cheapest wow gold[/url] and that was

the end of his troubles with the big bad wolf.
[url=http://www.game4power.com/]game4power[/url],[url=http://www.game4power.com/buy-gold/]

buy cheap wow gold [/url]
[url=http://www.meinwowgold.com/]WOW GOLD[/url]
The next day the [url=http://www.game4power.com/buy-gold/]wow gold cheap[/url] little pig

invited his mother over . She said "You see it is just as [url=http://www.game4power.com/]

buy gold wow[/url]I told you. The way to [url=http://www.
itemchannel.com]Wow Gold[/url]get along in the world is to do things as well as you can."

Fortunately for that [url=http://www.itemchannel.com]world of warcraft gold [/url] little

pig, he [url=http://www.game4power.com/buy-gold]Cheapest wow Gold[/url]learned that lesson.

And he just lived happily ever after!


http://www.wowgoldone.com
http://www.game4power.com



Copyright © 2005-2006 Clint Willard. All rights reserved.
Aura skin for Clint Willard's BlogCFC inspired by Brooks Bilson's Bolg.
All trademarks property of their owners.