You must first add an instance of the TextArea component to the Stage and name it
then add the following code to Frame 1.
/**
Requires:
- TextArea instance on Stage (instance name: my_ta)
*/
var my_ta:mx.controls.TextArea;
// Define a listener object.
var taListener:Object = new Object();
taListener.change = function(evt_obj:Object) {
trace("my_ta.length is now: " + my_ta.length + " characters");
};
my_ta.addEventListener("change", taListener);
TextArea.maxChars
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
textAreaInstance.maxChars
Description
Property; the maximum number of characters that the text area can contain. A script may
insert more text than the
text a user can enter. If the value of this property is
text a user can enter. The default value is
Example
The following example sets the
can enter to 24.
1194
TextArea component
property allows; the property indicates only how much
maxChars
null
property to limit the number of characters a user
maxchars
, there is no limit to the amount of
null
.
;
my_ta