beautypg.com

Presetitem.isfolder, Presetitem.level – Adobe Extending Flash Professional CS5 User Manual

Page 385

background image

363

EXTENDING FLASH PROFESSIONAL

presetItem object

Last updated 5/2/2011

fl.outputPanel.clear();
var presetItemArray=fl.presetPanel.items;
for (i=0;i

var presetItem = presetItemArray[i];
fl.trace(presetItem.name +", default =" + presetItem.isDefault);

}

presetItem.isFolder

Availability
Flash CS4 Professional.

Usage

presetItem.isFolder

Description
Read-only property: a Boolean value that specifies whether the item in the Motion Presets panel is a folder (

true

) or

a preset (

false

).

Example
The following example shows that the first item in the Motion Presets panel is a folder and the second is a preset:

var presetItemArray=fl.presetPanel.items;
fl.trace(presetItemArray[0].isFolder);
fl.trace(presetItemArray[1].isFolder);

presetItem.level

Availability
Flash CS4 Professional.

Usage

presetItem.level

Description
Read-only property: an integer that specifies the level of the item in the folder structure of the Motion Presets panel.
The Default Folder and Custom Presets folder are level 0.

Example
The following example shows that the first item in the Motion Presets panel is level 0 and the second is level 1:

var presetItemArray=fl.presetPanel.items;
fl.trace(presetItemArray[0].level);
fl.trace(presetItemArray[1].level);

This manual is related to the following products: