MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH Manual page 438

Learning actionscript 2.0 in flash
Table of Contents

Advertisement

Anchor tag
The
tag creates a hypertext link and supports the following attributes:
<a>
A string of up to 128 characters that specifies the URL of the page to load in the
href
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
www.macromedia.com
Specifies the name of the target window where you load the page. Options
target
include
,
_self
_blank
in the current window,
the current frame, and
For example, the following HTML code creates the link "Go home," which opens
www.macromedia.com in a new browser window:
urlText_txt.htmlText = "<a href='http://www.macromedia.com'
target='_blank'>Go home</a>";
You can use the special
function in a SWF file instead of opening a URL. For more information on the
protocol, see asfunction protocol in the ActionScript 2.0 Language Reference.
You can also define
a:link
sheets. See
"Styling built-in HTML tags" on page
Absolute URLs must be prefixed with
URLs.
Bold tag
The
tag renders text as bold, as shown in the following example:
<b>
text3_txt.htmlText = "He was <b>ready</b> to leave!";
A bold typeface must be available for the font used to display the text.
Break tag
The
tag creates a line break in the text field. You must set the text field to be a multiline
<br>
text field to use this tag.
In the following example, the line breaks between sentences:
this.createTextField("text1_txt", 1, 10, 10, 200, 100);
text1_txt.html = true;
text1_txt.multiline = true;
text1_txt.htmlText = "The boy put on his coat.<br />His coat was <font
color='#FF0033'>red</font> plaid.";
438
Working with Text and Strings
; an example of a relative reference is
,
, and
_parent
_top
specifies a new window,
_blank
specifies the top-level frame in the current window.
_top
protocol to cause the link to execute an ActionScript
asfunction
,
, and
a:hover
a:active
http://
/index.html
. The
option specifies the current frame
_self
_parent
styles for anchor tags by using style
430.
; otherwise, Flash treats them as relative
http://
.
specifies the parent of
asfunction

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents