PackageTop Level
Classpublic dynamic class Vector
InheritanceVector Inheritance Object

Language version: ActionScript 3.0
Runtime version: AIR 1.5

The Vector class lets you access and manipulate a vector — an array whose elements all have the same data type. The data type of a Vector's elements is known as the Vector's base type. The base type can be any class, including built in classes and custom classes. The base type is specified when declaring a Vector variable as well as when creating an instance by calling the class constructor.

As with an Array, you can use the array access operator ([]) to set or retrieve the value of a Vector element. Several Vector methods also provide mechanisms for setting and retrieving element values. These include push(), pop(), shift(), unshift(), and others. The properties and methods of a Vector object are similar — in most cases identical — to the properties and methods of an Array. In most cases where you would use an Array in which all the elements have the same data type, a Vector instance is preferable. However, Vector instances are dense arrays, meaning it must have a value (or null) in each index. Array instances don't have this same restriction.

The Vector's base type is specified using postfix type parameter syntax. Type parameter syntax is a sequence consisting of a dot (.), left angle bracket (<), class name, then a right angle bracket (>), as shown in this example:

In the first line of the example, the variable v is declared as a Vector.<String> instance. In other words, it represents a Vector (an array) that can only hold String instances and from which only String instances can be retrieved. The second line constructs an instance of the same Vector type (that is, a Vector whose elements are all String objects) and assigns it to v.

 var v:Vector.<String>;
 v = new Vector.<String>();
 

Use brackets to define a vector's base type when calling the Vector constructor function. The string included in the brackets is a sequence consisting of a left angle bracket (<), the base class name, then a right angle bracket (>), as shown in this example:

 var v = new air.Vector["<String>"]();
 

To add items to a Vector, you can use the push() method. For example, the following code adds content to a Vector of String objects:

 var v = new air.Vector["<String>"]();
 v.push("a", "b", "c");
 

In this API reference for AIR HTML developers, properties that are defined as Vector types are listed using Vector.<T> syntax. In this syntax, T represents the data type of the elements in the Vector. For example, the NativeProcessStartupInfo class includes an arguments property. The API reference lists this property as having the type Vector.<String>, meaning that the property is a Vector containing String objects. Other references to Vector objects in this documentation also uses this syntax, which is used in ActionScript 3.0.

A variable declared with the Vector.<T> data type can only store a Vector instance that is constructed with the same base type T. For example, a Vector that's constructed by calling new Vector.<String>() can't be assigned to a variable that's declared with the Vector.<int> data type. The base types must match exactly. For example, the following code doesn't compile because the object's base type isn't the same as the variable's declared base type (even though Sprite is a subclass of DisplayObject):

 // This code doesn't compile even though Sprite is a DisplayObject subclass
 var v:Vector.<DisplayObject> = new Vector.<Sprite>();
 

To convert a Vector with base type T to a Vector of a superclass of T, use the Vector() global function.

In addition to the data type restriction, the Vector class has other restrictions that distinguish it from the Array class:

As a result of its restrictions, a Vector has three primary benefits over an Array instance whose elements are all instances of a single class:

See also

[] array access
Vector() global function
Array class


Public Properties
 PropertyDefined by
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  fixed : Boolean
Indicates whether the length property of the Vector can be changed.
Vector
  length : uint
The range of valid indices available in the Vector.
Vector
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
Public Methods
 MethodDefined by
  
Vector(length:uint = 0, fixed:Boolean = false)
Creates a Vector with the specified base type.
Vector
  
concat(... args):Vector.<T>
Concatenates the Vectors specified in the parameters list with the elements in this Vector and creates a new Vector.
Vector
  
every(callback:Function, thisObject:Object = null):Boolean
Executes a test function on each item in the Vector until an item is reached that returns false for the specified function.
Vector
  
filter(callback:Function, thisObject:Object = null):Vector.<T>
Executes a test function on each item in the Vector and returns a new Vector containing all items that return true for the specified function.
Vector
  
forEach(callback:Function, thisObject:Object = null):void
Executes a function on each item in the Vector.
Vector
 Inherited
Indicates whether an object has a specified property defined.
Object
  
Checks whether the vector includes the item that is passed in.
Vector
  
indexOf(searchElement:T, fromIndex:int = 0):int
Searches for an item in the Vector and returns the index position of the item.
Vector
  
