Array.concat()

SWiSH Player Support
SWF5 or later - Supported Internally

Syntax
arrayName .concat( value1, value2, ... )

Arguments
value(s) : Elements, numbers, or strings to be linked with the elements in the array specified by arrayName

Returns
Nothing.

Description
Method; takes the base array - arrayName - and links the value(s) to it and creates a new array . If an array is used in the value argument, only the elements of that array are added to the base array and the array specified in the value argument is unaffected.

Samples
onLoad()  {
     products = new  Array ("SWiSHlite", "SWiSH 2.0");
     more_products = new  Array ("SWiSHmax", "SWiSHpix");
     trace("Concatenated  Array  = " add products.concat(more_products));
     trace("Base  Array  = " add products);
     trace("Base  Array  with new elements = " add products.concat("Bob", 4));
}


The script above displays the following in the debug window:

Concatenated  Array  = SWiSHlite,SWiSH  2 . 0 ,SWiSHmax,SWiSHpix
Base  Array = SWiSHlite,SWiSH  2 . 0
Base  Array with  new elements = SWiSHlite,SWiSH  2 . 0 ,Bob, 4