List.selectedIndices

Availability

Flash Player 6.0.79.

Edition

Flash MX 2004.

Usage

listInstance.selectedIndices

Description

Property; an array of indices of the selected items. Assigning this property replaces the current selection. Setting selectedIndices to a 0-length array (or undefined) clears the current selection. The value is undefined if nothing is selected.

The selectedIndices property is listed in the order that items were selected. If you click the second item, then the third item, and then the first item, selectedIndices returns [1,2,0].

Example

The following example gets the selected indices:

var selIndices = myList.selectedIndices;

The following example selects four items:

var myArray = new Array (1,4,5,7);
myList.selectedIndices = myArray; 

See also

List.selectedIndex, List.selectedItem, List.selectedItems