insertAt(index:int, element:T):void
Insert a single element into the Vector.
Vector
  
Checks whether the vector is empty.
Vector
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
  
join(sep:String = ","):String
Converts the elements in the Vector to strings, inserts the specified separator between the elements, concatenates them, and returns the resulting string.
Vector
  
lastIndexOf(searchElement:T, fromIndex:int = 0x7fffffff):int
Searches for an item in the Vector, working backward from the specified index position, and returns the index position of the matching item.
Vector
  
map(callback:Function, thisObject:Object = null):Vector.<T>
Executes a function on each item in the Vector, and returns a new Vector of items corresponding to the results of calling the function on each item in this Vector.
Vector
  
pop():T
Removes the last element from the Vector and returns that element.
Vector
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
  
push(... args):uint
Adds one or more elements to the end of the Vector and returns the new length of the Vector.
Vector
  
removeAt(index:int):T
Remove a single element from the Vector.
Vector
  
Reverses the order of the elements in the Vector.
Vector
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
  
shift():T
Removes the first element from the Vector and returns that element.
Vector
  
slice(startIndex:int = 0, endIndex:int = 16777215):Vector.<T>
Returns a new Vector that consists of a range of elements from the original Vector, without modifying the original Vector.
Vector
  
some(callback:Function, thisObject:Object = null):Boolean
Executes a test function on each item in the Vector until an item is reached that returns true.
Vector
  
sort(sortBehavior:*):Vector.<T>
Sorts the elements in the Vector object, and also returns a sorted Vector object.
Vector
  
splice(startIndex:int, deleteCount:uint = 4294967295, ... items):Vector.<T>
Adds elements to and removes elements from the Vector.
Vector
  
Returns a string that represents the elements in the specified Vector.
Vector
  
Returns a string that represents the elements in the Vector.
Vector
  
unshift(... args):uint
Adds one or more elements to the beginning of the Vector and returns the new length of the Vector.
Vector
 Inherited
Returns the primitive value of the specified object.
Object
Property detail
fixedproperty
fixed:Boolean  [read-write]

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Indicates whether the length property of the Vector can be changed. If the value is true, the length property can't be changed. This means the following operations are not allowed when fixed is true:

Implementation
    public function get fixed():Boolean
    public function set fixed(value:Boolean):void
lengthproperty 
length:uint  [read-write]

Language version: ActionScript 3.0
Runtime version: AIR 1.5

The range of valid indices available in the Vector. A Vector instance has index positions up to but not including the length value.

Every Vector element always has a value that is either an instance of the base type or null. When the length property is set to a value that's larger than its previous value, additional elements are created and populated with the default value appropriate to the base type (null for reference types).

When the length property is set to a value that's smaller than its previous value, all the elements at index positions greater than or equal to the new length value are removed from the Vector.

Implementation
    public function get length():uint
    public function set length(value:uint):void

Throws
RangeError — If this property is changed while fixed is true.
 
RangeError — If this property is set to a value larger than the maximum allowable index (232).
Constructor detail
Vector()constructor
public function Vector(length:uint = 0, fixed:Boolean = false)

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Creates a Vector with the specified base type.

When calling the Vector.<T>() constructor, specify the base type using type parameter syntax. Type parameter syntax is a sequence consisting of a dot (.), left angle bracket (<), class name, then a right angle bracket (>), as shown in this example:

     var v:Vector.<String> = new Vector.<String>();
     

When calling the Vector() constructor, use brackets to specify the base type as a string using type parameter syntax. Type parameter syntax is a a string consisting of a left angle bracket (<), class name, then a right angle bracket (>), as shown in this example:

     var v = new air.Vector["<String>"]();
     

To create a Vector instance from an Array or another Vector (such as one with a different base type), use the Vector() global function.

To create a pre-populated Vector instance, use the following syntax instead of using the parameters specified below:

     // var v:Vector.<T> = new <T>[E0, ..., En-1 ,];
     // For example: 
     var v:Vector.<int> = new <int>[0,1,2,];
     

The following information applies to this syntax:

Parameters
length:uint (default = 0) — The initial length (number of elements) of the Vector. If this parameter is greater than zero, the specified number of Vector elements are created and populated with the default value appropriate to the base type (null for reference types).
 
