ActionScript 2.0 Components Language Reference |
|
|
|
| List component > List.length | |||
Flash Player 6 (6.0.79.0).
Flash MX 2004.
listInstance.length
Property (read-only); the number of items in the list.
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);
|
|
|
|