User Guide

List component 465
This example creates a data provider array and assigns it to the dataProvider property, as in
the following:
myDP = new Array();
list.dataProvider = myDP;
for (var i=0; i<accounts.length; i++) {
// these changes to the data provider will be broadcast to the list
myDP.addItem({label: accounts[i].name,
data: accounts[i].accountID});
}
List.getItemAt()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
listInstance.getItemAt(index)
Parameters
index
A number greater than or equal to 0, and less than List.length. It specifies the index of
the item to retrieve.
Returns
The indexed item object; undefined if the index is out of range.
Description
Method; retrieves the item at the specified index.
Example
The following code displays the label of the item at index position 4:
trace(myList.getItemAt(4).label);
List.hPosition
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
listInstance.hPosition