beautypg.com

Text.embeddedcharacters, Text.embedranges – Adobe Extending Flash Professional CS4 User Manual

Page 462

background image

440

EXTENDING FLASH CS4 PROFESSIONAL

Text object

Example
The following example retrieves the description of the object:

var doc = fl.getDocumentDOM();

var desc = doc.selection[0].description;

The following example sets the description of the object:

var doc = fl.getDocumentDOM();

doc.selection[0].description= "Enter your name here";

text.embeddedCharacters

Availability
Flash MX 2004.

Usage

text.embeddedCharacters

Description
Property; a string that specifies characters to embed. This is equivalent to entering text in the Character Embedding
dialog box.

This property works only with dynamic or input text; it generates a warning if used with other text types.

Example
The following example sets the

embeddedCharacters

property to

abc

:

fl.getDocumentDOM().selection[0].embeddedCharacters = "abc";

text.embedRanges

Availability
Flash MX 2004.

Usage

text.embedRanges

Description
Property; a string that consists of delimited integers that correspond to the items that can be selected in the Character
Embedding dialog box. This property works only with dynamic or input text; it is ignored if used with static text.

Note: This property corresponds to the XML file in the Configuration/Font Embedding folder.

Example
The following example sets the

embedRanges

property to

"1|3|7"

:

var doc = fl.getDocumentDOM();

doc.selection[0].embedRanges = "1|3|7";