
TextFormat.rightMargin Property
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
900
|
ActionScript Language Reference
See Also
TextFormat.blockIndent, TextFormat.rightMargin
TextFormat.rightMargin Property
specifies the margin to the right of a paragraph
Flash 6
read/write
theFormat.rightMargin
Description
The integer rightMargin property specifies the minimum horizontal space between the right
border of a text field and the right edge of a paragraph, in pixels. Negative values for
rightMargin are converted to 0 by ActionScript. Note that regardless of the value of
rightMargin, Flash automatically adds a small gutter between text and a text field’s border.
There is no way to align text perfectly flush with the border of a text field. The
rightMargin
and leftMargin properties can be used simultaneously on the same paragraph.
For example usage, see
TextFormat.leftMargin.
The default
rightMargin value (as contained in the TextFormat object returned by
TextField.getTextFormat()) for a text field that contains text is 0. For a text field without
any text, the
rightMargin value is null. For a completely new TextFormat object, it is also
null, indicating that rightMargin will not be set when the format is applied to a text field:
trace(anyUnformattedField_txt.getTextFormat().rightMargin); // Displays: 0
var format = new TextFormat();
trace(format.rightMargin); ...