Collection.isEmpty()

可用性

Flash Player 7。

版本

Flash MX Professional 2004。

用法

collection.isEmpty()

返回

一个布尔值,如果集合为空,则该值为 true

描述

方法;指明集合是否为空。

示例

以下示例调用 isEmpty()

on (click) {
    var myColl:mx.utils.Collection;
    myColl = _parent.thisShelf.MyCompactDiscs;
    if (myColl.isEmpty()) {
        trace("No CDs in the collection");
    }
}
//...