I still can't get the label to be clickable but I was able to add a "hyperlink".
Private function handleQryResult(evt:ResultEvent):void
{
...
(newItem as Label).text = 'business';
Formitem.addChild(newItem);
formitem.mouseChildren=false;
formitem.buttonMode=true;
formitem.useHandCursor=true;
formitem.setStyle('color','#0033ff');
formitem.data = 'www.google.com';
formitem.addEventListener(MouseEvent.CLICK,openWindow);
...
}
Private function openWindow(evt:Event):void
{
var myURL:String = evt.currentTarget.selectedItem.DATA.toString();
var url:URLRequest = new URLRequest(myURL);
navigateToURL(url, "_blank");
}
Tommy Geist
United Parcel Service
Program Management Group (PMG)
Atlas : 5 - 490 - 6418
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Laurence MacNeill
Sent: Sunday, April 12, 2009 9:01 PM
To: [email protected]
Subject: Re: [AFFUG Discuss] "clickable" label on a form...
At 08:23 PM 4/12/2009, you wrote:
>It would look more like this:
>
><mx:LinkButton id="myLink" label="My Url" click="myLinkUrl();" />
>
>
>And the AS:
>
>private function myLink():void
>{
> var myUrl:URLRequest = new URLRequest("http://www.myUrl.com");
>
>navigateToURL(myUrl, "_blank");
>
>}
>
>
>That should do it if you are just wanting a URL button.
So I can't change the destination programmatically, then? It has to be
hard-coded?
-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line
For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------
-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the
subject line
For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------