Chapter 44: text object – Adobe Extending Flash Professional CS4 User Manual
Page 458
436
Chapter 44: Text object
Inheritance
> Text object
Availability
Flash MX 2004.
Description
The Text object represents a single text item in a document. All properties of the text pertain to the entire text block.
To set properties of a text run within the text field, see the Property summary for the
. To change
properties of a selection within a text field, you can use
or use the current selection.
To set generic properties of the selected text field, use
. The following example
sets the
x
value of the selected text field's registration point to 50:
fl.getDocumentDOM().setElementProperty("x", 50);
Method summary
In addition to the Element object methods, the following methods are available for the Text object:
Property summary
In addition to the Element object properties, the following properties are available for the Text object:
Method
Description
Retrieves the specified attribute for the text identified by the optional
startIndex
and
endIndex
parameters.
Retrieves the specified range of text.
Sets the specified attribute associated with the text identified by
startIndex
and
endIndex
.
Changes the text string within this Text object.
Property
Description
A string that is equivalent to the Name field in the Accessibility panel.
A float value that specifies the anti-aliasing sharpness of the text.
A float value that specifies the anti-aliasing thickness of the text.
A Boolean value that controls the expansion of the bounding width for static text fields
or the bounding width and height for dynamic or input text.
A Boolean value that controls whether Flash shows (
true
) or hides (
false
) a border
around dynamic or input text.
A string that is equivalent to the Description field in the Accessibility panel.
A string that specifies characters to embed. This is equivalent to entering text in the
Character Embedding dialog box.