Splice (Array.splice Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Performing a case-insensitive, descending sort on the password field produces the following
results:
my_array.sortOn("password", Array.CASEINSENSITIVE | Array.DESCENDING);
// catchy
// Bob
// barb
// abcd
Performing a default sort on the age field produces the following results:
my_array.sortOn("age");
// 29
// 3
// 35
// 4
Performing a numeric sort on the age field produces the following results:
my_array.sortOn("age", Array.NUMERIC);
// my_array[0].age = 3
// my_array[1].age = 4
// my_array[2].age = 29
// my_array[3].age = 35
Performing a descending numeric sort on the age field produces the following results:
my_array.sortOn("age", Array.DESCENDING | Array.NUMERIC);
// my_array[0].age = 35
// my_array[1].age = 29
// my_array[2].age = 4
// my_array[3].age = 3
When you use the
sorting option, you must assign the return
Array.RETURNEDINDEXARRAY
value to a different array. The original array is not modified.
var indexArray:Array = my_array.sortOn("age", Array.RETURNINDEXEDARRAY);
See also
,
| bitwise OR operator
sort (Array.sort method)

splice (Array.splice method)

public splice(startIndex:Number, [deleteCount:Number], [value:Object]) :
Array
Adds elements to and removes elements from an array. This method modifies the array
without making a copy.
Availability: ActionScript 1.0; Flash Player 5
262
ActionScript classes

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF