Flash CS3 Documentation |
|||
| Learning ActionScript 2.0 in Adobe Flash > Working with Text and Strings > Using HTML-formatted text > About supported HTML tags > Font tag | |||
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:myText_txt.htmlText = "<font color='#FF0000'>This is red text</font>";
face Specifies the name of the font to use. As shown in the following example, you can specify a list of comma-delimited font names, in which case Flash Player selects the first available font:myText_txt.htmlText = "<font face='Times, Times New Roman'>Displays as either Times or Times New Roman...</font>";
If the specified font is not installed on the user's computer system or isn't embedded in the SWF file, Flash Player selects a substitute font.
For more information on embedding fonts in Flash applications, see embedFonts (TextField.embedFonts property) in the ActionScript 2.0 Language Reference and "Setting dynamic and input text options" in Using Flash.
size Specifies the size of the font, in pixels, as shown in the following example:myText_txt.htmlText = "<font size='24' color='#0000FF'>This is blue, 24-point text</font>";
You can also use relative point sizes instead of a pixel size, such as +2 or -4.
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00000926.html