DataSet.removeItem()
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
dataSetInstance.removeItem([item])
Parameters
The item to be removed. This parameter is optional.
item
Returns
A Boolean value. Returns
if the item was successfully removed; otherwise, returns
true
.
false
Description
Method; removes the specified item from the collection, or removes the current item if
the
parameter is omitted. This operation is logged to
if
item
DataSet.deltaPacket
is
.
DataSet.logChanges
true
Example
The following code removes the item at the current iterator position. To test this example, add
a DataSet component to the Stage, and give it an instance name of
. Add the following
my_ds
code to Frame 1 of the main timeline:
my_ds.addItem({name:"Milton", years:3});
my_ds.addItem({name:"Mark", years:3});
my_ds.addItem({name:"Sarah", years:1});
my_ds.addItem({name:"Michael", years:2});
my_ds.addItem({name:"Frank", years:2});
trace(my_ds.getLength()); // 5
trace(my_ds.currentItem.name); // Frank
my_ds.removeItem();
trace(my_ds.getLength()); // 4
trace(my_ds.currentItem.name); // Michael
See also
,
DataSet.deltaPacket
DataSet.logChanges
396
Components Dictionary
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers