Maxchars (Textfield.maxchars Property); Maxhscroll (Textfield.maxhscroll Property) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Example
The following example outputs the number of characters in the
displays the current date.
var today:Date = new Date();
this.createTextField("date_txt", this.getNextHighestDepth(), 10, 10, 100,
22);
date_txt.autoSize = true;
date_txt.text = today.toString();
trace(date_txt.length);

maxChars (TextField.maxChars property)

public maxChars :
Indicates the maximum number of characters that the text field can contain. A script may
insert more text than
a user can enter. If the value of this property is
user can enter.
Availability: ActionScript 1.0; Flash Lite 2.0
Example
The following example creates a text field called
numbers in the field.
this.createTextField("age_txt", this.getNextHighestDepth(), 10, 10, 30,
22);
age_txt.type = "input";
age_txt.border = true;
age_txt.maxChars = 2;

maxhscroll (TextField.maxhscroll property)

public maxhscroll :
Indicates the maximum value of
Availability: ActionScript 1.0; Flash Lite 2.0
Example
See the example for
TextField.hscroll
664
ActionScript classes
Number
allows; the
maxChars
Number
[read-only]
TextField.hscroll
.
date_txt
property indicates only how much text
maxChars
, there is no limit on the amount of text a
null
that only lets users enter up to two
age_txt
.
text field, which

Advertisement

Table of Contents
loading

Table of Contents