MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 170

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

Parameters
The object to be added to the collection. If
item
Returns
A Boolean value of
Description
Method; adds a new item to the end of the collection.
Example
The following example calls
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);
}
Collection.contains()
Availability
Flash Player 7.
Edition
Flash MX Professional 2004.
Usage
collection.contains(item)
Parameters
The object whose presence in the collection is to be tested.
item
Returns
A Boolean value of
Description
Method; indicates whether the collection contains the specified item. For Flash to consider the
objects as equal, they must refer to the same object. If
Collection.contains()
170
Chapter 6: Components Dictionary
if the collection was changed as a result of the operation.
true
:
addItem()
if the collection contains
true
returns
, even if the object's properties are all equal.
false
is
, it is not added to the collection.
item
null
.
item
is a different object,
item

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx

Table of Contents