View comments | RSS feed

Anchor tag

The <a> tag creates a hypertext link and supports the following attributes:

For example, the following HTML code creates the link "Go home," which opens www.adobe.com in a new browser window:

urlText_txt.htmlText = "<a href='http://www.adobe.com' target='_blank'>Go home</a>";

You can use the special asfunction protocol to cause the link to execute an ActionScript function in a SWF file instead of opening a URL. For more information on the asfunction protocol, see asfunction protocol in the ActionScript 2.0 Language Reference.

You can also define a:link, a:hover, and a:active styles for anchor tags by using style sheets. See Styling built-in HTML tags.

NOTE

 

Absolute URLs must be prefixed with http://; otherwise, Flash treats them as relative URLs.


Flash CS3


Comments


noahhorton said on Feb 5, 2008 at 5:55 PM :
Anchor tags never seem to work if the containing Flash has allowscriptaccess set to never. It does not seem to matter what the target is for the a tag, the link just never works.
No screen name said on Apr 15, 2008 at 9:40 AM :
Does anyone know why there is a 128 character limit for url's???

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00000923.html