
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
994
|
Appendix E: HTML Support in Text Fields
<FONT> (Font Control)
The <FONT> tag supports the following three attributes:
FACE
The
FACE attribute specifies the name of the font to use. In Flash 6, a list of multi-
ple font faces can also be used (as in HTML), though this feature is undocu-
mented. Flash attempts to render the first available font listed in the
FACE attribute.
For example, in the code
<FONT FACE="Arial,Helvetica">my text</FONT>, Flash
will render “my text” in Helvetica if Arial is missing but Helvetica is present. See
TextFormat.font for details. For a function that picks an appropriate font from the
user’s system, see TextField.getFontList().
SIZE
The
SIZE attribute specifies the size of the tagged text as a fixed point size (such
as
<FONT SIZE="18">) or as a relative size. Relative point sizes are preceded by a +
or – sign and are specified relative to the text size in the text field Property
inspector. For example, if the point size is 14 in the Property inspector, then
<FONT SIZE="–2"> displays the tagged text at 12-point. See also TextFormat.size.
COLOR
The
COLOR attribute specifies the color of the tagged text, as a hexadecimal num-
ber, preceded by the pound sign (#)—for example,
<FONT COLOR="#FF0000">this
is red text</FONT>
. Specify the hexadecimal number as an RGB series ...