beautypg.com

Textattrs.indent, Textattrs.italic – Adobe Extending Flash Professional CS5 User Manual

Page 478

background image

456

EXTENDING FLASH PROFESSIONAL

TextAttrs object

Last updated 5/2/2011

Description
Property; the color of the fill, in one of the following formats:

A string in the format

"#RRGGBB"

or

"#RRGGBBAA"

A hexadecimal number in the format

0xRRGGBB

An integer that represents the decimal equivalent of a hexadecimal number

Example
The following example sets the color to red for the selected text field from the character at index 2 up to, but not
including, the character at index 8:

fl.getDocumentDOM().selection[0].setTextAttr("fillColor", 0xff0000, 2, 8);

textAttrs.indent

Availability
Flash MX 2004.

Usage

textAttrs.indent

Description
Property; an integer that specifies paragraph indentation. Acceptable values are -720 through 720.

Example
The following example sets the indentation of the selected text field from the character at index 2 up to, but not
including, the character at index 8 to 100. This can affect characters outside the specified range if they are in the same
paragraph.

fl.getDocumentDOM().selection[0].setTextAttr("indent", 100, 2, 8);

textAttrs.italic

Availability
Flash MX 2004.

Usage

textAttrs.italic

Description
Property; a Boolean value. A value of

true

causes text to appear with the italic version of the font.

Example
The following example sets the selected text field to italic:

fl.getDocumentDOM().selection[0].setTextAttr("italic", true);

This manual is related to the following products: