Skip to content

Latest commit

 

History

History
81 lines (48 loc) · 1.56 KB

File metadata and controls

81 lines (48 loc) · 1.56 KB

Library.selectItem()

Availability

Flash MX 2004.

Usage

Library.selectItem(namePath [, bReplaceCurrentSelection [, bSelect]])

Parameters

namePath

Type

string

Description

Specifies the name of the item. If the item is in a folder, you can specify its name and path using slash notation.

bReplaceCurrentSelection

Type

boolean?

Description

Specifies whether to replace the current selection or add the item to the current selection. The default value is true (replace current selection). This parameter is optional.

bSelect

Type

boolean?

Description

Specifies whether to select or deselect an item. The default value is true (select). This parameter is optional.

Returns

true if the specified item exists; false otherwise.

Type

boolean

Description

Method; Selects a specified library item.

Example

The following example changes the current selection in the library to Symbol_1 inside untitled Folder_1:

fl.getDocumentDOM().library.selectItem("untitled Folder_1/Symbol_1");

The following example extends what is currently selected in the library to include Symbol_1 inside untitled Folder_1:

fl.getDocumentDOM().library.selectItem("untitled Folder_1/Symbol_1", false);

The following example deselects Symbol_1 inside untitled Folder_1 and does not change other selected items:

fl.getDocumentDOM().library.selectItem("untitled Folder_1/Symbol_1", true, false);