User Guide

806 List component
Parameters
index A number greater than 0 or less than List.length indicating the index of the item
to change.
styleObj An object that enumerates the properties and values to set.
Returns
Nothing.
Description
Method; applies the specified properties to the specified item. The supported properties are
icon and backgroundColor.
Example
The following example changes the background color of the third item to red and gives it an
icon. To try this code, drag a List component to the Stage and give it the instance name
my_list. Next, add a MovieClip/Graphic symbol to the library with a linkage identifier of
file”. Add the following code to Frame 1 in the timeline:
var my_list:mx.controls.List;
my_list.setSize(200, 100);
my_list.addItem({data:"flash", label:"Flash"});
my_list.addItem({data:"dreamweaver", label:"Dreamweaver"});
my_list.addItem({data:"coldfusion", label:"ColdFusion"});
my_list.setPropertiesAt(2, {backgroundColor:0xFF0000, icon: "file"});
List.sortItems()
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
listInstance.sortItems(compareFunc)