Dataset.usesort() - MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference

Components language reference
Table of Contents

Advertisement

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
A string that contains the name of the sort to use.
sortName
An integer value that indicates the sort order for the sort; the value must be
order
or
DataSetIterator.Ascending
DataSetIterator.Descending.
Returns
Nothing.
Description
Method; switches the sort for the current iterator to the one specified by
, if it exists.
sortName
If the specified sort does not exist, a
exception is thrown.
DataSetError
To create a sort, use
.
DataSet.addSort()
408
Components Dictionary

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents