Parameters
A string.
text
An optional number that represents the width, in pixels, at which the specified text
width
should wrap.
Returns
An object with the properties
textFieldWidth
Description
Method; returns text measurement information for the text string
. The text string is treated as plain text (not HTML).
my_fmt
The method returns an object with six properties:
textFieldHeight
If a
parameter is specified, word wrapping is applied to the specified text. This lets you
width
determine the height at which a text box shows all of the specified text.
The
and
ascent
baseline for a line of text. The baseline for the first line of text is positioned at the text field's
origin plus its
ascent
The
and
width
height
textFieldHeight
for a text field object to display the entire text string. Text fields have a 2-pixel-wide "gutter"
around them, so the value of
value of
textFieldWidth
If you are creating a text field based on the text metrics, use
and
height
textFieldWidth
The following figure illustrates these measurements.
720
Chapter 12: ActionScript Dictionary
,
width
height
.
, and
textFieldWidth
measurements provide, respectively, the distance above and below the
descent
measurement.
measurements provide the width and height of the text string. The
and
textFieldWidth
textFieldHeight
is always equal to the value of
rather than
,
,
ascent
descent
,
ascent
descent
. All measurements are in pixels.
measurements provide the height and width required
is equal the value of
width
textFieldHeight
.
width
,
,
textFieldHeight
in the format specified by
text
,
,
,
width
height
+ 4; likewise, the
height
+ 4.
rather than
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?
Questions and answers