You could use a button and define the skins to be the same graphic (so
it doesnt change like a button normally would when its state changes):
Button {
upSkin:Embed("../assets/mygraphic.jpg");
downSkin:Embed("../assets/mygraphic.jpg");
overSkin:Embed("../assets/mygraphic.jpg");
}
THen you just specify the click handler as you would with any button:
<mx:Button id="b1" click="doSomething()"/>
Just dont specify a label for the button. That will muck up the sizing
of the button and the text will bleed through your image.
hth,
matt horn
flex docs
> -----Original Message-----
> From: [email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of Henry
> Sent: Thursday, July 06, 2006 8:37 AM
> To: [email protected]
> Subject: [flexcoders] Using and image as a link
>
> I have been trying to get and image to go to a URL on a
> click. I am sure that I am making this harder than it should
> be. However i would like to know how you guys/gals might be
> doing this. I was trying to use an actionscript function that
> is predefined in Flash, but that does not seem to work.
>
> Do I need to create my own actionscript for this?, or is
> there something i am missing that is super simple?
>
> Thanks so much for your help!
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/