beautypg.com

Presetpanel.deletefolder() – Adobe Extending Flash Professional CS5 User Manual

Page 390

background image

368

EXTENDING FLASH PROFESSIONAL

presetPanel object

Last updated 5/2/2011

Description
Method; applies the specified or currently selected preset to the currently selected item on the Stage. The item must be
a motion tween, a symbol, or an item that can be converted to a symbol. If the item is a motion tween, its current
motion is replaced with the selected preset without requesting user confirmation.

This method fails in the following situations:

The path you specify as presetPath doesn’t exist.

You don’t pass a value for presetPath and no preset is selected.

You don’t pass a value for presetPath and multiple presets are selected.

The selected item on the Stage is not a symbol and can’t be converted to a symbol.

Example
The following example applies the

aDribble

preset to the currently selected item on the Stage:

var result = fl.presetPanel.applyPreset("Custom Presets/Bounces/aDribble");
fl.trace(result);

presetPanel.deleteFolder()

Availability
Flash CS4 Professional.

Usage

presetPanel.deleteFolder( [folderPath])

Parameters

folderPath

A string that specifies the folder to delete from the Motion Presets panel. This parameter is optional.

Returns
A Boolean value of

true

if the folder or folders are successfully deleted;

false

otherwise.

Description
Method; deletes the specified folder and any of its subfolders from the folder tree of the Motion Presets panel. Any
presets in the folders are also deleted. You can’t delete folders from the Default Presets folder.

If you don’t pass a value for folderPath, any folders that are currently selected are deleted.

Note: Folders are deleted without requesting user confirmation, and there is no way to undo this action.

Example
The following code deletes a folder named

Bouncing

below the Custom Presets folder; any subfolders of

Bouncing

are

also deleted:

fl.presetPanel.deleteFolder("Custom Presets/Bouncing");

See also

presetPanel.deleteItem()

This manual is related to the following products: