
TextFormat.blockIndent Property
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
890
|
ActionScript Language Reference
text, the align value is null. For a completely new TextFormat object, it is also null, indi-
cating that
align will not be set when the format is applied to a text field:
trace(anyUnformattedField_txt.getTextFormat().align); // Displays: "left"
var format = new TextFormat();
trace(format.align); // Displays: "null"
See Also
TextField.wordWrap, TextFormat.blockIndent, TextFormat.indent, TextFormat.leftMargin,
TextFormat.rightMargin
TextFormat.blockIndent Property
specifies paragraph indentation
Flash 6
read/write
theFormat.blockIndent
Description
The integer blockIndent property specifies the distance a paragraph is indented from the
text field’s left border, in pixels. Paragraphs are spans of text separated by line characters
specified in code (
\n, <BR>,ornewline). To set the indentation for an entire text field,
invoke TextField.setTextFormat() without specifying any index arguments:
this.createTextField("theField_txt", 1, 0, 0, 200, 60);
theField_txt.border = true;
theField_txt.text = "This is paragraph one.\nThis is paragraph two."
// Create a TextFormat object
format = new TextFormat();
format.blockIndent = 30;
// Block-indent the whole field
theField_txt.setTextFormat(format);
To set the indentation for the first paragraph ...