Using the TextInput component
You can use a TextInput component wherever you need a single-line text field. If you need a
multiline text field, use the
component as a password field in a form. You could also set up a listener that checks if the
field has enough characters when a user tabs out of the field. That listener could display an
error message indicating that the proper number of characters must be entered.
TextInput parameters
You can set the following authoring parameters for each TextInput component instance in
the Property inspector or the Component inspector (Window > Component Inspector
menu option):
editable
indicates whether the TextInput component is editable (
default value is
.
true
password
indicates whether the field is a password field (
value is
.
false
text
specifies the contents of the TextInput component. You cannot enter carriage returns in
the Property inspector or the Component inspector. The default value is "" (an empty string).
You can set the following additional parameters for each TextInput component instance in the
Component inspector (Window > Component Inspector):
maxChars
is the maximum number of characters that the text input field can contain. The
default value is
null
restrict
indicates the set of characters that a user can enter in the text input field. The default
value is
. See
undefined
enabled
is a Boolean value that indicates whether the component can receive focus and input.
The default value is
true
visible
is a Boolean value that indicates whether the object is visible (
The default value is
true
The minHeight and minWidth properties are used by internal sizing routines. They are
defined in UIObject, and are overridden by different components as needed. These
properties can be used if you make a custom layout manager for your application.
Otherwise, setting these properties in the Component inspector has no visible effect.
You can write ActionScript to control these and additional options for the TextInput
component using its properties, methods, and events. For more information, see
class" on page
1214.
1210
TextInput component
TextArea
component. For example, you could use a TextInput
(meaning unlimited).
"TextInput.restrict" on page
.
.
) or not (
true
) or not (
true
false
1229.
true
). The
false
). The default
) or not (
).
false
"TextInput
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?