T > TextField (object) |
![]() ![]() ![]() |
TextField (object)
All dynamic and input text fields in a Flash movie are instances of the TextField object. You can give a text field an instance name in the Property inspector and use the methods and properties of the TextField object to manipulate it with ActionScript. TextField instance names are displayed in the Movie Explorer and in the Insert Target Path dialog box in the Actions panel.
The TextField object inherits from the Object object.
To create a text field dynamically, you can use the MovieClip.createTextField
method.
The TextField object is supported by Flash Player 6 and later versions of the Flash Player.
Method Description Registers an object to receive notification when the Returns the depth of a text field. Gets the default text format assigned to newly inserted text. Removes a listener object. Removes a text field that was created with Sets a text format object for text that is inserted by a user or by a method. Replaces the current selection. Sets the default text format assigned to newly inserted text.
Method summary for the TextField object
onChanged
and oNScroller
events are invoked.
MovieClip.createTextField
.
Property Description The transparency value of a text field instance. Controls automatic alignment and sizing of a text field. Indicates if the text field has a background fill. Indicates the color of the background fill. Indicates if the text field has a border. Indicates the color of the border. The bottommost visible line in a text field. Indicates whether the text field uses embedded font outlines or device fonts. Indicates the rendering quality of the movie. The height of a text field instance in pixels. This only affects the bounding box of the text field, it does not affect the border thickness or text font size. Indicates the horizontal scroll value of a text field. Indicates the current maximun scrolling position of a text field. Contains the HTML representation of a text field's contents. The number of characters in a text field. The maximum number of characters that a text field can contain. The maximum value of The maximum value of Indicates if the text field contains multiple lines. The instance name of a text field instance. A reference to the instance that is the parent of this instance; either of type Button or MovieClip. Indicates if a text field hides the input characters. Indicates the rendering quality of a movie. The set of characters that a user can enter into a text field. The degree of rotation of a text field instance. Indicates the current scrolling position of a text field. Indicates whether a text field is selectable. The amount of time a sound must prebuffer before it streams. Indicates whether a movie clip is included in automatic tab ordering. Indicates the tab order of an object. The current text in the text field. The color of the current text in the text field. The height of the text field's bounding box. The width of the text field's bounding box. Indicates whether a text field is an input text field or dynamic text field. The URL of the SWF file that created the text field instance. The variable name associated with the text field. A Boolean value that determines whether a text field instance is hidden or visible. The width of a text field instance in pixels. This only affects the bounding box of the text field, it does not affect the border thickness or text font size. Indicates whether the text field word-wraps. The x coordinate of a text field instance The x coordinate of the cursor relative to a text field instance. The value specifying the percentage for horizontally scaling a text field instance. The y coordinate of a text field instance. The y coordinate of the cursor relative to a text field instance. The value specifying the percentage for vertically scaling a text field instance.
Property summary for the TextField object
TextField.hscroll
.
TextField.scroll
.
Method Description Invoked when the text field is changed. TextField.onKillFocus Invoked when the text field loses focus. Invoked when the Invoked when the text field receives focus.
Event handler summary for the TextField object
scroll
, maxscroll
, hscroll
, maxhscroll
, or
bottomscroll
property of a text field changes.
Method Description Notified when the text field is changed. Notified when the
Listener summary for the TextField object
scroll
or maxscroll
property of a text field changes.
![]() ![]() ![]() |