MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 738

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
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 field. The default value is
. If this property is
undefined
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";
The
property only restricts user interaction; a script may put any text into the text
restrict
field. This property does not synchronize with the Embed Font Outlines check boxes in the
Property inspector.
Example
In the following example, the first line of code limits the text field to uppercase letters, numbers,
and spaces. The second line of code allows all characters except lowercase letters.
my_txt.restrict = "A-Z 0-9"; // limit control to uppercase letters, numbers,
and spaces
my_txt.restrict = "^a-z"; // allow all characters, except lowercase letters
TextArea.styleSheet
Availability
Flash Player 7.
Usage
TextAreaInstance.styleSheet = TextFieldStyleSheetObject
Description
Property; attaches a style sheet to the TextArea component specified by
information on creating style sheets, see "Formatting text with Cascading Style Sheets" in Using
ActionScript in Flash.
738
Chapter 6: Components Dictionary
, users can enter any character. If this property is an empty
null
. For
TextAreaInstance

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents