beautypg.com

Text.texttype, Text.usedevicefonts – Adobe Extending Flash Professional CS5 User Manual

Page 472

background image

450

EXTENDING FLASH PROFESSIONAL

Text object

Last updated 5/2/2011

Usage

text.textRuns

Description
Read-only property; an array of TextRun objects (see

TextRun object

).

Example
The following example stores the value of the

textRuns

property in the

myTextRuns

variable:

var myTextRuns = fl.getDocumentDOM().selection[0].textRuns;

text.textType

Availability
Flash MX 2004.

Usage

text.textType

Description
Property; a string that specifies the type of text field. Acceptable values are

"static"

,

"dynamic"

, and

"input"

.

Example
The following example sets the

textType

property to

input

:

fl.getDocumentDOM().selection[0].textType = "input";

text.useDeviceFonts

Availability
Flash MX 2004.

Usage

text.useDeviceFonts

Description
Property; a Boolean value. A value of

true

causes Flash to draw text using device fonts.

Example
The following example causes Flash to use device fonts when drawing text:

fl.getDocumentDOM().selection[0].useDeviceFonts = true;

This manual is related to the following products: