beautypg.com

Chapter 33: presetitem object, Presetitem.isdefault – Adobe Extending Flash Professional CS5 User Manual

Page 384

background image

362

Last updated 5/2/2011

Chapter 33: presetItem object

Availability
Flash CS4 Professional.

Description
The presetItem object represents an item (preset or folder) in the Motion Presets panel (Window > Motion Presets).
The array of presetItem objects is a property of the presetPanel object (

presetPanel.items

).

All properties of the presetItem object are read only. To perform tasks such as deleting, renaming, or moving items,
use the methods of the

presetPanel object

.

Property summary
You can use the following properties with the presetItem object:

presetItem.isDefault

Availability
Flash CS4 Professional.

Usage

presetItem.isDefault

Description
Read-only property: a Boolean value that specifies whether the item is installed along with Flash (

true

) or is a custom

item that you or someone else has created (

false

). If this value is

true

, you can consider it a “read-only” item; it can’t

be moved, deleted, or have any similar operations applied to it.

Example
The following example displays the contents of the Motion Presets panel and indicates whether an item is installed
along with Flash:

Property

Description

presetItem.isDefault

Specifies whether the item is installed along with Flash or is a custom item that you
or someone else has created.

presetItem.isFolder

Specifies whether the item in the Motion Presets panel is a folder or a preset.

presetItem.level

The level of the item in the folder structure of the Motion Presets panel.

presetItem.name

The name of the preset or folder, without path information.

presetItem.open

Specifies whether a folder in the Motion Presets panel is currently expanded.

presetItem.path

The path to the item in the Motion Presets panel folder tree, and the item name.

This manual is related to the following products: