[flexcoders] how to make a hyperlink in text call a function

2006-10-11 Thread hank williams
I want to have a block of text that executes a function when the user clicks the hyperlink. Could someone give me an example or point me to the proper formatting. Thanks Hank -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives:

Re: [flexcoders] how to make a hyperlink in text call a function

2006-10-11 Thread Prakaz
You can accomplish this in Flex 2 by using the TextEvent class: http://livedocs.macromedia.com/flex/2/langref/flash/events/TextEvent.html from livedocs: import flash.text.TextField;import flash.events.TextEvent; var tf:TextField = new TextField();tf.htmlText = a href=''Click Me./a;

Re: [flexcoders] how to make a hyperlink in text call a function

2006-10-11 Thread hank williams
Thanks a lot! Just what I needed.Regards,HankOn 10/11/06, Prakaz [EMAIL PROTECTED] wrote: You can accomplish this in Flex 2 by using the TextEvent class: http://livedocs.macromedia.com/flex/2/langref/flash/events/TextEvent.html from livedocs: import flash.text.TextField;import

Re: [flexcoders] how to make a hyperlink in text call a function

2006-10-11 Thread hank williams
I tried this but I am not sure how to use a TextField in flex. I cant add a TextField to a UIComponent because UIComponent.addChild expects a UIComponent as a parameter. How can I integrate these.Hank On 10/11/06, hank williams [EMAIL PROTECTED] wrote: Thanks a lot! Just what I

Re: [flexcoders] how to make a hyperlink in text call a function

2006-10-11 Thread hank williams
Nevermind. Just listening for a link event on a mx:Text component works fine even though there is no listed link event for an mx.control.Text object. I would imagine the reason for this is that the event bubbles from the internal textField. HankOn 10/11/06, hank williams [EMAIL PROTECTED]