fixed:Boolean (default = false) — Whether the Vector's length is fixed (true) or can be changed (false). This value can also be set using the fixed property.

See also

Method detail
concat()method
AS3 function concat(... args):Vector.<T>

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Concatenates the Vectors specified in the parameters list with the elements in this Vector and creates a new Vector. The Vectors in the parameters list must have the same base type, or subtype, as this Vector. If you do not pass any parameters, the returned Vector is a duplicate (shallow clone) of the original Vector.

Parameters
... args — Zero or more Vectors of the base type, or subtype, of this Vector.

Returns
Vector.<T> — A Vector with the same base type as this Vector that contains the elements from this Vector followed by elements from the Vectors in the parameters list.

Throws
TypeError — If any argument is not a Vector of the base type, or cannot be converted to a Vector of the base type.
every()method 
AS3 function every(callback:Function, thisObject:Object = null):Boolean

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Executes a test function on each item in the Vector until an item is reached that returns false for the specified function. You use this method to determine whether all items in a Vector meet a criterion, such as having values less than a particular number.

For this method, the second parameter, thisObject, must be null if the first parameter, callback, is a method closure. That is the most common way of using this method.

However, suppose you create a function on a frame on the main timeline using Flash Professional, but you want it to be called in a different this context:

    function myFunction(item:T, index:int, vector:Vector.<T>):Boolean {
       // your code here
    }
    

Suppose you then use the every() method on a Vector called myVector:

    myVector.every(myFunction, someObject);
    

Because myFunction is a member of the main class of the SWF file, it cannot be executed in a different this context. Flash runtimes throw an exception when this code runs. You can avoid this runtime error by assigning the function to a variable, as follows:

    var myFunction:Function = function(item:T, index:int, vector:Vector.<T>):Boolean {
        //your code here
    };
    myVector.every(myFunction, someObject);
    
Parameters
callback:Function — The function to run on each item in the Vector. This function is invoked with three arguments: the current item from the Vector, the index of the item, and the Vector object:
function callback(item:T, index:int, vector:Vector.<T>):Boolean {
       // your code here
    }
    

The callback function should return a Boolean value.

 
thisObject:Object (default = null) — The object that the identifer this in the callback function refers to when the function is called.

Returns
Boolean — A Boolean value of true if the specified function returns true when called on all items in the Vector; otherwise, false.

See also

filter()method 
AS3 function filter(callback:Function, thisObject:Object = null):Vector.<T>

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Executes a test function on each item in the Vector and returns a new Vector containing all items that return true for the specified function. If an item returns false, it is not included in the result Vector. The base type of the return Vector matches the base type of the Vector on which the method is called.

For this method, the second parameter, thisObject, must be null if the first parameter, callback, is a method closure. That is the most common way of using this method.

However, suppose you create a function on a frame on the main timeline using Flash Professional, but you want it to be called in a different this context:

     function myFunction(item:T, index:int, vector:Vector.<T>):Boolean {
        // your code here
     }
     

Suppose you then use the filter() method on a Vector called myVector:

     var result:Vector.<T> = myVector.filter(myFunction, someObject);
     

Because myFunction is a member of the main class of the SWF file, it cannot be executed in a different this context. Flash runtimes throw an exception when this code runs. You can avoid this runtime error by assigning the function to a variable, as follows:

     var myFunction:Function = function(item:T, index:int, vector:Vector.<T>):Boolean {
         //your code here
     };
     myVector.filter(myFunction, someObject);
     
Parameters
callback:Function — The function to run on each item in the Vector. This function is invoked with three arguments: the current item from the Vector, the index of the item, and the Vector object:
function callback(item:T, index:int, vector:Vector.<T>):Boolean;
 
thisObject:Object (default = null) — The object that the identifer this in the callback function refers to when the function is called.

Returns
Vector.<T> — A new Vector that contains all items from the original Vector for which the callback function returned true.

See also

forEach()method 
AS3 function forEach(callback:Function, thisObject:Object = null):void

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Executes a function on each item in the Vector.

For this method, the second parameter, thisObject, must be null if the first parameter, callback, is a method closure. That is the most common way of using this method.

