User Guide

474 Chapter 6: Components Dictionary
Calling this method modifies the data provider of the List component. If the data provider is
shared with other components, those components will update as well.
Example
The following code removes the item at index position 3:
myList.removeItemAt(3);
List.replaceItemAt()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
listInstance.replaceItemAt(index, label[, data])
listInstance.replaceItemAt(index, itemObject)
Parameters
index
A number greater than 0 and less than List.length that indicates the position at which
to insert the item (the index of the new item).
label A string that indicates the label for the new item.
data The data for the item. This parameter is optional and can be of any type.
itemObject An object to use as the item, usually containing label and data properties.
Returns
Nothing.
Description
Method; replaces the content of the item at the specified index.
Calling this method modifies the data provider of the List component. If the data provider is
shared with other components, those components will update as well.
Example
The following example changes the fourth index position:
myList.replaceItemAt(3, "new label");