List.length

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX 2004.

Usage

listInstance.length

Description

Property (read-only); the number of items in the list.

Example

The following example displays the number of items currently in the list's data provider:

var my_list:mx.controls.List;

// Add data to list.
my_list.addItem({data:"flash", label:"Flash"});
my_list.addItem({data:"dreamweaver", label:"Dreamweaver"});
my_list.addItem({data:"coldfusion", label:"ColdFusion"});

var listLength_num:Number = my_list.length; 
trace("Length of List: " + listLength_num);