List.multipleSelection

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX 2004.

Usage

listInstance.multipleSelection

Description

Property; indicates whether multiple selections are allowed (true) or only single selections are allowed (false). The default value is false.

Example

The following example tests to determine whether multiple items can be selected, and if so, displays instructions in a label component. To try this code, drag a List component to the Stage and give it the instance name my_list. Next, drag a Label component on to the Stage and give it the instance name my_label. Add the following code to Frame 1 in the timeline:

var my_list:mx.controls.List;

my_list.addItem({data:"flash", label:"Flash"});
my_list.addItem({data:"dreamweaver", label:"Dreamweaver"});
my_list.addItem({data:"coldfusion", label:"ColdFusion"});

my_list.multipleSelection = true; 

if (my_list.multipleSelection) {
    my_label.text = "Hold down Control or Shift to select multiple items";
    my_label.autoSize = "left";
}