Textinput.maxchars - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

TextInput.maxChars

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
textInputInstance.maxChars
Description
Property; the maximum number of characters that the text field can contain. A script may
insert more text than the
property allows; this property indicates only how much
maxChars
text a user can enter. If this property is
, there is no limit to the amount of text a user can
null
enter. The default value is
.
null
Example
The following example limits to eight the number of characters a user can enter in the
TextInput instance called
. It also sets the
property, which hides the input
my_ti
password
characters by displaying an asterisk in place of the character that was entered.
You must first drag a TextInput component to the Stage and give it an instance name of
; then add the following code to Frame 1.
my_ti
/**
Requires:
- TextInput instance on Stage (instance name: my_ti)
*/
var my_ti:mx.controls.TextInput;
my_ti.maxChars = 8;
my_ti.password = true;
1226
TextInput component

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents