![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
Flash Player 6.
All dynamic and input text fields in a SWF file are instances of the TextField class. You can give a text field an instance name in the Property inspector and use the methods and properties of the TextField class 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 class inherits from the Object class.
To create a text field dynamically, you can use MovieClip.createTextField()
.
Method |
Description |
---|---|
|
Registers an object to receive notification when the |
|
Returns names of fonts on the player's host system as an array. |
|
Returns the depth of a text field. |
|
Gets the default text format assigned to newly inserted text. |
|
Returns a TextFormat object containing formatting information for some or all text in a text field. |
|
Removes a listener object. |
|
Removes a text field that was created with |
|
Replaces the current selection. |
|
Sets a TextFormat object for text that is inserted by a user or by a method. |
|
Sets a TextFormat object for a specified range of text in a text field. |
Property |
Description |
---|---|
TextField._alpha
|
The transparency value of a text field instance. |
TextField.autoSize
|
Controls automatic alignment and sizing of a text field. |
TextField.background
|
Indicates if the text field has a background fill. |
TextField.backgroundColor
|
Indicates the color of the background fill. |
TextField.border
|
Indicates if the text field has a border. |
TextField.borderColor
|
Indicates the color of the border. |
TextField.bottomScroll
|
The bottommost visible line in a text field. Read-only. |
TextField.embedFonts
|
Indicates whether the text field uses embedded font outlines or device fonts. |
TextField._height
|
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. |
TextField._highquality
|
Indicates the rendering quality of the SWF file. |
TextField.hscroll
|
Indicates the horizontal scroll value of a text field. |
TextField.html
|
Indicates the current maximum scrolling position of a text field. |
TextField.htmlText
|
Contains the HTML representation of a text field's contents. |
TextField.length
|
The number of characters in a text field. Read-only. |
TextField.maxChars
|
The maximum number of characters that a text field can contain. |
TextField.maxhscroll
|
The maximum value of |
TextField.maxscroll
|
The maximum value of |
TextField.menu
|
Associates a ContextMenu object with a text field. |
|
Indicates whether Flash Player should automatically scroll multiline text fields when the mouse pointer is positioned over a text field and the user rolls the mouse wheel. |
TextField.multiline
|
Indicates if the text field contains multiple lines. |
TextField._name
|
The instance name of a text field instance. |
TextField._parent
|
A reference to the instance that is the parent of this instance; either of type Button or MovieClip. |
TextField.password
|
Indicates if a text field hides the input characters. |
TextField._quality
|
Indicates the rendering quality of a SWF file. |
TextField.restrict
|
The set of characters that a user can enter into a text field. |
TextField._rotation
|
The degree of rotation of a text field instance. |
TextField.scroll
|
Indicates the current scrolling position of a text field. |
TextField.selectable
|
Indicates whether a text field is selectable. |
TextField._soundbuftime
|
The amount of time a sound must prebuffer before it streams. |
TextField.tabEnabled
|
Indicates whether a movie clip is included in automatic tab ordering. |
TextField.tabIndex
|
Indicates the tab order of an object. |
|
The target path of the specified text field instance. Read-only. |
TextField.text
|
The current text in the text field. |
TextField.textColor
|
The color of the current text in the text field. |
TextField.textHeight
|
The height of the text field's bounding box. |
TextField.textWidth
|
The width of the text field's bounding box. |
TextField.type
|
Indicates whether a text field is an input text field or dynamic text field. |
TextField._url
|
The URL of the SWF file that created the text field instance. Read-only. |
TextField.variable
|
The variable name associated with the text field. |
TextField._visible
|
A Boolean value that determines whether a text field instance is hidden or visible. |
TextField._width
|
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. |
TextField.wordWrap
|
Indicates whether the text field word-wraps. |
TextField._x
|
The x coordinate of a text field instance |
TextField._xmouse
|
The x coordinate of the pointer relative to a text field instance. Read-only. |
TextField._xscale
|
The value specifying the percentage for horizontally scaling a text field instance. |
TextField._y
|
The y coordinate of a text field instance. |
TextField._ymouse
|
The y coordinate of the pointer relative to a text field instance. Read-only. |
TextField._yscale
|
The value specifying the percentage for vertically scaling a text field instance. |
Event handler |
Description |
---|---|
Invoked when the text field is changed. |
|
Invoked when the text field loses focus. |
|
Invoked when one of the text field scroll properties changes. |
|
Invoked when the text field receives focus. |
Method |
Description |
---|---|
Notified when the text field is changed. |
|
Notified when the |
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |