Flash CS3 Documentation |
|||
| Learning ActionScript 2.0 in Adobe Flash > Working with Text and Strings > Using HTML-formatted text > About supported HTML tags > Anchor tag | |||
The <a> tag creates a hypertext link and supports the following attributes:
href A string of up to 128 characters that specifies the URL of the page to load in the browser. The URL can be either absolute or relative to the location of the SWF file that is loading the page. An example of an absolute reference to a URL is http://www.adobe.com; an example of a relative reference is /index.html.target Specifies the name of the target window where you load the page. Options include _self, _blank, _parent, and _top. The _self option specifies the current frame in the current window, _blank specifies a new window, _parent specifies the parent of the current frame, and _top specifies the top-level frame in the current window.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 |
Flash CS3
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
Comments
noahhorton said on Feb 5, 2008 at 5:55 PM : No screen name said on Apr 15, 2008 at 9:40 AM :