148
Chapter 8: Working with Text
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
“Formatting text with Cascading Style Sheets”
on page 139
.
Anchor tag (<a>)
The
<a>
tag creates a hyperlink and supports the following attributes:
•
href
Specifies the URL of the page to load in the browser. The URL can absolute or relative
to the location of the SWF file that is loading the page.
•
target
Specifies the name of the target window to load the page into.
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
a:link
,
a:hover
, and
a:active
styles for anchor tags by using style sheets.
See
“Styling built-in HTML tags” on page 143
.
Bold tag (<b>)
The
<b>
tag renders text as bold. A bold typeface must be available for the font used to display
the text.
<b>This is bold text.</b>
Break tag (<br>)
The
<br>
tag creates a line break in the text field, as shown in this example:
One line of text<br>Another line of text<br>
Font tag (<font>)
The
<font>
tag specifies a font or list of fonts to display the text.
The font tag supports the following attributes:
•
color
Only hexadecimal color (
#FFFFFF
) values are supported. For example, the following
HTML code creates red text.
<font color="#FF0000">This is red text</font>
•
face
Specifies the name of the font to use. You can also specify a list of comma-separated
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
TextField.embedFonts
on page 687
and “Setting dynamic and input text options” in Using Flash Help.
•
size
Specifies the size of the font, in pixels. You can also use relative point sizes (+2 or -4).
<font size="24" color="#0000FF">This is green, 24-point text</font>
Summary of Contents for FLASH MX 2004 - ACTIONSCRIPT
Page 1: ...ActionScript Reference Guide...
Page 8: ...8 Contents...
Page 12: ......
Page 24: ...24 Chapter 1 What s New in Flash MX 2004 ActionScript...
Page 54: ...54 Chapter 2 ActionScript Basics...
Page 80: ...80 Chapter 3 Writing and Debugging Scripts...
Page 82: ......
Page 110: ...110 Chapter 5 Creating Interaction with ActionScript...
Page 112: ......
Page 120: ...120 Chapter 6 Using the Built In Classes...
Page 176: ......
Page 192: ...192 Chapter 10 Working with External Data...
Page 202: ...202 Chapter 11 Working with External Media...
Page 204: ......
Page 782: ...782 Chapter 12 ActionScript Dictionary...
Page 793: ...Other keys 793 221 222 Key Key code...
Page 794: ...794 Appendix C Keyboard Keys and Key Code Values...
Page 798: ...798 Appendix D Writing Scripts for Earlier Versions of Flash Player...
Page 806: ...806 Appendix E Object Oriented Programming with ActionScript 1...
Page 816: ...816 Index...