You are correct. I changed the selectable to true and it works now. Thanks for your help.
--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote: > > I think by default those components do not have .selectable=true so > links are inactive off left-click. > > > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of maury.sword > Sent: Thursday, March 22, 2007 9:12 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] htmlText Bug in Label and UITextField > > > > When I try and embed an html link in the Label and UITextField > components the link does not work with a left mouse click but the > right click brings up the link contextMenu. Has anyone else run > across this problem ? This functionality works correctly in the > other text controls. > > Here's a simple app that demonstrates the bug and the correct > behavior of the other text controls. > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml > <http://www.adobe.com/2006/mxml> " > layout="absolute" creationComplete="creationCompleteHandler > (event)"> > > <mx:Script> > <![CDATA[ > import mx.controls.Label; > import mx.controls.RichTextEditor; > import mx.controls.Text; > import mx.controls.TextArea; > import mx.controls.TextInput; > import mx.core.UITextField; > > private function creationCompleteHandler(evt:Event):void { > var lblTest:Label = new Label(); > lblTest.width = 200; > lblTest.htmlText = "<a href=\"http://www.adobe.com > <http://www.adobe.com> \" > target=\"_blank\">Label Link</a> - Right Click only"; > addChild(lblTest); > > var tfTest:UITextField = new UITextField(); > tfTest.width = 200; > tfTest.y = 30; > tfTest.htmlText = "<a href=\"http://www.adobe.com <http://www.adobe.com> > \" > target=\"_blank\">UITextField Link</a> - Right Click only"; > addChild(tfTest); > > var txtTest:Text = new Text(); > txtTest.y = 60; > txtTest.htmlText = "<a href=\"http://www.adobe.com > <http://www.adobe.com> \" > target=\"_blank\">Text Link</a> - works"; > addChild(txtTest); > > var taTest:TextArea = new TextArea(); > taTest.height = 22; > taTest.y = 90; > taTest.width = 200; > taTest.htmlText = "<a href=\"http://www.adobe.com <http://www.adobe.com> > \" > target=\"_blank\">TextArea Link</a> - works"; > addChild(taTest); > > var tiTest:TextInput = new TextInput(); > tiTest.y = 120; > tiTest.width = 200; > tiTest.htmlText = "<a href=\"http://www.adobe.com <http://www.adobe.com> > \" > target=\"_blank\">TextInput Link</a> - works"; > addChild(tiTest); > > var rteTest:RichTextEditor = new RichTextEditor(); > rteTest.y = 150; > rteTest.width = 200; > rteTest.htmlText = "<a href=\"http://www.adobe.com > <http://www.adobe.com> \" > target=\"_blank\">RichTextEditor Link</a> - works"; > addChild(rteTest); > } > ]]> > </mx:Script> > </mx:Application> >