Textarea.restrict - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

TextArea.restrict

Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
textAreaInstance.restrict
Description
Property; indicates the set of characters that users can enter in the text area. The default value
is
. If this property is
, users can enter any character. If this property is an
undefined
null
empty string, no characters can be entered. If this property is a string of characters, users can
enter only characters in the string; the string is scanned from left to right. You can specify a
range by using a dash (-).
If the string begins with ^, all characters that follow the ^ are considered unacceptable
characters. If the string does not begin with ^, the characters in the string are considered
acceptable. The ^ can also be used as a toggle between acceptable and unacceptable characters.
For example, the following code allows A-Z except X and Q:
Ta.restrict = "A-Z^XQ";
Restricting input to uppercase characters converts alphabetic characters entered in lowercase
to uppercase. Likewise, restricting input to lowercase characters converts characters entered in
uppercase to lowercase.
The
property only restricts user interaction; a script may put any text into the text
restrict
area. This property does not synchronize with the Embed Font Outlines check boxes in the
Property inspector.
Example
The following example first sets the restrict property to limit the text area to uppercase letters,
numbers, and spaces, and then sets it to allow all characters except lowercase letters.
TextArea.restrict
1199

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents