User Guide
408 Components Dictionary
If the specified offset is beyond the beginning (or end) of the collection, the iterator is
positioned at the beginning (or end) of the collection.
Example
The following example positions the current iterator at the first item in the collection, moves
to the next-to-last item, and performs a calculation on a field belonging to that item:
my_ds.addItem({name:"Billy", id:104, gradeLevel:4});
my_ds.addItem({name:"Carrie", id:106, gradeLevel:4});
my_ds.addItem({name:"Mally", id:112, gradeLevel:3});
my_ds.addItem({name:"Cathy", id:110, gradeLevel:4});
my_ds.addItem({name:"Bobby", id:105, gradeLevel:4});
my_ds.first();
var itemsToSkip:Number = 3;
trace(my_ds.currentItem.name); // Billy
my_ds.skip(itemsToSkip);
trace(my_ds.currentItem.name); // Mally
DataSet.useSort()
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
dataSetInstance.useSort(sortName, order)
Parameters
sortName A string that contains the name of the sort to use.
order An integer value that indicates the sort order for the sort; the value must be
DataSetIterator.Ascending or DataSetIterator.Descending.
Returns
Nothing.
Description
Method; switches the sort for the current iterator to the one specified by sortName, if it exists.
If the specified sort does not exist, a
DataSetError exception is thrown.
To create a sort, use
DataSet.addSort().