Flash Lite 2 |
|||
| Flash Lite 2.x ActionScript Language Reference > ActionScript classes > TextFormat > align (TextFormat.align property) | |||
public align : String
A string that indicates the alignment of the paragraph. You can apply this property to static and dynamic text. The following list shows possible values for this property:
"left"--the paragraph is left-aligned."center"--the paragraph is centered."right"--the paragraph is right-aligned. The default value is null, which indicates that the property is undefined.
Availability: ActionScript 1.0; Flash Lite 2.0
The following example creates a text field with a border and uses TextFormat.align to center the text.
var my_fmt:TextFormat = new TextFormat();
my_fmt.align = "center";
this.createTextField("my_txt", 1, 100, 100, 300, 100);
my_txt.multiline = true;
my_txt.wordWrap = true;
my_txt.border = true;
my_txt.text = "this is my first text field object text";
my_txt.setTextFormat(my_fmt);