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

Components language reference
Table of Contents

Advertisement

To test this example, drag a DataSet component to the Stage, and give it an instance name of
. Add two properties,
student_ds
DataSet by using the Schema tab of the Component inspector. If you don't already have a
copy of the
DataBindingClasses
clip from the Classes library (Window > Common Libraries > Classes). Add the following
ActionScript to Frame 1 of the main timeline:
student_ds.addItem({name:"Barry", id:103});
student_ds.addItem({name:"Bobby", id:105});
student_ds.addItem({name:"Billy", id:107});
trace("Before find() > " + student_ds.currentItem.name); // Billy
var studentID:String;
student_ds.addSort("id", ["name","id"]);
if (student_ds.find(["Bobby", 105])) {
studentID = student_ds.getItemId();
student_ds.locateById(studentID);
trace("After find() > " + student_ds.currentItem.name); // Bobby
} else {
trace("We lost Billy!");
}
See also
DataSet.addItem()

DataSet.getIterator()

Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
dataSetInstance.getIterator()
Returns
A ValueListIterator object.
(data type: String) and
name
compiled clip in your library, drag a copy of the compiled
(data type: Number) to the
id
DataSet.getIterator()
371

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?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents