﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0014)about:internet -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="book" content="ActionScript&nbsp;3.0&nbsp;Language&nbsp;and&nbsp;Components&nbsp;Reference"><link rel="stylesheet" href="style.css" type="text/css" media="screen"><link rel="stylesheet" href="print.css" type="text/css" media="print"><link rel="stylesheet" href="override.css" type="text/css"><meta name="keywords" content="Vector,globalClassifier.Vector,-Infinity,CASEINSENSITIVE,DESCENDING,E,Infinity,LN10,LN2,LOG10E,LOG2E,MAX_VALUE,MAX_VALUE,MAX_VALUE,MIN_VALUE,MIN_VALUE,MIN_VALUE,NEGATIVE_INFINITY,NUMERIC,NaN,NaN,PI,POSITIVE_INFINITY,RETURNINDEXEDARRAY,SQRT1_2,SQRT2,UNIQUESORT,callee,constructor,date,dateUTC,day,dayUTC,dotall,errorID,extended,fixed,fullYear,fullYearUTC,global,hours,hoursUTC,ignoreCase,ignoreComments,ignoreProcessingInstructions,ignoreWhitespace,lastIndex,length,length,length,length,localName,message,milliseconds,millisecondsUTC,minutes,minutesUTC,month,monthUTC,multiline,name,prefix,prettyIndent,prettyPrinting,prototype,seconds,secondsUTC,source,time,timezoneOffset,undefined,uri,uri,Array,Boolean,Number,Object,String,UTC,Vector,XML,XMLList,abs,acos,addNamespace,appendChild,apply,asin,atan2,atan,attribute,attribute,attributes,attributes,call,ceil,charAt,charCodeAt,child,childIndex,child,children,children,comments,comments,concat,concat,concat,contains,contains,copy,copy,cos,decodeURIComponent,decodeURI,defaultSettings,descendants,descendants,elements,elements,encodeURIComponent,encodeURI,escape,every,every,exec,exp,filter,filter,floor,forEach,forEach,fromCharCode,getDate,getDay,getFullYear,getHours,getMilliseconds,getMinutes,getMonth,getSeconds,getStackTrace,getTime,getTimezoneOffset,getUTCDate,getUTCDay,getUTCFullYear,getUTCHours,getUTCMilliseconds,getUTCMinutes,getUTCMonth,getUTCSeconds,hasComplexContent,hasComplexContent,hasOwnProperty,hasOwnProperty,hasOwnProperty,hasSimpleContent,hasSimpleContent,inScopeNamespaces,indexOf,indexOf,indexOf,insertChildAfter,insertChildBefore,int,isFinite,isNaN,isPrototypeOf,isXMLName,join,join,lastIndexOf,lastIndexOf,lastIndexOf,length,length,localName,localeCompare,log,map,map,match,max,min,name,namespaceDeclarations,namespace,nodeKind,normalize,normalize,parent,parent,parse,parseFloat,parseInt,pop,pop,pow,prependChild,processingInstructions,processingInstructions,propertyIsEnumerable,propertyIsEnumerable,propertyIsEnumerable,push,push,random,removeNamespace,replace,replace,reverse,reverse,round,search,setChildren,setDate,setFullYear,setHours,setLocalName,setMilliseconds,setMinutes,setMonth,setName,setNamespace,setPropertyIsEnumerable,setSeconds,setSettings,setTime,setUTCDate,setUTCFullYear,setUTCHours,setUTCMilliseconds,setUTCMinutes,setUTCMonth,setUTCSeconds,settings,shift,shift,sin,slice,slice,slice,some,some,sortOn,sort,sort,splice,splice,split,sqrt,substr,substring,tan,test,text,text,toDateString,toExponential,toExponential,toExponential,toFixed,toFixed,toFixed,toLocaleDateString,toLocaleLowerCase,toLocaleString,toLocaleString,toLocaleString,toLocaleTimeString,toLocaleUpperCase,toLowerCase,toPrecision,toPrecision,toPrecision,toString,toString,toString,toString,toString,toString,toString,toString,toString,toString,toString,toString,toString,toTimeString,toUTCString,toUpperCase,toXMLString,toXMLString,trace,uint,unescape,unshift,unshift,valueOf,valueOf,valueOf,valueOf,valueOf,valueOf,valueOf,valueOf,valueOf,valueOf,valueOf"><title>Vector (ActionScript 3.0)</title></head><body><script language="javascript" type="text/javascript" src="asdoc.js"></script><script language="javascript" type="text/javascript" src="help.js"></script><script language="javascript" type="text/javascript" src="cookies.js"></script><script language="javascript" type="text/javascript">  
            <!--  
			    
				asdocTitle = 'Vector - ActionScript 3.0 Language and Components Reference';

				var baseRef = '';

				window.onload = configPage;
			      
			    -->  
            </script>
<script language="javascript" type="text/javascript"><!--
function submitValue(){
var searchStr=document.getElementById('search-livedocs').value;
window.location="search.html"+"###"+searchStr;
}
--></script><script type="text/javascript">
		scrollToNameAnchor();
	</script><table class="titleTable" cellpadding="0" cellspacing="0" id="titleTable" style="display:none"><tr><td class="titleTableTitle" align="left">ActionScript 3.0 Language and Components Reference</td><td class="titleTableSearch" align="center"><form class="searchForm" method="get" action="search.html" onsubmit="submitValue();"><input class="hidden" name="loc" value="" type="hidden"><input class="hidden" name="termPrefix" value="" type="hidden"><input class="hidden" name="term" value="" type="hidden"><input class="hidden" name="area" value="" type="hidden"><input id="search-livedocs" name="search_text" value="" title="" type="text"> <input type="button" name="action" value="Search" onclick="submitValue()"></form></td><td class="titleTableTopNav" align="right"><a href="../../Flash/10.0_Welcome/index.html">Home</a>&nbsp;|&nbsp;<a href="package-summary.html" onclick="loadClassListFrame('all-classes.html')">All Packages</a>&nbsp;|&nbsp;<a href="class-summary.html" onclick="loadClassListFrame('all-classes.html')">All Classes</a>&nbsp;|&nbsp;<a href="language-elements.html">Language Elements</a>&nbsp;| <a href="all-index-Symbols.html" onclick="loadClassListFrame('index-list.html')">Index</a>&nbsp;|&nbsp;<a href="appendixes.html">Appendixes</a>&nbsp;|&nbsp;<a href="conventions.html">Conventions</a>&nbsp;|&nbsp;<a id="framesLink1" href="index.html?Vector.html&amp;">Frames</a><a id="noFramesLink1" style="display:none" href="" onclick="parent.location=document.location"> No Frames </a></td><td class="titleTableLogo" align="right" rowspan="3"><img src="images/logo.jpg" class="logoImage" alt=" Adobe Logo " title=" Adobe Logo "></td></tr><tr class="titleTableRow2"><td class="titleTableSubTitle" id="subTitle" align="left">Vector</td><td class="titleTableSubNav" id="subNav" align="right" colspan="2"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#eventSummary">Events</a>&nbsp;| <a href="#styleSummary">Styles</a>&nbsp;| <a href="#effectSummary">Effects</a>&nbsp;| <a href="#constantSummary">Constants</a>&nbsp;| <a href="#includeExamplesSummary">Examples</a></td></tr><tr class="titleTableRow3"><td colspan="3">&nbsp;</td></tr></table><script language="javascript" type="text/javascript" xml:space="preserve">
                
                    
                

				<!--

				
				    
				

					if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Vector"); titleBar_setSubNav(false,true,false	,false,false,false,true,false,false	,false,false,false,false,false);}

				    
				        
				    
				-->
                
                    
                
			</script><div class="MainContent"><table class="classHeaderTable" cellpadding="0" cellspacing="0"><tr><td class="classHeaderTableLabel">Package</td><td><a href="package-detail.html" onclick="javascript:loadClassListFrame('class-list.html')">Top Level</a></td></tr><tr><td class="classHeaderTableLabel">Class</td><td class="classSignature">public dynamic   class  Vector</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">Vector  <img src="images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> <a href="Object.html">Object</a></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p></p>
        The Vector class lets you access and manipulate a vector &mdash; an array whose elements
 all have the same data type. The data type of a Vector's elements is 
 known as the Vector's
        <i>base type</i>
        . 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.
        <p>
          Like with an Array, you can use the array access (
          <code>[]</code>
          ) 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
          <code>push()</code>
          ,
          <code>pop()</code>
          ,
          <code>shift()</code>
          ,
          <code>unshift()</code>
          , 
 and others. The properties 
 and methods of a Vector object are similar &mdash; in most cases identical &mdash; to 
 the properties and methods of an Array. In any case where you would use 
 an Array in which all the elements have the same data type, a Vector instance 
 is preferable.
        </p>
        
               <p>
          The Vector's base type is specified using postfix 
 type parameter syntax. Type parameter syntax is a sequence consisting of 
 a dot (
          <code>.</code>
          ), left angle bracket (
          <code>&lt;</code>
          ), class name, 
 then a right angle bracket (
          <code>></code>
          ), as shown in this example:
        </p>
        
               <div class="listing"><pre>var v:Vector.&lt;String&gt;;
 v = new Vector.&lt;String&gt;();</pre></div>
        
               <p>
          In the first line of the example, the variable
          <code>v</code>
          is declared as a 
 Vector.&lt;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
          <code>v</code>
          .
        </p>
        
               <p>
          A variable declared with the Vector.&lt;T> data type can only store 
 a Vector instance that is constructed with the same base type
          <code>T</code>
          . For example, a Vector that's constructed by calling
          <code>new Vector.&lt;String&gt;()</code>
          can't be assigned to a variable 
 that's declared with the Vector.&lt;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):
        </p>
        
               <div class="listing"><pre>// This code doesn't compile even though Sprite is a DisplayObject subclass
 var v:Vector.&lt;DisplayObject&gt; = new Vector.&lt;Sprite&gt;();</pre></div>
        
               <p>
          To convert a Vector with base type
          <code>T</code>
          to a Vector of a superclass of
          <code>T</code>
          , use the
          <code>Vector()</code>
          global function.
        </p>
        
               <p>In addition to the data type restriction, the Vector class has other restrictions 
 that distinguish it from the Array class:</p>
        
               <ul>
                  <li>
            A Vector is a dense array. Unlike an Array, which may have values in indices 
       0 and 7 even if there are no values in positions 1 through 6, a Vector must have 
       a value (or
            <code>null</code>
            ) in each index.
          </li>
                  <li>A Vector can optionally be fixed-length, meaning the number of elements 
       it contains can't change.</li>
                  <li>
            Access to a Vector's elements is bounds-checked. You can never read a value 
       from an index greater than the final element (
            <code>length - 1</code>
            ). You 
       can never set a value with an index more than one beyond the current final 
       index (in other words, you can only set a value at an existing index or 
       at index
            <code>[length]</code>
            ).
          </li>
               </ul>
        
               <p>As a result of its restrictions, a Vector has two primary benefits over 
 an Array instance whose elements are all instances of a single class:</p>
        
               <ul>
                  <li>Performance: array element access and iteration are much faster when 
       using a Vector instance than when using an Array.</li>
                  <li>
            Type safety: in strict mode the compiler can identify data type errors such as 
       assigning a value of the incorrect data type to a Vector or expecting the wrong data 
       type when reading a value from a Vector. Note, however, that when using the
            <code>push()</code>
            method or
            <code>unshift()</code>
            method to add values to a Vector, the 
       arguments' data types are not checked at compile time but are checked at run time.
          </li>
               </ul>
        
            <p></p><p><span class="classHeaderTableLabel">See also</span></p><div class="seeAlso"><a href="operators.html#array_access" target="">[] array access</a><br/><a href="package.html#Vector()" target="">Vector() global function</a><br/><a href="Array.html" target="">Array class</a></div><br/><hr></div><a name="propertySummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Properties</div><div class="showHideLinks"><div id="hideInheritedProperty" class="hideInheritedProperty"><a class="showHideLink" href="#propertySummary" onclick="javascript:setInheritedVisible(false,'Property');"><img class="showHideLinkImage" src="images/expanded.gif"> Hide Inherited Public Properties</a></div><div id="showInheritedProperty" class="showInheritedProperty"><a class="showHideLink" href="#propertySummary" onclick="javascript:setInheritedVisible(true,'Property');"><img class="showHideLinkImage" src="images/collapsed.gif"> Show Inherited Public Properties</a></div></div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableProperty"><tr><th>&nbsp;</th><th colspan="2">Property</th><th>Defined By</th></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="Object.html#constructor" class="signatureLink">constructor</a> : <a href="Object.html">Object</a><div class="summaryTableDescription">A reference to the class object or constructor function for a given object instance.</div></td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#fixed" class="signatureLink">fixed</a> : <a href="Boolean.html">Boolean</a><div class="summaryTableDescription">Indicates whether the length property of the Vector can 
  be changed.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#length" class="signatureLink">length</a> : <a href="uint.html">uint</a><div class="summaryTableDescription">The range of valid indices available in the Vector.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="Object.html#prototype" class="signatureLink">prototype</a> : <a href="Object.html">Object</a><div class="summaryTableDescription">[static] A reference to the prototype object of a class or function object.</div></td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td></tr></table></div><a name="methodSummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Methods </div><div class="showHideLinks"><div id="hideInheritedMethod" class="hideInheritedMethod"><a class="showHideLink" href="#methodSummary" onclick="javascript:setInheritedVisible(false,'Method');"><img class="showHideLinkImage" src="images/expanded.gif"> Hide Inherited Public Methods</a></div><div id="showInheritedMethod" class="showInheritedMethod"><a class="showHideLink" href="#methodSummary" onclick="javascript:setInheritedVisible(true,'Method');"><img class="showHideLinkImage" src="images/collapsed.gif"> Show Inherited Public Methods</a></div></div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableMethod"><tr><th>&nbsp;</th><th colspan="2">Method</th><th>Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#Vector()" class="signatureLink">Vector</a>(length:<a href="uint.html">uint</a> = 0, fixed:<a href="Boolean.html">Boolean</a> = false)</div><div class="summaryTableDescription">Creates a Vector with the specified base type.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#concat()" class="signatureLink">concat</a>(<a href="statements.html#..._(rest)_parameter">...</a> args):<a href="Vector.html">Vector</a>.&lt;T&gt;</div><div class="summaryTableDescription">Concatenates the elements specified in the parameters with the elements 
  in the Vector and creates a new Vector.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#every()" class="signatureLink">every</a>(callback:<a href="Function.html">Function</a>, thisObject:<a href="Object.html">Object</a> = null):<a href="Boolean.html">Boolean</a></div><div class="summaryTableDescription">Executes a test function on each item in the Vector until an item is 
 reached that returns false for the specified function.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#filter()" class="signatureLink">filter</a>(callback:<a href="Function.html">Function</a>, thisObject:<a href="Object.html">Object</a> = null):<a href="Vector.html">Vector</a>.&lt;T&gt;</div><div class="summaryTableDescription">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.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#forEach()" class="signatureLink">forEach</a>(callback:<a href="Function.html">Function</a>, thisObject:<a href="Object.html">Object</a> = null):<a href="specialTypes.html#void">void</a></div><div class="summaryTableDescription">Executes a function on each item in the Vector.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="Object.html#hasOwnProperty()" class="signatureLink">hasOwnProperty</a>(name:<a href="String.html">String</a>):<a href="Boolean.html">Boolean</a></div><div class="summaryTableDescription">Indicates whether an object has a specified property defined.</div></td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#indexOf()" class="signatureLink">indexOf</a>(searchElement:T, fromIndex:<a href="int.html">int</a> = 0):<a href="int.html">int</a></div><div class="summaryTableDescription">Searches for an item in the Vector and returns the index position of the item.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="Object.html#isPrototypeOf()" class="signatureLink">isPrototypeOf</a>(theClass:<a href="Object.html">Object</a>):<a href="Boolean.html">Boolean</a></div><div class="summaryTableDescription">Indicates whether an instance of the Object class is in the prototype chain of the object specified 
  as the parameter.</div></td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#join()" class="signatureLink">join</a>(sep:<a href="String.html">String</a> = ","):<a href="String.html">String</a></div><div class="summaryTableDescription">Converts the elements in the Vector to strings, inserts the specified separator between the 
     elements, concatenates them, and returns the resulting string.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#lastIndexOf()" class="signatureLink">lastIndexOf</a>(searchElement:T, fromIndex:<a href="int.html">int</a> = 0x7fffffff):<a href="int.html">int</a></div><div class="summaryTableDescription">Searches for an item in the Vector, working backward from the specified 
  index position, and returns the index position of the matching item.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#map()" class="signatureLink">map</a>(callback:<a href="Function.html">Function</a>, thisObject:<a href="Object.html">Object</a> = null):<a href="Vector.html">Vector</a>.&lt;T&gt;</div><div class="summaryTableDescription">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.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#pop()" class="signatureLink">pop</a>():T</div><div class="summaryTableDescription">Removes the last element from the Vector and returns that element.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="Object.html#propertyIsEnumerable()" class="signatureLink">propertyIsEnumerable</a>(name:<a href="String.html">String</a>):<a href="Boolean.html">Boolean</a></div><div class="summaryTableDescription">Indicates whether the specified property exists and is enumerable.</div></td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#push()" class="signatureLink">push</a>(<a href="statements.html#..._(rest)_parameter">...</a> args):<a href="uint.html">uint</a></div><div class="summaryTableDescription">Adds one or more elements to the end of the Vector and returns 
  the new length of the Vector.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#reverse()" class="signatureLink">reverse</a>():<a href="Vector.html">Vector</a>.&lt;T&gt;</div><div class="summaryTableDescription">Reverses the order of the elements in the Vector.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="Object.html#setPropertyIsEnumerable()" class="signatureLink">setPropertyIsEnumerable</a>(name:<a href="String.html">String</a>, isEnum:<a href="Boolean.html">Boolean</a> = true):<a href="specialTypes.html#void">void</a></div><div class="summaryTableDescription">Sets the availability of a dynamic property for loop operations.</div></td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#shift()" class="signatureLink">shift</a>():T</div><div class="summaryTableDescription">Removes the first element from the Vector and returns that element.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#slice()" class="signatureLink">slice</a>(startIndex:<a href="int.html">int</a> = 0, endIndex:<a href="int.html">int</a> = 16777215):<a href="Vector.html">Vector</a>.&lt;T&gt;</div><div class="summaryTableDescription">Returns a new Vector that consists of a range of elements from 
  the original Vector, without modifying the original Vector.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#some()" class="signatureLink">some</a>(callback:<a href="Function.html">Function</a>, thisObject:<a href="Object.html">Object</a> = null):<a href="Boolean.html">Boolean</a></div><div class="summaryTableDescription">Executes a test function on each item in the Vector until an 
  item is reached that returns true.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#sort()" class="signatureLink">sort</a>(compareFunction:<a href="Function.html">Function</a>):<a href="Vector.html">Vector</a>.&lt;T&gt;</div><div class="summaryTableDescription">Sorts the elements in the Vector.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#splice()" class="signatureLink">splice</a>(startIndex:<a href="int.html">int</a>, deleteCount:<a href="uint.html">uint</a>, <a href="statements.html#..._(rest)_parameter">...</a> items):<a href="Vector.html">Vector</a>.&lt;T&gt;</div><div class="summaryTableDescription">Adds elements to and removes elements from the Vector.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#toLocaleString()" class="signatureLink">toLocaleString</a>():<a href="String.html">String</a></div><div class="summaryTableDescription">Returns a string that represents the elements in the specified Vector.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#toString()" class="signatureLink">toString</a>():<a href="String.html">String</a></div><div class="summaryTableDescription">Returns a string that represents the elements in the Vector.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#unshift()" class="signatureLink">unshift</a>(<a href="statements.html#..._(rest)_parameter">...</a> args):<a href="uint.html">uint</a></div><div class="summaryTableDescription">Adds one or more elements to the beginning of the Vector and returns 
  the new length of the Vector.</div></td><td class="summaryTableOwnerCol">Vector</td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="Object.html#valueOf()" class="signatureLink">valueOf</a>():<a href="Object.html">Object</a></div><div class="summaryTableDescription">Returns the primitive value of the specified object.</div></td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td></tr></table></div><script language="javascript" type="text/javascript"><!--
                      showHideInherited();
                      --></script><div class="MainContent"><div class="detailSectionHeader">Property Detail</div><a name="propertyDetail"></a><a name="fixed"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">fixed</td><td class="detailHeaderType">property</td></tr></table><div class="detailBody"><code>fixed:<a href="Boolean.html">Boolean</a></code>&nbsp;&nbsp;[read-write] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          Indicates whether the
          <code>length</code>
          property of the Vector can 
  be changed. If the value is
          <code>false</code>
          , the
          <code>length</code>
          property can't be changed. This means the following operations are not 
  allowed when
          <code>fixed</code>
          is
          <code>true</code>
          :
          <ul><li>
              setting the
              <code>length</code>
              property directly
            </li><li>
              assigning a value to index position
              <code>length</code>
            </li><li>
              calling a method that changes the
              <code>length</code>
              property, including:
              <ul><li>
                  <code>pop()</code>
                </li><li>
                  <code>push()</code>
                </li><li>
                  <code>shift()</code>
                </li><li>
                  <code>unshift()</code>
                </li><li>
                  <code>splice()</code>
                  (if the
                  <code>splice()</code>
                  call changes 
            the
                  <code>length</code>
                  of the Vector).
                </li></ul>
              
            </li></ul>
          
        </p><br/><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get fixed():<a href="Boolean.html">Boolean</a></code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set fixed(value:<a href="Boolean.html">Boolean</a>):<a href="specialTypes.html#void">void</a></code><br/></div><a name="propertyDetail"></a><a name="length"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">length</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>length:<a href="uint.html">uint</a></code>&nbsp;&nbsp;[read-write] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          The range of valid indices available in the Vector. 
  A Vector instance has index positions up to but not including 
  the
          <code>length</code>
          value.
          <p>
            Every Vector element always has a value that is either an 
  instance of the base type or
            <code>null</code>
            . When the
            <code>length</code>
            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 (
            <code>null</code>
            for reference types).
          </p>
          
          <p>
            When the
            <code>length</code>
            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
            <code>length</code>
            value are removed from the Vector.
          </p>
          
        </p><br/><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get length():<a href="uint.html">uint</a></code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set length(value:<a href="uint.html">uint</a>):<a href="specialTypes.html#void">void</a></code><br/><br/><span class="label"> Throws </span><br/><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="RangeError.html">RangeError</a> </code> &mdash; 
              If this property is changed 
  while
              <code>fixed</code>
              is
              <code>true</code>
              .
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20"></td><td><code><a href="RangeError.html">RangeError</a> </code> &mdash; 
              If this property is set to a value larger 
  than the maximum allowable index (2
              <sup>32</sup>
              ).
            </td></tr></table></div><a name="constructorDetail"></a><div class="detailSectionHeader">Constructor Detail</div><a name="Vector()"></a><a name="Vector(uint,Boolean)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">Vector</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">Constructor</td></tr></table><div class="detailBody"><code>public function Vector(length:<a href="uint.html">uint</a> = 0, fixed:<a href="Boolean.html">Boolean</a> = false)</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p>
          Creates a Vector with the specified base type.
          <p>
            When calling the
            <code>Vector.&lt;T&gt;()</code>
            constructor, specify the
  base type using type parameter syntax. Type parameter syntax is a 
  sequence consisting of a dot (
            <code>.</code>
            ), left angle bracket 
  (
            <code>&lt;</code>
            ), class name, then a right angle bracket 
  (
            <code>></code>
            ), as shown in this example:
          </p>
          
          <pre>var v:Vector.&lt;String> = new Vector.&lt;String>();</pre>
          
          <p>
            Unlike with the Array class, you can't use the
            <code>Vector.&lt;T&gt;()</code>
            constructor to create a pre-populated Vector instance. To create a Vector 
  instance from an Array or another Vector (such as one with a different base 
  type), use the
            <code>Vector()</code>
            global function.
          </p>
          
        </p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">length</span>:<a href="uint.html">uint</a></code> (default = <code>0</code>)<code></code> &mdash; 
              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 (
              <code>null</code>
              for reference types).
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">fixed</span>:<a href="Boolean.html">Boolean</a></code> (default = <code>false</code>)<code></code> &mdash; 
              Whether the Vector's length is fixed (
              <code>true</code>
              ) or 
  can be changed (
              <code>false</code>
              ). This value can also be set using 
  the
              <code>fixed</code>
              property.
            </td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="package.html#Vector()" target="">Vector() global function</a></div></div><a name="methodDetail"></a><div class="detailSectionHeader">Method Detail</div><a name="concat()"></a><a name="concat(restParam)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">concat</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function concat(<a href="statements.html#..._(rest)_parameter">...</a> args):<a href="Vector.html">Vector</a>.&lt;T&gt;</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          Concatenates the elements specified in the parameters with the elements 
  in the Vector and creates a new Vector. If the parameters specify a Vector, 
  the elements of that Vector are concatenated.
          <div class="listing"><pre>hello world</pre></div>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><a href="statements.html#..._(rest)_parameter">...</a> <span class="label">args</span></code> &mdash; One or more values of the base type of this Vector 
  to be concatenated in a new Vector. If you don't 
     pass any values, the new Vector is a duplicate of the original Vector.</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Vector.html">Vector</a>.&lt;T&gt;</code> &mdash; A Vector with the same base type as this Vector that contains 
  the elements from this Vector followed by elements from the parameters.</td></tr></table><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="TypeError.html">TypeError</a> </code> &mdash; If any argument is not an instance of the base type 
  and can't be converted to the base type.</td></tr></table></div><a name="every()"></a><a name="every(Function,Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">every</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function every(callback:<a href="Function.html">Function</a>, thisObject:<a href="Object.html">Object</a> = null):<a href="Boolean.html">Boolean</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          Executes a test function on each item in the Vector until an item is 
 reached that returns
          <code>false</code>
          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.
          <p>
            For this method, the second parameter,
            <code>thisObject</code>
            , must be
            <code>null</code>
            if the
 first parameter,
            <code>callback</code>
            , is a method closure. That is 
 the most common way of using this method.
          </p>
          
          <p>
            However, suppose you create a function on a frame on the main timeline, 
 but you want it to be called in a different
            <code>this</code>
            context:
          </p>
          
          <pre>function myFunction(item:T, index:int, vector:Vector.&lt;T>):Boolean {
    // your code here
 }</pre>
          
          <p>
            Suppose you then use the
            <code>every()</code>
            method on a Vector called
            <code>myVector</code>
            :
          </p>
          
          <pre>myVector.every(myFunction, someObject);</pre>
          
          <p>
            Because
            <code>myFunction</code>
            is a member of the 
 main class of the SWF, it cannot be executed in a different
            <code>this</code>
            context. Flash 
 Player or AIR throws an exception when this code runs. You can avoid this runtime error 
 by assigning the function to a variable, as follows:
          </p>
          
          <pre>var myFunction:Function = function(item:T, index:int, vector:Vector.&lt;T>):Boolean {
     //your code here
 };
 myVector.every(myFunction, someObject);</pre>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">callback</span>:<a href="Function.html">Function</a></code> &mdash; 
              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:
              <pre>function callback(item:T, index:int, vector:Vector.&lt;T>):Boolean {
    // your code here
 }</pre>
              
              <p>The callback function should return a Boolean value.</p>
              
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">thisObject</span>:<a href="Object.html">Object</a></code> (default = <code>null</code>)<code></code> &mdash; 
              The object that the identifer
              <code>this</code>
              in the 
 callback function refers to when the function is called.
            </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> &mdash; 
              A Boolean value of
              <code>true</code>
              if the specified function returns
              <code>true</code>
              when called on all items in the Vector; otherwise,
              <code>false</code>
              .
            </td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="Vector.html#some()" target="">Vector.some()</a></div></div><a name="filter()"></a><a name="filter(Function,Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">filter</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function filter(callback:<a href="Function.html">Function</a>, thisObject:<a href="Object.html">Object</a> = null):<a href="Vector.html">Vector</a>.&lt;T&gt;</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          Executes a test function on each item in the Vector and returns 
  a new Vector containing all items that return
          <code>true</code>
          for the 
  specified function. If an item returns
          <code>false</code>
          , 
  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.
          <p>
            For this method, the second parameter,
            <code>thisObject</code>
            , must be
            <code>null</code>
            if the
     first parameter,
            <code>callback</code>
            , is a method closure. That is 
  the most common way of using this method.
          </p>
          
          <p>
            However, suppose you create a function on a frame on the main timeline, 
  but you want it to be called in a different
            <code>this</code>
            context:
          </p>
          
          <pre>function myFunction(item:T, index:int, vector:Vector.&lt;T>):Boolean {
        // your code here
     }</pre>
          
          <p>
            Suppose you then use the
            <code>filter()</code>
            method on a Vector called
            <code>myVector</code>
            :
          </p>
          
          <pre>var result:Vector.&lt;T> = myVector.filter(myFunction, someObject);</pre>
          
          <p>
            Because
            <code>myFunction</code>
            is a member of the 
  main class of the SWF, it cannot be executed in a different
            <code>this</code>
            context. Flash 
  Player throws an exception when this code runs. You can avoid this runtime error 
  by assigning the function to a variable, as follows:
          </p>
          
          <pre>var myFunction:Function = function(item:T, index:int, vector:Vector.&lt;T>):Boolean {
         //your code here
     };
     myVector.filter(myFunction, someObject);</pre>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">callback</span>:<a href="Function.html">Function</a></code> &mdash; 
              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:
              <pre>function callback(item:T, index:int, vector:Vector.&lt;T>):Boolean;</pre>
              
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">thisObject</span>:<a href="Object.html">Object</a></code> (default = <code>null</code>)<code></code> &mdash; 
              The object that the identifer
              <code>this</code>
              in the 
  callback function refers to when the function is called.
            </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Vector.html">Vector</a>.&lt;T&gt;</code> &mdash; 
              A new Vector that contains all items from the original Vector 
  for which the
              <code>callback</code>
              function returned
              <code>true</code>
              .
            </td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="Vector.html#map()" target="">Vector.map()</a></div></div><a name="forEach()"></a><a name="forEach(Function,Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">forEach</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function forEach(callback:<a href="Function.html">Function</a>, thisObject:<a href="Object.html">Object</a> = null):<a href="specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          Executes a function on each item in the Vector.
          <p>
            For this method, the second parameter,
            <code>thisObject</code>
            , must be
            <code>null</code>
            if the
     first parameter,
            <code>callback</code>
            , is a method closure. That is 
  the most common way of using this method.
          </p>
          
          <p>
            However, suppose you create a function on a frame on the main timeline, 
  but you want it to be called in a different
            <code>this</code>
            context:
          </p>
          
          <pre>function myFunction(item:T, index:int, vector:Vector.&lt;T>):void {
        // your code here
     }</pre>
          
          <p>
            Suppose you then use the
            <code>forEach()</code>
            method on a Vector called
            <code>myVector</code>
            :
          </p>
          
          <pre>myVector.forEach(myFunction, someObject);</pre>
          
          <p>
            Because
            <code>myFunction</code>
            is a member of the 
  main class of the SWF, it cannot be executed in a different
            <code>this</code>
            context. Flash 
  Player throws an exception when this code runs. You can avoid this runtime error 
  by assigning the function to a variable, as follows:
          </p>
          
          <pre>var myFunction:Function = function(item:T, index:int, vector:Vector.&lt;T>):void {
         //your code here
     };
     myVector.forEach(myFunction, someObject);</pre>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">callback</span>:<a href="Function.html">Function</a></code> &mdash; 
              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:
              <pre>function callback(item:T, index:int, vector:Vector.&lt;T>):void;</pre>
              
              <p>Any return value from the function call is discarded.</p>
              
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">thisObject</span>:<a href="Object.html">Object</a></code> (default = <code>null</code>)<code></code> &mdash; 
              The object that the identifer
              <code>this</code>
              in the 
  callback function refers to when the function is called.
            </td></tr></table></p></div><a name="indexOf()"></a><a name="indexOf(T,int)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">indexOf</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function indexOf(searchElement:T, fromIndex:<a href="int.html">int</a> = 0):<a href="int.html">int</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          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 (
          <code>===</code>
          ).
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">searchElement</span>:T</code> &mdash; The item to find in the Vector.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">fromIndex</span>:<a href="int.html">int</a></code> (default = <code>0</code>)<code></code> &mdash; 
              The location in the Vector from which to start searching 
  for the item. If this parameter is negative, it is treated as
              <code>length 
  + fromIndex</code>
              , meaning the search starts
              <code>-fromIndex</code>
              items 
  from the end and searches from that position forward to the end of the Vector.
            </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="int.html">int</a></code> &mdash; 
              A zero-based index position of the item in the Vector. 
  If the
              <code>searchElement</code>
              argument is not found, 
  the return value is -1.
            </td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="Vector.html#lastIndexOf()" target="">Vector.lastIndexOf()</a><br/><a href="operators.html#strict_equality" target="">=== (strict equality)</a></div></div><a name="join()"></a><a name="join(String)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">join</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function join(sep:<a href="String.html">String</a> = ","):<a href="String.html">String</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          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
          <code>join()</code>
          method.
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">sep</span>:<a href="String.html">String</a></code> (default = "<code>,</code>")<code></code> &mdash; 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.</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="String.html">String</a></code> &mdash; A string consisting of the elements of the Vector
     converted to strings and separated by the specified string.</td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="String.html#split()" target="">String.split()</a></div></div><a name="lastIndexOf()"></a><a name="lastIndexOf(T,int)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">lastIndexOf</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function lastIndexOf(searchElement:T, fromIndex:<a href="int.html">int</a> = 0x7fffffff):<a href="int.html">int</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          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 (
          <code>===</code>
          ).
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">searchElement</span>:T</code> &mdash; The item to find in the Vector.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">fromIndex</span>:<a href="int.html">int</a></code> (default = <code>0x7fffffff</code>)<code></code> &mdash; 
              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.
              <p>
                If this parameter is negative, it is treated as
                <code>length + fromIndex</code>
                , meaning the search starts
                <code>-fromIndex</code>
                items from the end and searches from that 
  position backward to index 0.
              </p>
              
            </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="int.html">int</a></code> &mdash; 
              A zero-based index position of the item in the Vector. 
  If the
              <code>searchElement</code>
              argument is not found, 
  the return value is -1.
            </td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="Vector.html#indexOf()" target="">Vector.indexOf()</a><br/><a href="operators.html#strict_equality" target="">=== (strict equality)</a></div></div><a name="map()"></a><a name="map(Function,Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">map</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function map(callback:<a href="Function.html">Function</a>, thisObject:<a href="Object.html">Object</a> = null):<a href="Vector.html">Vector</a>.&lt;T&gt;</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          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
          <code>length</code>
          as the original Vector. 
  The element at index
          <code>i</code>
          in the result Vector is the result of 
  the call on the element at index
          <code>i</code>
          in the original Vector.
          <p>
            For this method, the second parameter,
            <code>thisObject</code>
            , must be
            <code>null</code>
            if the
     first parameter,
            <code>callback</code>
            , is a method closure. That is 
  the most common way of using this method.
          </p>
          
          <p>
            However, suppose you create a function on a frame on the main timeline, 
  but you want it to be called in a different
            <code>this</code>
            context:
          </p>
          
          <pre>function myFunction(item:Object, index:int, vector:Vector.&lt;T>):T {
        // your code here
     }</pre>
          
          <p>
            Suppose you then use the
            <code>map()</code>
            method on a Vector called
            <code>myVector</code>
            :
          </p>
          
          <pre>myVector.map(myFunction, someObject);</pre>
          
          <p>
            Because
            <code>myFunction</code>
            is a member of the 
  main class of the SWF, it cannot be executed in a different
            <code>this</code>
            context. Flash 
  Player throws an exception when this code runs. You can avoid this runtime error 
  by assigning the function to a variable, as follows:
          </p>
          
          <pre>var myFunction:Function = function(item:T, index:int, vector:Vector.&lt;T>):void {
         //your code here
     };
     myVector.map(myFunction, someObject);</pre>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">callback</span>:<a href="Function.html">Function</a></code> &mdash; 
              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:
              <pre>function callback(item:T, index:int, vector:Vector.&lt;T>):T;</pre>
              
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">thisObject</span>:<a href="Object.html">Object</a></code> (default = <code>null</code>)<code></code> &mdash; 
              The object that the identifer
              <code>this</code>
              in the 
  callback function refers to when the function is called.
            </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Vector.html">Vector</a>.&lt;T&gt;</code> &mdash; 
              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
              <code>length</code>
              as the original.
            </td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="Vector.html#filter()" target="">Vector.filter()</a></div></div><a name="pop()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">pop</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function pop():T</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          Removes the last element from the Vector and returns that element. The
          <code>length</code>
          property of the Vector is decreased by one when 
  this function is called.
        </p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>T</code> &mdash; The value of the last element in the specified Vector.</td></tr></table><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="RangeError.html">RangeError</a> </code> &mdash; 
              If this method is called while
              <code>fixed</code>
              is
              <code>true</code>
              .
            </td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="Vector.html#push()" target="">Vector.push()</a><br/><a href="Vector.html#shift()" target="">Vector.shift()</a><br/><a href="Vector.html#unshift()" target="">Vector.unshift()</a></div></div><a name="push()"></a><a name="push(restParam)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">push</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function push(<a href="statements.html#..._(rest)_parameter">...</a> args):<a href="uint.html">uint</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          Adds one or more elements to the end of the Vector and returns 
  the new length of the Vector.
          <p>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.</p>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><a href="statements.html#..._(rest)_parameter">...</a> <span class="label">args</span></code> &mdash; One or more values to append to the Vector.</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="uint.html">uint</a></code> &mdash; The length of the Vector after the new elements are added.</td></tr></table><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="TypeError.html">TypeError</a> </code> &mdash; 
              If any argument is not an instance of the 
  base type
              <code>T</code>
              of the Vector.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20"></td><td><code><a href="RangeError.html">RangeError</a> </code> &mdash; 
              If this method is called while
              <code>fixed</code>
              is
              <code>true</code>
              .
            </td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="Vector.html#pop()" target="">Vector.pop()</a><br/><a href="Vector.html#shift()" target="">Vector.shift()</a><br/><a href="Vector.html#unshift()" target="">Vector.unshift()</a></div></div><a name="reverse()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">reverse</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function reverse():<a href="Vector.html">Vector</a>.&lt;T&gt;</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>Reverses the order of the elements in the Vector. This method 
  alters the Vector on which it is called.</p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Vector.html">Vector</a>.&lt;T&gt;</code> &mdash; The Vector with the elements in reverse order.</td></tr></table></div><a name="shift()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">shift</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function shift():T</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>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.</p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>T</code> &mdash; The first element in the Vector.</td></tr></table><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="RangeError.html">RangeError</a> </code> &mdash; 
              If
              <code>fixed</code>
              is
              <code>true</code>
              .
            </td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="Vector.html#pop()" target="">Vector.pop()</a><br/><a href="Vector.html#push()" target="">Vector.push()</a><br/><a href="Vector.html#unshift()" target="">Vector.unshift()</a></div></div><a name="slice()"></a><a name="slice(int,int)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">slice</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function slice(startIndex:<a href="int.html">int</a> = 0, endIndex:<a href="int.html">int</a> = 16777215):<a href="Vector.html">Vector</a>.&lt;T&gt;</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          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
          <code>startIndex</code>
          element and 
  all elements up to, but not including, the
          <code>endIndex</code>
          element.
          <p>If you don't pass any parameters, a duplicate of the original 
  Vector is created.</p>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">startIndex</span>:<a href="int.html">int</a></code> (default = <code>0</code>)<code></code> &mdash; 
              A number specifying the index of the starting point 
     for the slice. If
              <code>startIndex</code>
              is a negative number, the starting 
     point begins at the end of the Vector, where -1 is the last element.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">endIndex</span>:<a href="int.html">int</a></code> (default = <code>16777215</code>)<code></code> &mdash; 
              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
              <code>endIndex</code>
              is a negative 
     number, the ending point is specified from the end of the Vector, where -1 is the 
     last element.
            </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Vector.html">Vector</a>.&lt;T&gt;</code> &mdash; a Vector that consists of a range of elements from the original Vector.</td></tr></table></div><a name="some()"></a><a name="some(Function,Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">some</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function some(callback:<a href="Function.html">Function</a>, thisObject:<a href="Object.html">Object</a> = null):<a href="Boolean.html">Boolean</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          Executes a test function on each item in the Vector until an 
  item is reached that returns
          <code>true</code>
          . Use this method 
  to determine whether any items in a Vector meet a criterion, such as 
  having a value less than a particular number.
          <p>
            For this method, the second parameter,
            <code>thisObject</code>
            , must be
            <code>null</code>
            if the
     first parameter,
            <code>callback</code>
            , is a method closure. That is 
  the most common way of using this method.
          </p>
          
          <p>
            However, suppose you create a function on a frame on the main timeline, 
  but you want it to be called in a different
            <code>this</code>
            context:
          </p>
          
          <pre>function myFunction(item:Object, index:int, vector:Vector.&lt;T>):Boolean {
        // your code here
     }</pre>
          
          <p>
            Suppose you then use the
            <code>some()</code>
            method on a Vector called
            <code>myVector</code>
            :
          </p>
          
          <pre>myVector.some(myFunction, someObject);</pre>
          
          <p>
            Because
            <code>myFunction</code>
            is a member of the 
  main class of the SWF, it cannot be executed in a different
            <code>this</code>
            context. Flash 
  Player throws an exception when this code runs. You can avoid this runtime error 
  by assigning the function to a variable, as follows:
          </p>
          
          <pre>var myFunction:Function = function(item:T, index:int, vector:Vector.&lt;T>):Boolean {
         //your code here
     };
     myVector.some(myFunction, someObject);</pre>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">callback</span>:<a href="Function.html">Function</a></code> &mdash; 
              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:
              <pre>function callback(item:T, index:int, vector:Vector.&lt;T>):Boolean</pre>
              
              <p>The callback function should return a Boolean value.</p>
              
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">thisObject</span>:<a href="Object.html">Object</a></code> (default = <code>null</code>)<code></code> &mdash; 
              The object that the identifer
              <code>this</code>
              in the 
  callback function refers to when the function is called.
            </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> &mdash; 
              A Boolean value of
              <code>true</code>
              if any items in the Vector return
              <code>true</code>
              for the specified function; otherwise,
              <code>false</code>
              .
            </td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="Vector.html#every()" target="">every()</a></div></div><a name="sort()"></a><a name="sort(Function)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">sort</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function sort(compareFunction:<a href="Function.html">Function</a>):<a href="Vector.html">Vector</a>.&lt;T&gt;</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          Sorts the elements in the Vector. This method sorts according to the function 
  provided as the
          <code>compareFunction</code>
          parameter.
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">compareFunction</span>:<a href="Function.html">Function</a></code> &mdash; 
              A comparison method that determines 
  the behavior of the sort.
              <p>
                The specified method must take two arguments of the base type (
                <code>T</code>
                ) 
  of the Vector and return a Number:
              </p>
              
              <div class="listing"><pre>function compare(x:T, y:T):Number {}</pre></div>
              
              <p>
                The logic of the
                <code>compareFunction</code>
                function is that, given two 
  elements
                <code>x</code>
                and
                <code>y</code>
                , the function returns one of the 
  following three values:
              </p>
              
              <ul><li>
                  a negative number, if
                  <code>x</code>
                  should appear before
                  <code>y</code>
                  in the sorted sequence
                </li><li>
                  0, if
                  <code>x</code>
                  equals
                  <code>y</code>
                </li><li>
                  a positive number, if
                  <code>x</code>
                  should appear after
                  <code>y</code>
                  in the sorted sequence
                </li></ul>
              
            </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Vector.html">Vector</a>.&lt;T&gt;</code> &mdash; This Vector, with elements in the new order.</td></tr></table></div><a name="splice()"></a><a name="splice(int,uint,restParam)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">splice</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function splice(startIndex:<a href="int.html">int</a>, deleteCount:<a href="uint.html">uint</a>, <a href="statements.html#..._(rest)_parameter">...</a> items):<a href="Vector.html">Vector</a>.&lt;T&gt;</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          Adds elements to and removes elements from the Vector. This method modifies 
  the Vector without making a copy.
          <p>
            <b>Note:</b>
            To override this method in a subclass of Vector, 
  use
            <code>...args</code>
            for the parameters, as this example shows:
          </p>
          
          <pre>public override function splice(...args) {
       // your statements here
     }</pre>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">startIndex</span>:<a href="int.html">int</a></code> &mdash; 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).</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">deleteCount</span>:<a href="uint.html">uint</a></code> &mdash; 
              An integer that specifies the number of elements 
  to be deleted. This number includes the element specified in the
              <code>startIndex</code>
              parameter. If you do not specify a value for the
              <code>deleteCount</code>
              parameter, the method deletes all of the values 
  from the
              <code>startIndex</code>
              element to the last element in the Vector. 
  If the value is 0, no elements are deleted.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><a href="statements.html#..._(rest)_parameter">...</a> <span class="label">items</span></code> &mdash; 
              An optional list of one or more comma-separated values, or a Vector,
     to insert into the Vector at the position specified in the
              <code>startIndex</code>
              parameter.
            </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Vector.html">Vector</a>.&lt;T&gt;</code> &mdash; a Vector containing the elements that were removed from the original Vector.</td></tr></table><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="RangeError.html">RangeError</a> </code> &mdash; 
              If the
              <code>startIndex</code>
              and
              <code>deleteCount</code>
              arguments specify an index to be deleted that's outside the Vector's bounds.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20"></td><td><code><a href="RangeError.html">RangeError</a> </code> &mdash; 
              If this method is called while
              <code>fixed</code>
              is
              <code>true</code>
              and the
              <code>splice()</code>
              operation changes the
              <code>length</code>
              of the Vector.
            </td></tr></table></div><a name="toLocaleString()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">toLocaleString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function toLocaleString():<a href="String.html">String</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          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
          <code>Vector.toString()</code>
          method.
        </p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="String.html">String</a></code> &mdash; A string of Vector elements.</td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="Vector.html#toString()" target="">Vector.toString()</a></div></div><a name="toString()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">toString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function toString():<a href="String.html">String</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          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
          <code>Vector.join()</code>
          method.
        </p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="String.html">String</a></code> &mdash; A string of Vector elements.</td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="String.html#split()" target="">String.split()</a><br/><a href="Vector.html#join()" target="">Vector.join()</a></div></div><a name="unshift()"></a><a name="unshift(restParam)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">unshift</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function unshift(<a href="statements.html#..._(rest)_parameter">...</a> args):<a href="uint.html">uint</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          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.
          <p>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.</p>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><a href="statements.html#..._(rest)_parameter">...</a> <span class="label">args</span></code> &mdash; One or more instances of the base type of the Vector 
  to be inserted at the beginning of the Vector.</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="uint.html">uint</a></code> &mdash; An integer representing the new length of the Vector.</td></tr></table><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="TypeError.html">TypeError</a> </code> &mdash; 
              If any argument is not an instance of the 
  base type
              <code>T</code>
              of the Vector.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20"></td><td><code><a href="RangeError.html">RangeError</a> </code> &mdash; 
              If this method is called while
              <code>fixed</code>
              is
              <code>true</code>
              .
            </td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="Vector.html#pop()" target="">Vector.pop()</a><br/><a href="Vector.html#push()" target="">Vector.push()</a><br/><a href="Vector.html#shift()" target="">Vector.shift()</a></div></div><br/><br/><hr><br/><p></p><center class="copyright"> &copy; 2004-2008 Adobe Systems Incorporated. All rights reserved. <br/>Thu Oct 30 2008, 07:08 PM -07:00  </center><div style="display:none">Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector Vector </div></div></body></html><!-- &copy; 2004-2008 Adobe Systems Incorporated. All rights reserved. <br/>Thu Oct 30 2008, 07:08 PM -07:00  -->
