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

Components language reference
Table of Contents

Advertisement

DataSet.previous()

Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
dataSetInstance.previous()
Returns
Nothing.
Description
Method; makes the previous item in the current view of the collection the current item.
Which items are in the current view depends on any current filter and range settings.
Example
The following example loops over each item in a data set and traces each item's price:
my_ds.addItem({name:"item a", price:16});
my_ds.addItem({name:"item b", price:9});
my_ds.last();
while (my_ds.hasPrevious()) {
trace(my_ds.currentItem.price);
my_ds.previous();
}
The following example loops over all the items in the current view of the collection, starting
from the last item, and performs a calculation on a field in each item:
my_ds.last();
while (my_ds.hasPrevious()) {
my_ds.price *= 0.5; // Everything's 50% off!
my_ds.previous();
}
See also
,
DataSet.first()
DataSet.hasNext()
DataSet.previous()
391

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents