![MACROMEDIA Flash Lite 2 Скачать руководство пользователя страница 702](http://html1.mh-extra.com/html/macromedia/flash-lite-2/flash-lite-2_reference_687553702.webp)
702
ActionScript classes
If you are creating a text field based on the text metrics, use
textFieldHeight
rather than
height
and
textFieldWidth
rather than
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
text
:
String
- A string.
width
:
Number
[optional] - A number that represents the width, in pixels, at which the
specified text should wrap.
Returns
Object
- An object with the properties
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";
Содержание Flash Lite 2
Страница 1: ...Flash Lite 2 x ActionScript Language Reference...
Страница 22: ...22 Contents...
Страница 244: ...244 ActionScript language elements...
Страница 760: ...760 ActionScript classes...