Description
Property; a Boolean value that indicates whether the list is selectable (
) or not (
).
true
false
The default value is
.
true
Example
The following example prevents users from selecting items in the list by setting the selectable
property to
:
false
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.selectable = false;
List.selectedIndex
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
listInstance.selectedIndex
Description
Property; the selected index of a single-selection list. The value is
if nothing is
undefined
selected; the value is equal to the last item selected if there are multiple selections. If you assign
a value to
, any current selection is cleared and the indicated item is selected.
selectedIndex
Using the
property to change selection doesn't dispatch a
event. To
selectedIndex
change
dispatch the
event, use the following code:
change
my_list.dispatchEvent({type:"change", target:my_list});
List.selectedIndex
801
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers