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);
}
}
Collection.getLength()
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
collection.getLength()
Returns
The number of items in the collection.
Description
Method; returns the number of items in the collection.
Example
The following example calls
//...
var myColl:mx.utils.Collection;
myColl = _parent.thisShelf.MyCompactDiscs;
trace ("Collection size is: " + myColl.getLength());
//...
:
getIterator()
:
getLength()
Collection interface (Flash Professional only)
173
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?