The text after "event:" will be the text sent on he TextEvent (the link event).
2- The TextArea must have the "selectable" property set to TRUE (the default value), otherways the "link" event will not be dispatched (even if you see the handCursor when you roll over the link).
Here you can see a very basic Applcation using this feature:
[Bindable] privatevarhtmlText : String = "Ey mate! Yo should check out this really" + " <u><a href='event:http://www.theriadeveloper.com'>nice Flex blog!</a></u>"
I have been looking a bit deeper on this matter and unfortunately the Link event you need is implemented in the TextItem inside the TextArea and its not accessible from outside, so unfortunately you will need to create your own custom component for this.
You can find some tips on making custom components here:
Thanks for your help! I spent at least 2 hours trying to find a way to allow my link to dispatch an event and all what I had to do was set the selectable property to true.
Hi juanargento! Glad it helped! I have to try and update my blog a bit more often :-S I have lots of things about Flex 4 to talk about, but I just don´t have much time :(
Is there any way to get the event to send on rollover instead of on click?
ReplyDeleteHello Anonymous, thak you for your comment.
ReplyDeleteI have been looking a bit deeper on this matter and unfortunately the Link event you need is implemented in the TextItem inside the TextArea and its not accessible from outside, so unfortunately you will need to create your own custom component for this.
You can find some tips on making custom components here:
http://www.theriadeveloper.com/2008/03/creating-custom-flex-components-from.html
Best
Thanks for the reply. I will look into this.
ReplyDeleteThanks for your help! I spent at least 2 hours trying to find a way to allow my link to dispatch an event and all what I had to do was set the selectable property to true.
ReplyDeleteSaludos desde Argentina
Hi juanargento! Glad it helped! I have to try and update my blog a bit more often :-S I have lots of things about Flex 4 to talk about, but I just don´t have much time :(
ReplyDeleteThank you very much for your comment!
Un saludo para todo Argentina! :)