However, suppose you create a function on a frame on the main timeline using Flash Professional, but you want it to be called in a different this context:

     function myFunction(item:T, index:int, vector:Vector.<T>):void {
        // your code here
     }
     

Suppose you then use the forEach() method on a Vector called myVector:

     myVector.forEach(myFunction, someObject);
     

Because myFunction is a member of the main class of the SWF file, it cannot be executed in a different this context. Flash runtimes throw an exception when this code runs. You can avoid this runtime error by assigning the function to a variable, as follows:

     var myFunction:Function = function(item:T, index:int, vector:Vector.<T>):void {
         //your code here
     };
     myVector.forEach(myFunction, someObject);
     
Parameters
callback:Function — The function to run on each item in the Vector. This function is invoked with three arguments: the current item from the Vector, the index of the item, and the Vector object:
function callback(item:T, index:int, vector:Vector.<T>):void;

Any return value from the function call is discarded.

 
thisObject:Object (default = null) — The object that the identifer this in the callback function refers to when the function is called.
includes()method 
AS3 function includes(item:*):Boolean

Language version: ActionScript 3.0
Runtime version: AIR 51.0

Checks whether the vector includes the item that is passed in. Each element is checked in turn to see if it matches the item that is passed in, using the standard comparison operator (i.e. similar to if (vector[i] == item)).

Parameters
item:* — The item to be checked if it is in the vector.

Returns
Boolean — True if the item is found in this vector.
indexOf()method 
AS3 function indexOf(searchElement:T, fromIndex:int = 0):int

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Searches for an item in the Vector and returns the index position of the item. The item is compared to the Vector elements using strict equality (===).

Parameters
searchElement:T — The item to find in the Vector.
 
fromIndex:int (default = 0) — The location in the Vector from which to start searching for the item. If this parameter is negative, it is treated as length + fromIndex, meaning the search starts -fromIndex items from the end and searches from that position forward to the end of the Vector.

Returns
int — A zero-based index position of the item in the Vector. If the searchElement argument is not found, the return value is -1.

See also

insertAt()method 
AS3 function insertAt(index:int, element:T):void

Language version: ActionScript 3.0
Runtime version: AIR 19

Insert a single element into the Vector. This method modifies the Vector without making a copy.

Parameters
index:int — An integer that specifies the position in the Vector where the element is to be inserted. You can use a negative integer to specify a position relative to the end of the Vector (for example, -1 for the last element of the Vector).
 
element:T

Throws
RangeError — If this method is called while fixed is true.
isEmpty()method 
AS3 function isEmpty():Boolean

Language version: ActionScript 3.0
Runtime version: AIR 51.0

Checks whether the vector is empty. An alternative to calling a comparison vector.length == 0.

Returns
Boolean — True if the vector has no elements.
join()method 
AS3 function join(sep:String = ","):String

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Converts the elements in the Vector to strings, inserts the specified separator between the elements, concatenates them, and returns the resulting string. A nested Vector is always separated by a comma (,), not by the separator passed to the join() method.

Parameters
sep:String (default = ",") — A character or string that separates Vector elements in the returned string. If you omit this parameter, a comma is used as the default separator.

Returns
String — A string consisting of the elements of the Vector converted to strings and separated by the specified string.

See also

lastIndexOf()method 
AS3 function lastIndexOf(searchElement:T, fromIndex:int = 0x7fffffff):int

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Searches for an item in the Vector, working backward from the specified index position, and returns the index position of the matching item. The item is compared to the Vector elements using strict equality (===).

Parameters
searchElement:T — The item to find in the Vector.
 
fromIndex:int (default = 0x7fffffff) — The location in the Vector from which to start searching for the item. The default is the maximum allowable index value, meaning that the search starts at the last item in the Vector.

If this parameter is negative, it is treated as length + fromIndex, meaning the search starts -fromIndex items from the end and searches from that position backward to index 0.

Returns
int — A zero-based index position of the item in the Vector. If the searchElement argument is not found, the return value is -1.

See also

map()method 
AS3 function map(callback:Function, thisObject:Object = null):Vector.<T>

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Executes a function on each item in the Vector, and returns a new Vector of items corresponding to the results of calling the function on each item in this Vector. The result Vector has the same base type and length as the original Vector. The element at index i in the result Vector is the result of the call on the element at index i in the original Vector.

