SWiSH Player Support
SWF5 or later - Supported Internally
Syntax
arrayName.length
Arguments
None.
Returns
Nothing.
Description
Property; contains the number of elements in an array.
Note: Using the length property for Arrays will only work with SWF5+ (will not work with SWF4). It is supported by the internal SWiSH player.
Samples
onLoad() {
products = new Array();
products[0] = "SWiSHlite";
products[1] = "SWiSH 2.0";
trace(products.length);
}
// displays '2' in the debug window
onLoad() {
products = new Array();
products[0] = "SWiSHlite";
products[1] = "SWiSH 2.0";
products[2] = "SWiSHmax";
products[3] = "SWiSHsites";
products[4] = "SWiSHpix";
trace(products.length);
}
// displays '5' in the debug window
onLoad() {
pets = new Array("fluffy","spot","Mr.Kitty");
trace(pets.length);
}
// displays '3' in the debug window