A little while ago, we saw how to use the property htmlText of the TextField class to add a link to a text field with Actionscript 3.0.
That time, we did not use any event to tell Flash to redirect the user to a specific page. The event was included in the HTML tag <a> using the attribute ‘href’.
So, I ask myself, if I have a server script which returns the html text with the tag <a> but instead of using it to redirect the user to a web page, I would like to reuse it in my script for other means, how would I proceed?
In this tutorial, we will see how to use an HTML string with a tag <a> assigned at the property ‘htmlText’ of a text field but without, once clicked, the redirection to another web page.
Using, the event LINK of the TextEvent class, we can tell the function called by this event to start a given code still retrieving the url from the HTML tag <a>.
Let us see how to do it…










{ 0 comments… add one now }