MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference page 702

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

If you are creating a text field based on the text metrics, use
rather than
textFieldHeight
and
rather than
.
height
textFieldWidth
width
The following figure illustrates these measurements.
When setting up your TextFormat object, set all the attributes exactly as they will be set for
the creation of the text field, including font name, font size, and leading. The default value for
leading is 2.
Availability: ActionScript 1.0; Flash Lite 2.0 - The width parameter is supported in Flash
Player 7.
Parameters
- A string.
text:String
[optional] - A number that represents the width, in pixels, at which the
width:Number
specified text should wrap.
Returns
- An object with the properties
,
,
,
,
,
Object
width
height
ascent
descent
textFieldHeight
.
textFieldWidth
Example
This example creates a single-line text field that's just big enough to display a text string using
the specified formatting.
var my_str:String = "Small string";
702
ActionScript classes

Advertisement

Table of Contents
loading

Table of Contents