Collection.addItem()

Availability

Flash Player 7.

Edition

Flash MX Professional 2004.

Usage

collection.addItem(item)

Parameters

item The object to be added to the collection. If item is null, it is not added to the collection.

Returns

A Boolean value of true if the collection was changed as a result of the operation.

Description

Method; adds a new item to the end of the collection.

Example

The following example calls addItem():

on (click) {
import CompactDisc;

    var myColl:mx.utils.Collection;
    myColl = _parent.thisShelf.MyCompactDiscs;
    myCD = new CompactDisc();
    myCD.Artist = "John Coltrane";
    myCD.Title = "Giant Steps";
    
    var wasAdded:Boolean = myColl.addItem(myCD);
}