User Guide

326 Chapter 6: Components Dictionary
Edition
Flash MX Professional 2004.
Usage
dataSet.hasNext()
Returns
A Boolean value.
Description
Method; returns false if the current iterator is at the end of its view of the collection; otherwise,
returns
true.
Example
This example iterates over all of the items in the current view of the collection (starting at its
beginning) and performs a calculation on the
price property of each item.
myDataSet.first();
while(myDataSet.hasNext()) {
var price = myDataSet.currentItem.price;
price = price * 0.5; // Everything's 50% off!
myDataSet.currentItem.price = price;
myDataSet.next();
}
See also
DataSet.currentItem
, DataSet.first(), DataSet.next()
DataSet.hasPrevious()
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
dataSet.hasPrevious()
Returns
A Boolean value.
Description
Method; returns false if the current iterator is at the beginning of its view of the collection;
otherwise, returns
true.
Example
This example iterates over all of the items in the current view of the collection (starting from the
its last item) and performs a calculation on the
price property of each item.