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

Components language reference
Table of Contents

Advertisement

Collection.getIterator()

Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
collection.getIterator()
Returns
An Iterator object that you can use to step through the collection.
Description
Method; returns an iterator over the elements in the collection. There are no guarantees
concerning the order in which the elements are returned (unless this collection is an instance
of a class that provides a guarantee).
Example
The following example calls
on (click) {
var myColl:mx.utils.Collection;
myColl = _parent.thisShelf.MyCompactDiscs;
var itr:mx.utils.Iterator = myColl.getIterator();
while (itr.hasNext()) {
var cd:CompactDisk = CompactDisc(itr.next());
var title:String = cd.Title;
var artist:String = cd.Artist;
trace("Title: " + title + " - Artist: " + artist);
}
}
152
Collection interface (Flash Professional only)
:
getIterator()

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