TextFormat
1237
my_txt.wordWrap = true;
my_txt.border = true;
// Assign the text and the TextFormat object to the TextObject:
my_txt.text = textToDisplay;
my_txt.setTextFormat(my_fmt);
indent (TextFormat.indent property)
public indent : Number
An integer that indicates the indentation from the left margin to the first character in the
paragraph. A positive value indicates normal indentation. You can use a negative value, but
the negative indentation only applies if the left margin is greater than 0. To set the margin
greater than 0, use the
indent
property or the
blockIndent
property of the TextFormat
object. The default value is
null
, which indicates that the property is undefined.
Availability:
ActionScript 1.0; Flash Player 6 - The ability to use negative values is available as
of Flash Player 8.
Example
The following example creates a text field and sets the indentation to 10:
this.createTextField("mytext",1,100,100,100,100);
mytext.multiline = true;
mytext.wordWrap = true;
mytext.border = true;
var myformat:TextFormat = new TextFormat();
myformat.indent = 10;
mytext.text = "this is my first test field object text";
mytext.setTextFormat(myformat);
See also
blockIndent (TextFormat.blockIndent property)
italic (TextFormat.italic property)
public italic : Boolean
A Boolean value that indicates whether text in this text format is italicized. The default value
is
null
, which indicates that the property is undefined.
Availability:
ActionScript 1.0; Flash Player 6
Содержание FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Страница 1: ...ActionScript 2 0 Language Reference ...
Страница 1352: ...1352 ActionScript classes ...