Flash CS3 Documentation |
|||
| Extending Flash > Objects > Text object | |||
Inheritance Element object > Text object
Flash MX 2004.
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 Property summary for the TextRun object. To change properties of a selection within a text field, you can use document.setElementTextAttr() and specify a range of text, or use the current selection.
To set text properties of the selected text field, use document.setElementProperty(). The following example assigns the currently selected text field to the variable textVar:
fl.getDocumentDOM().setElementProperty("variableName", "textVar");
In addition to the Element object methods, you can use the following methods with the Text object:
|
Method |
Description |
|---|---|
|
Retrieves the specified attribute for the text identified by the optional |
|
|
Retrieves the specified range of text. |
|
|
Sets the specified attribute associated with the text identified by |
|
|
Changes the text string within this Text object. |
In addition to the Element object properties, the following properties are available for the 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 ( |
|
|
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 Options dialog box. |
|
|
A string that consists of delimited integers that correspond to the items that can be selected in the Character Options dialog box. |
|
|
A string that specifies the rendering mode for the text. |
|
|
Read-only; an integer that represents the number of characters in the Text object. |
|
|
A string that sets the line type to |
|
|
An integer that specifies the maximum characters the user can enter into this Text object. |
|
|
A string that specifies the orientation of the text field. |
|
|
A Boolean value that controls whether Flash draws the text as HTML and interprets embedded HTML tags. |
|
|
A Boolean value that controls whether the text can ( |
|
|
A Boolean value that controls whether the text can ( |
|
|
A zero-based integer that specifies the offset of the end of a text subselection. |
|
|
A zero-based integer that specifies the offset of the beginning of a text subselection. |
|
|
A string that is equivalent to the Shortcut field in the Accessibility panel. |
|
|
A Boolean value that specifies whether the object is accessible. |
|
|
An integer that is equivalent to the Tab Index field in the Accessibility panel. |
|
|
Read-only; an array of TextRun objects. |
|
|
A string that specifies the type of text field. Acceptable values are |
|
|
A Boolean value. A value of |
|
|
A string that contains the contents of the Text object. |
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00004464.html