MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 242

Actionscript language reference
Table of Contents

Advertisement

Usage 3: The following example creates the new Array object
length of 5:
var go_gos_array:Array = new Array("Belinda", "Gina", "Kathy", "Charlotte",
"Jane");
trace(go_gos_array.length); // returns 5
trace(go_gos_array.join(", ")); // displays elements
The initial elements of the
go_gos_array[0] = "Belinda";
go_gos_array[1] = "Gina";
go_gos_array[2] = "Kathy";
go_gos_array[3] = "Charlotte";
go_gos_array[4] = "Jane";
The following code adds a sixth element to the
element:
go_gos_array[5] = "Donna";
go_gos_array[1] = "Nina"
trace(go_gos_array.join(" + "));
// returns Belinda + Nina + Kathy + Charlotte + Jane + Donna
See also
,
Array.length
Array.concat()
Availability
Flash Player 5.
Usage
my_array.concat( [ value0:Object, value1,...valueN ]) : Array
Parameters
value0,...valueN
don't pass any values, a duplicate of
Returns
An array.
Description
Method; concatenates the elements specified in the parameters with the elements in
and creates a new array. If the
concatenated, rather than the array itself. The array
Example
The following code concatenates two arrays:
var alpha_array:Array = new Array("a","b","c");
var numeric_array:Array = new Array(1,2,3);
242
Chapter 6: ActionScript Core Classes
go_gos_array
[] (array access)
Numbers, elements, or strings to be concatenated in a new array. If you
my_array
parameters specify an array, the elements of that array are
value
go_gos_array
array are identified, as shown in the following example:
array and changes the second
go_gos_array
is created.
is left unchanged.
my_array
with an initial
,
my_array

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flex

Table of Contents