beautypg.com

Fontitem.bold, Fontitem.embeddedcharacters, Fontitem.embedranges – Adobe Extending Flash Professional CS5 User Manual

Page 302

background image

280

EXTENDING FLASH PROFESSIONAL

fontItem object

Last updated 5/2/2011

fontItem.bold

Availability
Flash CS4 Professional.

Usage

fontItem.bold

Description
Property; a Boolean value that specifies whether the Font item is bold (

true

) or not (

false

).

Example
Assuming that the first item in the Library is a Font item, the following code displays

true

in the Output panel if it is

bold,

false

if it is not, and then sets it to bold.

var theItem = fl.getDocumentDOM().library.items[0];
fl.outputPanel.clear();
fl.trace("bold: "+ theItem.bold);
theItem.bold=true;
fl.trace("bold: "+ theItem.bold);

fontItem.embeddedCharacters

Availability
Flash CS5 Professional.

Usage

fontItem.embeddedCharacters

Description
Property; a string value that allows you to specify characters to embed within a SWF file so that the characters do not
need to be present on the devices the SWF file eventually plays back on. This property provides the same functionality
as the Font Embedding dialog box.

This property can also be read, allowing you to find out what characters were specified with the Font Embedding dialog
box for a given Font item.

Example
Assuming that the first item in the Library is a Font item, the following code embeds the characters a, b, and c.

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

fontItem.embedRanges

Availability
Flash CS5 Professional.

This manual is related to the following products: