Textfield.autosize - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

TextField.autoSize

Availability
Flash Player 6.
Usage
my_txt.autoSize:String
my_txt.autoSize:Boolean
Description
Property; controls automatic sizing and alignment of text fields. Acceptable values for autoSize are
(the default),
"none"
is a synonym for
true
The values of
autoSize
contracts to the left side, right side, or bottom side. The default value for each of these properties
is
.
false
If
is set to
autoSize
If
is set to
autoSize
side of the text field will remain fixed and any resizing of a single line text field will be on the right
side. If the text includes a line break (for example,
be resized to fit the next line of text. If
the text field will be resized and the right side will remain fixed.
If
is set to
autoSize
side of the text field will remain fixed and any resizing of a single line text field will be on the left
side. If the text includes a line break (for example,
be resized to fit the next line of text. If
the text field will be resized and the left side will remain fixed.
If
is set to
autoSize
resizing of a single line text field will be equally distributed to both the right and left sides. If the
text includes a line break (for example,
to fit the next line of text. If
field will be resized and the left and right sides will remain fixed.
Example
You can use the following code and enter different values for
when these values change. A mouse click while the SWF file is playing will replace each text field's
"
string with longer text using several different settings for
short text"
this.createTextField("left_txt", 997, 10, 10, 70, 30);
this.createTextField("center_txt", 998, 10, 50, 70, 30);
this.createTextField("right_txt", 999, 10, 100, 70, 30);
this.createTextField("true_txt", 1000, 10, 150, 70, 30);
this.createTextField("false_txt", 1001, 10, 200, 70, 30);
left_txt.text = "short text";
left_txt.border = true;
876
Chapter 2: ActionScript Language Reference
,
, and
"left"
"right"
and
is a synonym for
"left"
false
and
TextField.wordWrap
(the default) or
"none"
or
, then the text is treated as left-justified text, meaning the left
"left"
true
wordWrap
, then the text is treated as right-justified text, meaning the right
"right"
wordWrap
, then the text is treated as center-justified text, meaning any
"center"
"\n" or "\r")
is also set to
wordWrap
. When you set the
"center"
"none"
determine whether a text field expands or
, then no resizing will occur.
false
, then the bottom side will also
"\n" or "\r")
is also set to
true
, then the bottom side will also
"\n" or "\r")
is also set to
true
, then the bottom side will also be resized
, then only the bottom side of the text
true
autoSize
property,
autoSize
.
, then only the bottom side of
, then only the bottom side of
to see how the field resizes
autoSize.

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents