Autosize (Textfield.autosize 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 code sets the
new font symbol in the library by selecting New Font from the Library options menu. Then
set the linkage of the font to
following ActionScript to your FLA or ActionScript file:
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "my font";
// where 'my font' is the linkage name of a font in the Library
this.createTextField("my_txt", this.getNextHighestDepth(), 10, 10, 100,
22);
my_txt.border = true;
my_txt.embedFonts = true;
my_txt.text = "Hello World";
my_txt.setTextFormat(my_fmt);
my_txt._alpha = 20;
See also
_alpha (Button._alpha property)

autoSize (TextField.autoSize property)

public autoSize :
Controls automatic sizing and alignment of text fields. Acceptable values for autoSize are
(the default),
"none"
property,
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
"left"
left 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,
side will also be resized to fit the next line of text. If
the bottom side of the text field will be resized and the right side will remain fixed.
If
is set to
autoSize
"right"
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,
will also be resized to fit the next line of text. If
bottom side of the text field will be resized and the left side will remain fixed.
652
ActionScript classes
property of a text field named
_alpha
.Set the linkage for a font symbol to
my font
,
_alpha (MovieClip._alpha property)
Object
,
, and
"left"
"right"
and
"left"
and
TextField.wordWrap
(the default) or
"none"
or
, then the text is treated as left-justified text, meaning the
true
, then the text is treated as right-justified text, meaning the right
. When you set the
"center"
is a synonym for
false
determine whether a text field expands or
, then no resizing will occur.
false
"\n" or "\r")
is also set to
wordWrap
"\n" or "\r")
is also set to
wordWrap
to 20%. Create a
my_txt
. Add the
my font
autoSize
.
"none"
, then the bottom
, then only
true
, then the bottom side
, then only the
true

Advertisement

Table of Contents
loading

Table of Contents