TextFormat class 717
Constructor for the TextFormat class
Availability
Flash Player 6.
Usage
new TextFormat([font, [size, [color, [bold, [italic, [underline, [url,
[target, [align, [leftMargin, [rightMargin, [indent, [leading]]]]]]]]]]]]])
Parameters
font
The name of a font for text as a string.
size An integer that indicates the point size.
color The color of text using this text format. A number containing three 8-bit RGB
components; for example, 0xFF0000 is red, 0x00FF00 is green.
bold A Boolean value that indicates whether the text is boldface.
italic A Boolean value that indicates whether the text is italicized.
underline A Boolean value that indicates whether the text is underlined.
url The URL to which the text in this text format hyperlinks. If url is an empty string, the text
does not have a hyperlink.
target The target window where the hyperlink is displayed. If the target window is an empty
string, the text is displayed in the default target window
_self. If the url parameter is set to an
empty string or to the value
null, you can get or set this property, but the property will have
no effect.
align The alignment of the paragraph, represented as a string. If "left", the paragraph is left-
aligned. If
"center", the paragraph is centered. If "right", the paragraph is right-aligned.
leftMargin Indicates the left margin of the paragraph, in points.
rightMargin Indicates the right margin of the paragraph, in points.
indent An integer that indicates the indentation from the left margin to the first character in
the paragraph.
leading A number that indicates the amount of leading vertical space between lines.
Returns
Nothing.
Description
Constructor; creates a TextFormat object with the specified properties. You can then change the
properties of the TextFormat object to change the formatting of text fields.
Any parameter may be set to
null to indicate that it is not defined. All of the parameters are
optional; any omitted parameters are treated as
null.