TextFormat
1231
Methods inherited from class Object
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.
■
"justify"
—The paragraph is justified. (This value was added in Flash Player 8.)
The default value is
null
, which indicates that the property is undefined.
Availability:
ActionScript 1.0; Flash Player 6 - The "justify" value is available beginning with
Flash Player 8.
Example
The following example shows the
align
property being set to justify, which causes the
characters on each line to be spread out so that the text looks more evenly spaced horizontally.
var format:TextFormat = new TextFormat();
format.align = "justify";
var txtField:TextField = this.createTextField("txtField",
this.getNextHighestDepth(), 100, 100, 300, 100);
txtField.multiline = true;
txtField.wordWrap = true;
txtField.border = true;
txtField.text = "When this text is justified, it will be "
+ "spread out to more cleanly fill the horizontal "
+ "space for each line. This can be considered an "
+ "improvement over regular left-aligned text that "
+ "will simply wrap and do no more.";
txtField.setTextFormat(format);
addProperty (Object.addProperty method)
,
hasOwnProperty
(Object.hasOwnProperty method)
,
isPropertyEnumerable
(Object.isPropertyEnumerable method)
,
isPrototypeOf (Object.isPrototypeOf
method)
,
registerClass (Object.registerClass method)
,
toString
(Object.toString method)
,
unwatch (Object.unwatch method)
,
valueOf
(Object.valueOf method)
,
watch (Object.watch method)
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...