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;
center_txt.text = "short text";
center_txt.border = true;
right_txt.text = "short text";
right_txt.border = true;
true_txt.text = "short text";
true_txt.border = true;
false_txt.text = "short text";
false_txt.border = true;
// create a mouse listener object to detect mouse clicks
var myMouseListener:Object = new Object();
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
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
, then only the bottom side of
, then only the bottom side of
to see how the field resizes
autoSize.
TextField.autoSize
721
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?