ActionScript 2.0 Components Language Reference |
|
|
|
| Collection interface > Collection.getItemAt() | |||
Flash Player 7.
Flash MX Professional 2004.
collection.getItemAt(index)
index A number that indicates the location of item within the collection. This is a zero-based index, so 0 retrieves the first item, 1 retrieves the second item, and so on.
An object containing a reference to the specified collection item, or null if index is out of bounds.
Method; returns an item within the collection by using its index.
The following example calls getItemAt():
//...
var myColl:mx.utils.Collection;
myColl = _parent.thisShelf.MyCompactDiscs;
var myCD = CompactDisc(myColl.getItemAt(0));
if (myCD !=null) {
trace("Retrieved " + myCD.Title);
}
//...
|
|
|
|