03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

indent (TextFormat.indent property)<br />

public indent : Number<br />

An integer that indicates the indentation from the left margin to the first character in the<br />

paragraph. A positive value indicates normal indentation. You can use a negative value, but<br />

the negative indentation only applies if the left margin is greater than 0. To set the margin<br />

greater than 0, use the indent property or the blockIndent property of the TextFormat<br />

object. The default value is null, which indicates that the property is undefined.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 6 - The ability to use negative values is available as<br />

of Flash Player 8.<br />

Example<br />

The following example creates a text field <strong>and</strong> sets the indentation to 10:<br />

this.createTextField("mytext",1,100,100,100,100);<br />

mytext.multiline = true;<br />

mytext.wordWrap = true;<br />

mytext.border = true;<br />

var myformat:TextFormat = new TextFormat();<br />

myformat.indent = 10;<br />

mytext.text = "this is my first test field object text";<br />

mytext.setTextFormat(myformat);<br />

See also<br />

blockIndent (TextFormat.blockIndent property)<br />

italic (TextFormat.italic property)<br />

public italic : Boolean<br />

A Boolean value that indicates whether text in this text format is italicized. The default value<br />

is null, which indicates that the property is undefined.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 6<br />

Example<br />

The following example creates a text field <strong>and</strong> sets the text style to italic.<br />

this.createTextField("mytext",1,100,100,100,100);<br />

mytext.multiline = true;<br />

mytext.wordWrap = true;<br />

mytext.border = true;<br />

1258 <strong>ActionScript</strong> classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!