Supported HTML tags
This section lists the built-in HTML tags supported by Flash Player. You can also create new
styles and tags using Cascading Style Sheets; see
on page
139.
Anchor tag (<a>)
The
tag creates a hyperlink and supports the following attributes:
<a>
•
Specifies the URL of the page to load in the browser. The URL can absolute or relative
href
to the location of the SWF file that is loading the page.
•
Specifies the name of the target window to load the page into.
target
For example, the following HTML snippet creates the link "Go home," which opens
www.macromedia.com in a new browser window.
<a href="../home.htm" target="_blank">Go home</a>
You can also define
See
"Styling built-in HTML tags" on page
Bold tag (<b>)
The
tag renders text as bold. A bold typeface must be available for the font used to display
<b>
the text.
<b>This is bold text.</b>
Break tag (<br>)
The
tag creates a line break in the text field, as shown in this example:
<br>
One line of text<br>Another line of text<br>
Font tag (<font>)
The
tag specifies a font or list of fonts to display the text.
<font>
The font tag supports the following attributes:
•
Only hexadecimal color (
color
HTML code creates red text.
<font color="#FF0000">This is red text</font>
•
Specifies the name of the font to use. You can also specify a list of comma-separated
face
font names, in which case Flash Player chooses the first available font. If the specified font is
not installed on the playback system, or isn't embedded in the SWF file, then Flash Player
chooses a substitute font.
Example:
<font face="Times, Times New Roman">This is either Times or Times New
Roman..</font>
For more information on embedding fonts in Flash applications, see
on page 687
and "Setting dynamic and input text options" in Using Flash Help.
•
Specifies the size of the font, in pixels. You can also use relative point sizes (+2 or -4).
size
<font size="24" color="#0000FF">This is green, 24-point text</font>
148
Chapter 8: Working with Text
,
, and
a:link
a:hover
#FFFFFF
"Formatting text with Cascading Style Sheets"
styles for anchor tags by using style sheets.
a:active
143.
) values are supported. For example, the following
TextField.embedFonts
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?
Questions and answers