Presetpanel.items, Presetpanel.movetofolder() – Adobe Extending Flash Professional CS4 User Manual

Page 382

Advertising
background image

360

EXTENDING FLASH CS4 PROFESSIONAL

presetPanel object

Description
Method; adds a preset to the Motion Presets panel from a specified XML file. The path specified in namePath must
exist in the panel.

To create XML files that can be imported, use

presetPanel.exportItem()

.

If you don’t pass a value for namePath, the imported preset is placed in the Custom Presets folder and given the same
name as the imported file (without the XML extension).

Example
The following example imports a preset into the Custom Presets/Pulse folder, and names it

fastPulse

.

fl.presetPanel.importItem("file:///C|/My Presets/thePulsePreset.xml", "Custom
Presets/Pulse/fastPulse");

See also

presetPanel.exportItem()

presetPanel.items

Availability
Flash CS4 Professional.

Usage

presetPanel.items

Description
Property; an array of presetItem objects in the Motion Presets panel (see

presetItem object

). Each item in the array

represents either a folder or a preset.

Example
The following code displays the full pathnames of the items in the Motion Presets panel:

var itemArray = fl.presetPanel.items;
var length = itemArray.length
for (x=0; x<length; x++) {

fl.trace(itemArray[x].path);

}

See also

presetPanel.getSelectedItems()

presetPanel.moveToFolder()

Availability
Flash CS4 Professional.

Advertising