For this method, the second parameter, thisObject, must be null if the first parameter, callback, is a method closure. That is the most common way of using this method.

However, suppose you create a function on a frame on the main timeline, using Flash Professional but you want it to be called in a different this context:

     function myFunction(item:Object, index:int, vector:Vector.<T>):T {
        // your code here
     }
     

Suppose you then use the map() method on a Vector called myVector:

     myVector.map(myFunction, someObject);
     

Because myFunction is a member of the main class of the SWF file, it cannot be executed in a different this context. Flash runtimes throw an exception when this code runs. You can avoid this runtime error by assigning the function to a variable, as follows:

     var myFunction:Function = function(item:T, index:int, vector:Vector.<T>):void {
         //your code here
     };
     myVector.map(myFunction, someObject);
     
Parameters
callback:Function — The function to run on each item in the Vector. This function is invoked with three arguments: the current item from the Vector, the index of the item, and the Vector object:
function callback(item:T, index:int, vector:Vector.<T>):T;
 
thisObject:Object (default = null) — The object that the identifer this in the callback function refers to when the function is called.

Returns
Vector.<T> — A new Vector that contains the results of calling the function on each item in this Vector. The result Vector has the same base type and length as the original.

See also

pop()method 
AS3 function pop():T

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Removes the last element from the Vector and returns that element. The length property of the Vector is decreased by one when this function is called.

Returns
T — The value of the last element in the specified Vector.

Throws
RangeError — If this method is called while fixed is true.

See also

push()method 
AS3 function push(... args):uint

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Adds one or more elements to the end of the Vector and returns the new length of the Vector.

Because this function can accept multiple arguments, the data type of the arguments is not checked at compile time even in strict mode. However, if an argument is passed that is not an instance of the base type, an exception occurs at run time.

Parameters
... args — One or more values to append to the Vector.

Returns
uint — The length of the Vector after the new elements are added.

Throws
TypeError — If any argument is not an instance of the base type T of the Vector.
 
RangeError — If this method is called while fixed is true.

See also

removeAt()method 
AS3 function removeAt(index:int):T

Language version: ActionScript 3.0
Runtime version: AIR 19

Remove a single element from the Vector. This method modifies the Vector without making a copy.

Parameters
index:int — An integer that specifies the index of the element in the Vector that is to be deleted. You can use a negative integer to specify a position relative to the end of the Vector (for example, -1 for the last element of the Vector).

Returns
T — The element that was removed from the original Vector.

Throws
RangeError — If the index argument specifies an index to be deleted that's outside the Vector's bounds.
 
RangeError — If this method is called while fixed is true.
reverse()method 
AS3 function reverse():Vector.<T>

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Reverses the order of the elements in the Vector. This method alters the Vector on which it is called.

Returns
Vector.<T> — The Vector with the elements in reverse order.
shift()method 
AS3 function shift():T

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Removes the first element from the Vector and returns that element. The remaining Vector elements are moved from their original position, i, to i - 1.

Returns
T — The first element in the Vector.

Throws
RangeError — If fixed is true.

See also

slice()method 
AS3 function slice(startIndex:int = 0, endIndex:int = 16777215):Vector.<T>

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Returns a new Vector that consists of a range of elements from the original Vector, without modifying the original Vector. The returned Vector includes the startIndex element and all elements up to, but not including, the endIndex element.

If you don't pass any parameters, the new Vector is a duplicate (shallow clone) of the original Vector. If you pass a value of 0 for both parameters, a new, empty Vector is created of the same type as the original Vector.

Parameters
startIndex:int (default = 0) — A number specifying the index of the starting point for the slice. If startIndex is a negative number, the starting point begins at the end of the Vector, where -1 is the last element.
 
endIndex:int (default = 16777215) — A number specifying the index of the ending point for the slice. If you omit this parameter, the slice includes all elements from the starting point to the end of the Vector. If endIndex is a negative number, the ending point is specified from the end of the Vector, where -1 is the last element.

Returns
Vector.<T> — a Vector that consists of a range of elements from the original Vector.
some()method 
AS3 function some(callback:Function, thisObject:Object = null):Boolean

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Executes a test function on each item in the Vector until an item is reached that returns true. Use this method to determine whether any items in a Vector meet a criterion, such as having a value less than a particular number.

