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

Learning actionscript 2.0 in flash
Table of Contents

Advertisement

Font tag
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
following HTML code creates red text:
myText_txt.htmlText = "<font color='#FF0000'>This is red text</font>";
Specifies the name of the font to use. As shown in the following example, you can
face
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.
Specifies the size of the font, in pixels, as shown in the following example:
size
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.
Image tag
The
tag lets you embed external image files (JPEG, GIF, PNG), SWF files, and movie
<img>
clips inside text fields and TextArea component instances. Text automatically flows around
images you embed in text fields or components. To use this tag, you must set your dynamic or
input text field to be multiline and to wrap text.
To create a multiline text field with word wrapping, do one of the following:
In the Flash authoring environment, select a text field on the Stage and then, in the
Property inspector, select Multiline from the Text Type menu.
For a text field created at runtime with createTextField (MovieClip.createTextField
method), set the new text field instance's multiline (TextField.multiline property)
and multiline (TextField.multiline property) properties to
The
tag has one required attribute,
<img>
SWF file, or the linkage identifier of a movie clip symbol in the library. All other attributes
are optional.
) values are supported. For example, the
#FFFFFF
, which specifies the path to an image file, a
src
.
true
Using HTML-formatted text
439

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents