How to trigger an event when clicking a '<A href' tag in dynamic text box?

I need to track href links in a dynamic textField. ie the text is loaded as XML. So somehow I need to listen for an event when this a href tag is clicked in the dynamic textField.

Any suggestions?

Answers


You can dispatch events from link the following way:

<a href='event:http://www.adobe.com'>Navigate to Adobe.com.</a>

Then listen to TextEvent.LINK.

textField.addEventListener(TextEvent.LINK, linkHandler);

public function linkHandler(event:TextEvent):void {                
    // Open the link in a new browser window.
    navigateToURL(new URLRequest(event.text), '_blank')
}

Read more.


Need Your Help

adding a .where to check items

c# asp.net-mvc linq

I am currently getting a list of types depending on the dropdown of the page. My issue is that i need to check in the controller if the item is active or not before displaying in the dropdown list....