For this method, the second parameter, thisObject, must be null if the first parameter, callback, is a method closure. That is the most common way of using this method.

However, suppose you create a function on a frame on the main timeline, but you want it to be called in a different this context:

     function myFunction(item:Object, index:int, vector:Vector.<T>):Boolean {
        // your code here
     }
     

Suppose you then use the some() method on a Vector called myVector:

     myVector.some(myFunction, someObject);
     

Because myFunction is a member of the main class of the SWF file, it cannot be executed in a different this context. Flash runtimes throw an exception when this code runs. You can avoid this runtime error by assigning the function to a variable, as follows:

     var myFunction:Function = function(item:T, index:int, vector:Vector.<T>):Boolean {
         //your code here
     };
     myVector.some(myFunction, someObject);
     
Parameters
callback:Function — The function to run on each item in the Vector. This function is invoked with three arguments: the current item from the Vector, the index of the item, and the Vector object:
function callback(item:T, index:int, vector:Vector.<T>):Boolean

The callback function should return a Boolean value.

 
thisObject:Object (default = null) — The object that the identifer this in the callback function refers to when the function is called.

Returns
Boolean — A Boolean value of true if any items in the Vector return true for the specified function; otherwise, false.

See also

sort()method 
AS3 function sort(sortBehavior:*):Vector.<T>

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Sorts the elements in the Vector object, and also returns a sorted Vector object. This method sorts according to the parameter sortBehavior, which is either a function that compares two values, or a set of sorting options.

The method takes one parameter. The parameter is one of the following:

Parameters
sortBehavior:* — A Function or a Number value that determines the behavior of the sort. A Function parameter specifies a comparison method. A Number value specifies the sorting options.

Returns
Vector.<T> — A Vector object, with elements in the new order.

See also

splice()method 
AS3 function splice(startIndex:int, deleteCount:uint = 4294967295, ... items):Vector.<T>

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Adds elements to and removes elements from the Vector. This method modifies the Vector without making a copy.

Note: To override this method in a subclass of Vector, use ...args for the parameters, as this example shows:

     public override function splice(...args) {
       // your statements here
     }
     
Parameters
startIndex:int — An integer that specifies the index of the element in the Vector where the insertion or deletion begins. You can use a negative integer to specify a position relative to the end of the Vector (for example, -1 for the last element of the Vector).
 
deleteCount:uint (default = 4294967295) — An integer that specifies the number of elements to be deleted. This number includes the element specified in the startIndex parameter. If the value is 0, no elements are deleted.
 
... items — An optional list of one or more comma-separated values to insert into the Vector at the position specified in the startIndex parameter.

Returns
Vector.<T> — a Vector containing the elements that were removed from the original Vector.

Throws
RangeError — If the startIndex and deleteCount arguments specify an index to be deleted that's outside the Vector's bounds.
 
RangeError — If this method is called while fixed is true and the splice() operation changes the length of the Vector.
toLocaleString()method 
public function toLocaleString():String

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Returns a string that represents the elements in the specified Vector. Every element in the Vector, starting with index 0 and ending with the highest index, is converted to a concatenated string and separated by commas. In the ActionScript 3.0 implementation, this method returns the same value as the Vector.toString() method.

Returns
String — A string of Vector elements.

See also

toString()method 
public function toString():String

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Returns a string that represents the elements in the Vector. Every element in the Vector, starting with index 0 and ending with the highest index, is converted to a concatenated string and separated by commas. To specify a custom separator, use the Vector.join() method.

Returns
String — A string of Vector elements.

See also

unshift()method 
AS3 function unshift(... args):uint

Language version: ActionScript 3.0
Runtime version: AIR 1.5

Adds one or more elements to the beginning of the Vector and returns the new length of the Vector. The other elements in the Vector are moved from their original position, i, to i + the number of new elements.

Because this function can accept multiple arguments, the data type of the arguments is not checked at compile time even in strict mode. However, if an argument is passed that is not an instance of the base type, an exception occurs at run time.

Parameters
... args — One or more instances of the base type of the Vector to be inserted at the beginning of the Vector.

Returns
uint — An integer representing the new length of the Vector.

Throws
TypeError — If any argument is not an instance of the base type T of the Vector.
 
RangeError — If this method is called while fixed is true.

See also