I got the answer to this question...

for those who are trying to achieve the same.. here's the code: (NOT 
MINE). This was given to me by "brendansjunk"

MXML code:

        import flash.net.URLRequest;  
        import flash.events.MouseEvent;  

        public function goToURL(event:MouseEvent):void
        {
        var request:URLRequest = new URLRequest();
        request.url = LinkImage(event.currentTarget).imageURL;
        navigateToURL(request, "_top");
        }



<com:LinkImage source="{rp2.currentItem.thumb}" buttonMode="true" 
imageURL="{rp2.currentItem.vkey}" click="goToURL(event)" />


LinkImage.as code:
package
{
        import mx.controls.Image;

        public class LinkImage extends Image
        {
                
                public var imageURL:String;
                
        }
}

the only reason I'm putitng this code here is to help others who may 
be looking to do the same ....
Rohan Pinto


--- In flexcoders@yahoogroups.com, "Rohan Pinto" <[EMAIL PROTECTED]> wrote:
>
> how to i hyperlink an image in flex ?
> 
> my code has the following:
> <mx:Image width="120" height="90" id="ThumbNail" 
> source="{rp2.currentItem.thumb}" completeEffect="{fadeIn}"/>
> 
> I'd like to "invoke" a URL when a user clicks on it... how could i 
> achieve that ?
>


Reply via email to