<?xml version="1.0"?>
<apiPackage id="__Global__"><apiName>__Global__</apiName><apiDetail/><apiClassifier id="globalClassifier:VerifyError"><apiName>VerifyError</apiName><shortdesc>
 The VerifyError class represents an error that occurs when a malformed 
 or corrupted SWF file is encountered.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Error
 </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/><apiTipTexts><apiTipText>An VerifyError is thrown when a malformed or corrupted SWF File is encountered.
 
 </apiTipText></apiTipTexts><apiBaseClassifier>Error</apiBaseClassifier></apiClassifierDef><apiDesc>
 The VerifyError class represents an error that occurs when a malformed 
 or corrupted SWF file is encountered. 
 
 </apiDesc></apiClassifierDetail><related-links><link href="flash.display.xml#Loader"><linktext>Loader class</linktext></link></related-links><apiConstructor id="VerifyError:VerifyError"><apiName>VerifyError</apiName><shortdesc>
	 Creates a new VerifyError object.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>message</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiData></apiData><apiDesc>Contains the message associated with the VerifyError object.      
	  
	  </apiDesc></apiParam></apiConstructorDef><apiDesc>
	 Creates a new VerifyError object.
     </apiDesc></apiConstructorDetail></apiConstructor></apiClassifier><apiClassifier id="globalClassifier:ArgumentError"><apiName>ArgumentError</apiName><shortdesc>
 The ArgumentError class represents an error that occurs when the arguments 
 supplied in a function do not match the arguments defined for 
 that function.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Error
  
  </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/><apiTipTexts><apiTipText>An ArgumentError is thrown when the parameter values supplied during a 
 function call do not match the parameters defined for that function.
 
 </apiTipText></apiTipTexts><apiBaseClassifier>Error</apiBaseClassifier></apiClassifierDef><apiDesc>
 The ArgumentError class represents an error that occurs when the arguments 
 supplied in a function do not match the arguments defined for 
 that function. This error occurs, for example, when a function is called with
 the wrong number of arguments, an argument of the incorrect type, or an invalid argument.
 
 </apiDesc><example conref="examples\ArgumentErrorExample.as"> The following example shows how an <codeph>ArgumentError</codeph> error is 
 generated and handled within a <codeph>try..catch</codeph> statement. The
 <codeph>println()</codeph> function takes one argument, a single string, but because two strings are supplied, 
 the error is thrown. 
 Typically, the compiler might catch such an error, but the <codeph>this[]</codeph> syntax in the <codeph>try</codeph>
 statement bypasses the compiler's syntax checking for the function.
<codeblock>
package {
    import flash.display.Sprite;
    
    public class ArgumentErrorExample extends Sprite {
        public function ArgumentErrorExample() {
                println("Hello World");
                
                try {
                    this["println"]("Hello", "World");
                }
                catch(e:ArgumentError) {
                    trace(e);
                }
        }
        
        public function println(str:String):void {
            trace(str);
        }
    }
}
</codeblock></example></apiClassifierDetail><apiConstructor id="ArgumentError:ArgumentError"><apiName>ArgumentError</apiName><shortdesc>
	 Creates an ArgumentError object.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>message</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiData></apiData><apiDesc>A string associated with the error.
	  
	  </apiDesc></apiParam></apiConstructorDef><apiDesc>
	 Creates an ArgumentError object.
     </apiDesc></apiConstructorDetail></apiConstructor></apiClassifier><apiClassifier id="globalClassifier:QName"><apiName>QName</apiName><shortdesc>

QName objects represent qualified names of XML elements and attributes.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>QName
 
 </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiFinal/><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>

QName objects represent qualified names of XML elements and attributes. Each
QName object has a local name and a namespace Uniform Resource Identifier (URI). 
When the value of the namespace URI is <codeph>null</codeph>, the QName object matches any namespace.
Use the QName constructor to create a new QName object that is either a copy of another QName 
object or a new QName object with a <codeph>uri</codeph> from a Namespace object and a 
<codeph>localName</codeph> from a QName object. 
 

<p>Methods specific to E4X can use QName objects interchangeably with strings. 
E4X methods are in the QName, Namespace, XML, and XMLList classes.
These E4X methods, which take a string, can also take a QName object. 
This interchangeability is how namespace support works with, for example, 
the <codeph>XML.child()</codeph> method. </p>

<p>The QName class (along with the XML, XMLList, and Namespace classes) implements 
powerful XML-handling standards defined in ECMAScript for XML 
(E4X) specification (ECMA-357 edition 2).</p>

<p>A qualified identifier evaluates to a QName object. If the QName object of an XML element is 
specified without identifying a namespace, the <codeph>uri</codeph> 
property of the associated QName object is set to the global default namespace. If the QName object of an XML  
attribute is specified without identifying a namespace, the <codeph>uri</codeph> property is set to 
an empty string.</p>

</apiDesc><example conref="examples\QNameExample.as"> The following example shows how to create a QName instance and use it to select XML elements.
 Two ways of creating a QName are shown:
 <ol>
    <li>Creating a Namespace instance and then using it as input to the QName constructor. 
      This approach is best if you want to use the <codeph>Namespace.prefix</codeph> property for other 
      purposes later.</li>
  <li>Creating a QName instance using a simple string value for the <codeph>uri</codeph> 
      parameter in the QName constructor.</li>
 </ol>
 <p>
 This code does the following things:
 </p>
 <ol>
  <li>Defines an XML variable named <codeph>rssXML</codeph>.</li>
    <li>Creates a new Namespace object with the prefix <codeph>dc</codeph>.</li>
  <li>Creates a new QName object using the Namespace object and the local name <codeph>creator</codeph>.</li>
  <li>Calls the <codeph>showDescendants()</codeph> method, which uses the <codeph>XML.descendants()</codeph> method to get an XMLList instance 
      containing all the descendant elements whose qualified name matches the given QName instance.</li>
    <li>Displays the qualified name and the text value of each element in the list using a <codeph>for each</codeph> loop.</li>
  <li>Creates another QName object using a string value for the <codeph>uri</codeph> parameter and the local name <codeph>date</codeph>.</li>
  <li>Calls the <codeph>showDescendants()</codeph> method again to display the name and text value of the descendant elements.</li>
 </ol>
<codeblock>
package
{
    import flash.display.Sprite;
    
    public class QNameExample extends Sprite
    {
        public function QNameExample()
        {
            var rssXML:XML =  &lt;rdf:RDF
              xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
              xmlns="http://purl.org/rss/1.0/"
              xmlns:dc="http://purl.org/dc/elements/1.1/"&gt;
              &lt;channel rdf:about="http://www.xml.com/cs/xml/query/q/19"&gt;
                &lt;title&gt;Test RSS&lt;/title&gt;
                &lt;link&gt;http://www.adobe.com/&lt;/link&gt;
                &lt;description&gt;This is a test RSS document.&lt;/description&gt;
                &lt;language&gt;en-us&lt;/language&gt;
                &lt;items&gt;
                  &lt;rdf:Seq&gt;
                &lt;rdf:li rdf:resource="http://www.adobe.com/devnet/flash/"/&gt;
                &lt;rdf:li rdf:resource="http://www.adobe.com/devnet/flex/"/&gt;
                  &lt;/rdf:Seq&gt;
                &lt;/items&gt;
              &lt;/channel&gt;
              &lt;item rdf:about="http://www.adobe.com/devnet/flash/"&gt;
                &lt;title&gt;Flash Developer Center&lt;/title&gt;
                &lt;link&gt;http://www.adobe.com/devnet/flash/&lt;/link&gt;
                &lt;description&gt;Welcome to the Flash Developer Center&lt;/description&gt;
                &lt;dc:creator&gt;Adobe&lt;/dc:creator&gt;
                &lt;dc:date&gt;2005-08-08&lt;/dc:date&gt;    
              &lt;/item&gt;
              &lt;item rdf:about="http://www.adobe.com/devnet/flex/"&gt;
                &lt;title&gt;Flex Developer Center&lt;/title&gt;
                &lt;link&gt;http://www.adobe.com/devnet/flex/&lt;/link&gt;
                &lt;description&gt;Welcome to the Flex Developer Center&lt;/description&gt;
                &lt;dc:creator&gt;Adobe&lt;/dc:creator&gt;
                &lt;dc:date&gt;2005-10-16&lt;/dc:date&gt;    
              &lt;/item&gt;
            &lt;/rdf:RDF&gt;;
            
            var dcNamespace:Namespace = new Namespace("dc", "http://purl.org/dc/elements/1.1/");
            var creatorQName:QName = new QName(dcNamespace, "creator");
            trace(creatorQName.uri); // http://purl.org/dc/elements/1.1/
            trace(creatorQName.localName); // creator
            
            showDescendants(rssXML, creatorQName);
            
            var dateQName:QName = new QName("http://purl.org/dc/elements/1.1/", "date");
            trace(dateQName.uri); // http://purl.org/dc/elements/1.1/
            trace(dateQName.localName); // date
            
            showDescendants(rssXML, dateQName);
        }
        
        public function showDescendants(xmlData:XML, qualifiedName:QName):void
        {
            var decendantList:XMLList = xmlData.descendants(qualifiedName);
            
            for each (var element:XML in decendantList)
            {
                trace(element.name()); // the fully qualified name, 
                                       // like "http://purl.org/dc/elements/1.1/::creator"
                trace(element); // the simple text value of each element, like "Adobe"
            }                
        }
    }
}
</codeblock></example></apiClassifierDetail><related-links><link href="#XML"><linktext>XML</linktext></link><link href="#XMLList"><linktext>XMLList</linktext></link><link href="#Namespace"><linktext>Namespace</linktext></link><link href="http://www.ecma-international.org/publications/standards/Ecma-357.htm"><linktext>ECMAScript for XML (E4X) specification (ECMA-357 edition 2)</linktext></link></related-links><apiConstructor id="QName:QName_0"><apiName>QName</apiName><shortdesc> 
    Creates a QName object with a URI object from a Namespace object and a localName from a QName object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>QName
    </keyword></asCustoms></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>uri</apiItemName><apiOperationClassifier>Namespace</apiOperationClassifier><apiDesc>A Namespace object from which to copy the <codeph>uri</codeph> value. A parameter of any other type is converted to a string.
    </apiDesc></apiParam><apiParam><apiItemName>localName</apiItemName><apiOperationClassifier>QName</apiOperationClassifier><apiDesc>A QName object from which to copy the <codeph>localName</codeph> value. A parameter of any other type is converted to a string.
    
    </apiDesc></apiParam></apiConstructorDef><apiDesc> 
    Creates a QName object with a URI object from a Namespace object and a <codeph>localName</codeph> from a QName object.
    If either parameter is not the expected data type, the parameter is converted to a string and 
    assigned to the corresponding property of the new QName object.
    For example, if both parameters are strings, a new QName object is returned with a <codeph>uri</codeph> property set
    to the first parameter and a <codeph>localName</codeph> property set to the second parameter.
    In other words, the following permutations, along with many others, are valid forms of the constructor:
<pre>
QName (uri:Namespace, localName:String);
QName (uri:String, localName: QName);
QName (uri:String, localName: String);
</pre>
    <p>If you pass <codeph>null</codeph> for the <codeph>uri</codeph> parameter, 
    the <codeph>uri</codeph> property of the new QName object is set to <codeph>null</codeph>.
    </p>
    <p><b>Note:</b> This class shows two constructor entries because each form accepts 
    different parameters. The constructor behaves differently depending on the type and number of 
    parameters passed, as detailed in each entry. ActionSript 3.0 does not support method or constructor overloading.</p>
    
    </apiDesc></apiConstructorDetail></apiConstructor><apiConstructor id="QName:QName_1"><apiName>QName</apiName><shortdesc> 
    Creates a QName object that is a copy of another QName object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><internal>(pdehaan) i changed first param from "name" to "uri" as the previous naming was very confusing
    </internal></asCustoms></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>qname</apiItemName><apiOperationClassifier>QName</apiOperationClassifier><apiDesc>The QName object to be copied. Objects of any other type are 
    converted to a string that is assigned to the <codeph>localName</codeph> property
    of the new QName object.
    
    </apiDesc></apiParam></apiConstructorDef><apiDesc> 
    Creates a QName object that is a copy of another QName object. If the parameter passed 
    to the constructor is a QName object, a copy of the QName object is created. If the parameter 
    is not a QName object, the parameter is converted to a string and assigned to the
    <codeph>localName</codeph> property of the new QName instance. 
    If the parameter is <codeph>undefined</codeph> or unspecified, a new QName object
    is created with the <codeph>localName</codeph> property set to the empty string.
    <p><b>Note:</b> This class shows two constructor entries because each form accepts 
    different parameters. The constructor behaves differently depending on the type and number of 
    parameters passed, as detailed in each entry. ActionSript 3.0 does not support method or constructor overloading.</p>
    
    
    </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="QName:AS3:toString"><apiName>toString</apiName><shortdesc>
	Returns a string composed of the URI, and the local name for the 
	QName object, separated by "::".</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>QName, QName.toString, toString
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The qualified name, as a string.
	
	</apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Returns a string composed of the URI, and the local name for the 
	QName object, separated by "::".
	
	<p>The format depends on the <codeph>uri</codeph> property of the QName object:</p>
	<pre>If <codeph>uri</codeph> == "" 
		<codeph>toString</codeph> returns <codeph>localName</codeph>
	else if <codeph>uri</codeph> == null
		<codeph>toString</codeph> returns ~~::<codeph>localName</codeph> 
	else
		<codeph>toString</codeph> returns <codeph>uri</codeph>::<codeph>localName</codeph></pre>
	
	
	</apiDesc></apiOperationDetail></apiOperation><apiOperation id="QName:AS3:valueOf"><apiName>valueOf</apiName><shortdesc>
    Returns the QName object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>QName, QName.toString, toString
    </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The primitive value of a QName instance.
    
    </apiDesc><apiOperationClassifier>QName</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
    Returns the QName object.
    
    </apiDesc></apiOperationDetail></apiOperation><apiValue id="QName:localName:get"><apiName>localName</apiName><shortdesc>
	The local name of the QName object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>QName, QName.localName, localName
	</keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>String</apiValueClassifier></apiValueDef><apiDesc>
	The local name of the QName object.
	
	</apiDesc></apiValueDetail></apiValue><apiValue id="QName:uri:get"><apiName>uri</apiName><shortdesc>
	The Uniform Resource Identifier (URI) of the QName object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>QName, QName.uri, uri
	</keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>String</apiValueClassifier></apiValueDef><apiDesc>
	The Uniform Resource Identifier (URI) of the QName object.
 	
	</apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="globalClassifier:EvalError"><apiName>EvalError</apiName><shortdesc>
 The EvalError class represents an error that occurs when user code
 calls the eval() function or attempts to use the new
 operator with the Function object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><helpid>
  
  </helpid></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/><apiTipTexts><apiTipText>An EvalError is thrown when code attempts to call eval() or use new with
 the Function object.
 
 </apiTipText></apiTipTexts><apiBaseClassifier>Error</apiBaseClassifier></apiClassifierDef><apiDesc>
 The EvalError class represents an error that occurs when user code
 calls the <codeph>eval()</codeph> function or attempts to use the <codeph>new</codeph>
 operator with the Function object. Calling <codeph>eval()</codeph> and 
 calling <codeph>new</codeph> with the Function object are not supported.
 
 </apiDesc></apiClassifierDetail><apiConstructor id="EvalError:EvalError"><apiName>EvalError</apiName><shortdesc>
	 Creates a new EvalError object.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>message</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiData></apiData><apiDesc>A string associated with the error.     
	  
	  </apiDesc></apiParam></apiConstructorDef><apiDesc>
	 Creates a new EvalError object.
     </apiDesc></apiConstructorDetail></apiConstructor></apiClassifier><apiClassifier id="globalClassifier:Math"><apiName>Math</apiName><shortdesc>
 The Math class contains methods and constants that represent common mathematical
 functions and values.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math, math object, built-in class
  
  </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiFinal/><apiTipTexts><apiTipText>The Math class is a top-level class consisting of static properties and 
 methods that define common mathematical constants and functions.
 
 </apiTipText></apiTipTexts><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
 The Math class contains methods and constants that represent common mathematical
 functions and values. 
 <p>Use the methods and properties of this class to access and manipulate mathematical constants and functions.
 All the properties and methods of the Math class are static and must be called using the syntax 
 <codeph>Math.method(</codeph><codeph><i>parameter</i></codeph><codeph>)</codeph> or <codeph>Math.constant</codeph>. 
 In ActionScript, constants are defined with the maximum precision of double-precision IEEE-754 floating-point numbers.</p>
 <p>Several Math class methods use the measure of an angle in radians as a parameter. You can use the following equation 
 to calculate radian values before calling the method and then provide the calculated value as the parameter, or you can 
 provide the entire right side of the equation (with the angle's measure in degrees in place of <codeph>degrees</codeph>) as 
 the radian parameter.</p>
 <p>To calculate a radian value, use the following formula:</p>
 <pre>
 radians = degrees ~~ Math.PI/180
 </pre>
 <p>To calculate degrees from radians, use the following formula:</p>
 <pre>
 degrees = radians ~~ 180/Math.PI
 </pre>
 <p>The following is an example of passing the equation as a parameter to calculate the sine of a 45° angle:</p>
 <p><codeph>Math.sin(45 ~~ Math.PI/180)</codeph> is the same as <codeph>Math.sin(.7854)</codeph></p>
 <p><b>Note:</b> The Math functions acos, asin, atan, atan2, cos, exp, log, pow, sin, and sqrt may 
 result in slightly different values depending on the algorithms 
 used by the CPU or operating system. Flash Player calls on the CPU (or operating system if the CPU doesn't support 
 floating point calculations) when performing the calculations for the listed functions, and results have shown
 slight variations depending upon the CPU or operating system in use.
 </p>
 
 
 </apiDesc></apiClassifierDetail><apiOperation id="Math:abs"><apiName>abs</apiName><shortdesc>
  Computes and returns an absolute value for the number specified by the 
  parameter val.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.abs, abs, absolute
   
   </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>The absolute value of the specified paramater.
  
  </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>val</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>The number whose absolute value is returned.
  </apiDesc></apiParam><apiTipTexts><apiTipText>Returns the absolute value of the specified Number.
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Computes and returns an absolute value for the number specified by the 
  parameter <codeph>val</codeph>.
  
  </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Math:acos"><apiName>acos</apiName><shortdesc>
  Computes and returns the arc cosine of the number specified in the 
  parameter val, in radians.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.acos, acos, arc cosine
   
   </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>The arc cosine of the parameter <codeph>val</codeph>.
  
  </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>val</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A number from -1.0 to 1.0.  
  
  </apiDesc></apiParam><apiTipTexts><apiTipText>Returns the arc cosine, in radians, of the specified 
  Number. 
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Computes and returns the arc cosine of the number specified in the 
  parameter <codeph>val</codeph>, in radians.
  
  </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Math:asin"><apiName>asin</apiName><shortdesc>
  Computes and returns the arc sine for the number specified in the 
  parameter val, in radians.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.asin, asin, arc sine
   
   </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>A number between negative pi divided by 2 and positive pi 
  divided by 2.
  
  </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>val</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A number from -1.0 to 1.0.  
  
  </apiDesc></apiParam><apiTipTexts><apiTipText>Returns the value, in radians, of the arc sine of the specified 
  Number parameter.
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Computes and returns the arc sine for the number specified in the 
  parameter <codeph>val</codeph>, in radians.
  
  </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Math:atan"><apiName>atan</apiName><shortdesc>
  Computes and returns the value, in radians, of the angle whose tangent is 
  specified in the parameter val.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.atan, atan, arc tangent
   
   </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>A number between negative pi divided by 2 and positive 
  pi divided by 2.
  
  </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>val</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A number that represents the tangent of an angle.  
  
  </apiDesc></apiParam><apiTipTexts><apiTipText>Returns the angle, in radians, whose tangent is specified by 
  parameter val.
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Computes and returns the value, in radians, of the angle whose tangent is 
  specified in the parameter <codeph>val</codeph>. The return value is between
  negative pi divided by 2 and positive pi divided by 2.
  
  </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Math:atan2"><apiName>atan2</apiName><shortdesc>
  Computes and returns the angle of the point y/x in 
  radians, when measured counterclockwise from a circle's x axis 
  (where 0,0 represents the center of the circle).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.atan2, atan2, arc tangent
   
   </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>A number.
  
  </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>y</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>The <i>y</i> coordinate of the point.
  </apiDesc></apiParam><apiParam><apiItemName>x</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>The <i>x</i> coordinate of the point.  
  
  </apiDesc></apiParam><apiTipTexts><apiTipText>Returns the angle of the point y/x in radians, when measured 
  counterclockwise from a circle's x axis.
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Computes and returns the angle of the point <codeph>y</codeph>/<codeph>x</codeph> in 
  radians, when measured counterclockwise from a circle's <i>x</i> axis 
  (where 0,0 represents the center of the circle). The return value is between 
  positive pi and negative pi. Note that the first parameter to atan2 is always the <i>y</i> coordinate.
  
  </apiDesc></apiOperationDetail><related-links><link href="#Math/acos()"><linktext>Math.acos()</linktext></link><link href="#Math/asin()"><linktext>Math.asin()</linktext></link><link href="#Math/atan()"><linktext>Math.atan()</linktext></link><link href="#Math/cos()"><linktext>Math.cos()</linktext></link><link href="#Math/sin()"><linktext>Math.sin()</linktext></link><link href="#Math/tan()"><linktext>Math.tan()</linktext></link></related-links></apiOperation><apiOperation id="Math:ceil"><apiName>ceil</apiName><shortdesc>
  Returns the ceiling of the specified number or expression.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.ceil, ceil, ceiling
   
   </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>An integer that is both closest to, and greater than or equal to, the parameter 
  <codeph>val</codeph>.
  
  </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>val</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A number or expression.
  </apiDesc></apiParam><apiTipTexts><apiTipText>Returns the ceiling of the specified number or expression.
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Returns the ceiling of the specified number or expression. The ceiling of a 
  number is the closest integer that is greater than or equal to the number.
  
  </apiDesc></apiOperationDetail><related-links><link href="#Math/floor()"><linktext>Math.floor()</linktext></link><link href="#Math/round()"><linktext>Math.round()</linktext></link></related-links></apiOperation><apiOperation id="Math:cos"><apiName>cos</apiName><shortdesc>
  Computes and returns the cosine of the specified angle in radians.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.cos, cos, cosine
   
   </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>A number from -1.0 to 1.0.
  
  </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>angleRadians</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A number that represents an angle measured in radians. 
  </apiDesc></apiParam><apiTipTexts><apiTipText>Returns the cosine of the specified angle.
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Computes and returns the cosine of the specified angle in radians. To 
  calculate a radian, see the overview of the Math class.
  
  
  </apiDesc></apiOperationDetail><related-links><link href="#Math/acos()"><linktext>Math.acos()</linktext></link><link href="#Math/asin()"><linktext>Math.asin()</linktext></link><link href="#Math/atan()"><linktext>Math.atan()</linktext></link><link href="#Math/atan2()"><linktext>Math.atan2()</linktext></link><link href="#Math/sin()"><linktext>Math.sin()</linktext></link><link href="#Math/tan()"><linktext>Math.tan()</linktext></link></related-links></apiOperation><apiOperation id="Math:exp"><apiName>exp</apiName><shortdesc>
  Returns the value of the base of the natural logarithm (e), to the 
  power of the exponent specified in the parameter x.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.exp, exp, exponent
   
   </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc><i>e</i> to the power of the parameter <codeph>val</codeph>.
  
  </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>val</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>The exponent; a number or expression.
  </apiDesc></apiParam><apiTipTexts><apiTipText>Returns the value of the base of the natural logarithm 
  (e), to the power of the exponent specified in the parameter val.
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Returns the value of the base of the natural logarithm (<i>e</i>), to the 
  power of the exponent specified in the parameter <codeph>x</codeph>. The 
  constant <codeph>Math.E</codeph> can provide the value of <i>e</i>.
  
  </apiDesc></apiOperationDetail><related-links><link href="#Math/E"><linktext>Math.E</linktext></link></related-links></apiOperation><apiOperation id="Math:floor"><apiName>floor</apiName><shortdesc>
  Returns the floor of the number or expression specified in the parameter 
  val.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.floor, floor
   
   </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>The integer that is both closest to, and less than or equal to, the parameter 
  <codeph>val</codeph>.
  
  </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>val</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A number or expression.
  </apiDesc></apiParam><apiTipTexts><apiTipText>Returns the floor of the number or expression specified in the 
  parameter val.
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Returns the floor of the number or expression specified in the parameter 
  <codeph>val</codeph>. The floor is the closest integer that is less than or equal
  to the specified number or expression.
  
  </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Math:log"><apiName>log</apiName><shortdesc>
  Returns the natural logarithm of the parameter val.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.log, log, logarithm
   
   </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>The natural logarithm of parameter <codeph>val</codeph>.
  
  </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>val</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A number or expression with a value greater than 0.
  </apiDesc></apiParam><apiTipTexts><apiTipText>Returns the natural logarithm of parameter val. 
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Returns the natural logarithm of the parameter <codeph>val</codeph>.
  
  </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Math:max"><apiName>max</apiName><shortdesc>
  Evaluates val1 and val2 (or more values) and returns the largest value.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.max, max, maximum
   
   </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>The largest of the parameters <codeph>val1</codeph> and <codeph>val2</codeph> (or more values).
  
  </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>val1</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A number or expression.
  </apiDesc></apiParam><apiParam><apiItemName>val2</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A number or expression.
  </apiDesc></apiParam><apiParam><apiItemName>rest</apiItemName><apiType value="restParam"/><apiDesc>A number or expression. <codeph>Math.max()</codeph> can accept multiple arguments.
  </apiDesc></apiParam><apiTipTexts><apiTipText>Evaluates parameters val1 and val2 and 
  returns the larger value.
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Evaluates <codeph>val1</codeph> and <codeph>val2</codeph> (or more values) and returns the largest value.
  
  </apiDesc></apiOperationDetail><related-links><link href="#Math/min()"><linktext>Math.min()</linktext></link></related-links></apiOperation><apiOperation id="Math:min"><apiName>min</apiName><shortdesc>
  Evaluates val1 and val2 (or more values) and returns the smallest value.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.min, min, minimum
   
   </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>The smallest of the parameters <codeph>val1</codeph> and <codeph>val2</codeph> (or more values).
  
  </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>val1</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A number or expression.
  </apiDesc></apiParam><apiParam><apiItemName>val2</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A number or expression.
  </apiDesc></apiParam><apiParam><apiItemName>rest</apiItemName><apiType value="restParam"/><apiDesc>A number or expression. <codeph>Math.min()</codeph> can accept multiple arguments.
  </apiDesc></apiParam><apiTipTexts><apiTipText>Evaluates parameters val1 and val2 and returns the smaller value.
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Evaluates <codeph>val1</codeph> and <codeph>val2</codeph> (or more values) and returns the smallest value.
  
  </apiDesc></apiOperationDetail><related-links><link href="#Math/max()"><linktext>Math.max()</linktext></link></related-links></apiOperation><apiOperation id="Math:pow"><apiName>pow</apiName><shortdesc>
  Computes and returns base to the power of pow.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.pow, pow, power
   
   </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>The value of <codeph>base</codeph> raised to the power of <codeph>pow</codeph>.
  
  </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>base</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A number to be raised by the power of the parameter <codeph>pow</codeph>.
  </apiDesc></apiParam><apiParam><apiItemName>pow</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A number specifying the power that the parameter <codeph>base</codeph> is raised by.
  </apiDesc></apiParam><apiTipTexts><apiTipText>Returns val1 to the power of val2.
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Computes and returns <codeph>base</codeph> to the power of <codeph>pow</codeph>.
  
  </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Math:random"><apiName>random</apiName><shortdesc>
  Returns a pseudo-random number n, where 0 &amp;lt;= n &amp;lt; 1.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.random, random
   
   </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>A pseudo-random number.
  
  </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiTipTexts><apiTipText>Returns a pseudo-random number n, where 0 &lt;= n &lt; 1.
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Returns a pseudo-random number n, where 0 &lt;= n &lt; 1. The number returned is calculated in an undisclosed manner, and pseudo-random because the calculation inevitably contains some element of non-randomness.
  
  </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Math:round"><apiName>round</apiName><shortdesc>
  Rounds the value of the parameter val up or down to the nearest
  integer and returns the value.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.round, round
   
   </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>The parameter <codeph>val</codeph> rounded to the nearest whole number.
  
  </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>val</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>The number to round.
  </apiDesc></apiParam><apiTipTexts><apiTipText>Returns the value of parameter val rounded up or down to the 
  nearest integer.
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Rounds the value of the parameter <codeph>val</codeph> up or down to the nearest
  integer and returns the value. If <codeph>val</codeph> is equidistant 
  from its two nearest integers (that is, if the number ends in .5), the value 
  is rounded up to the next higher integer.
  
  </apiDesc></apiOperationDetail><related-links><link href="#Math/ceil()"><linktext>Math.ceil()</linktext></link><link href="#Math/floor()"><linktext>Math.floor()</linktext></link></related-links></apiOperation><apiOperation id="Math:sin"><apiName>sin</apiName><shortdesc>
  Computes and returns the sine of the specified angle in radians.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.sin, sin, sine
   
   </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>A number; the sine of the specified angle (between -1.0 and 1.0).
  
  </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>angleRadians</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A number that represents an angle measured in radians.
  </apiDesc></apiParam><apiTipTexts><apiTipText>Returns the sine of the specified angle.
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Computes and returns the sine of the specified angle in radians. To 
  calculate a radian, see the overview of the Math class.
  
  
  </apiDesc></apiOperationDetail><related-links><link href="#Math/acos()"><linktext>Math.acos()</linktext></link><link href="#Math/asin()"><linktext>Math.asin()</linktext></link><link href="#Math/atan()"><linktext>Math.atan()</linktext></link><link href="#Math/atan2()"><linktext>Math.atan2()</linktext></link><link href="#Math/cos()"><linktext>Math.cos()</linktext></link><link href="#Math/tan()"><linktext>Math.tan()</linktext></link></related-links></apiOperation><apiOperation id="Math:sqrt"><apiName>sqrt</apiName><shortdesc>
  Computes and returns the square root of the specified number.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.sqrt, sqrt, square root 
   
   </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>If the parameter <codeph>val</codeph> is greater than or equal to zero, a number; otherwise <codeph>NaN</codeph> (not a number).
  
  </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>val</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A number or expression greater than or equal to 0. 
  </apiDesc></apiParam><apiTipTexts><apiTipText>Returns the square root of the specified number.
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Computes and returns the square root of the specified number.
  
  </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Math:tan"><apiName>tan</apiName><shortdesc>
  Computes and returns the tangent of the specified angle.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.tan, tan, tangent
   
   </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>The tangent of the parameter <codeph>angleRadians</codeph>.
  
  </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>angleRadians</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A number that represents an angle measured in radians.
  </apiDesc></apiParam><apiTipTexts><apiTipText>Returns the tangent of the specified angle.
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Computes and returns the tangent of the specified angle. To calculate a 
  radian, see the overview of the Math class.
  
  
  </apiDesc></apiOperationDetail><related-links><link href="#Math/acos()"><linktext>Math.acos()</linktext></link><link href="#Math/asin()"><linktext>Math.asin()</linktext></link><link href="#Math/atan()"><linktext>Math.atan()</linktext></link><link href="#Math/atan2()"><linktext>Math.atan2()</linktext></link><link href="#Math/cos()"><linktext>Math.cos()</linktext></link><link href="#Math/sin()"><linktext>Math.sin()</linktext></link></related-links></apiOperation><apiValue id="Math:E"><apiName>E</apiName><shortdesc>
  A mathematical constant for the base of natural logarithms, expressed as e.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.e, e
   
   </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>2.71828182845905</apiData><apiValueClassifier>Number</apiValueClassifier><apiTipTexts><apiTipText>A mathematical constant for the base of natural logarithms, expressed as e.
  
  </apiTipText></apiTipTexts></apiValueDef><apiDesc>
  A mathematical constant for the base of natural logarithms, expressed as <i>e</i>.
  The approximate value of <i>e</i><codeph> </codeph>is 2.71828182845905.
  
  </apiDesc></apiValueDetail></apiValue><apiValue id="Math:LN10"><apiName>LN10</apiName><shortdesc>
  A mathematical constant for the natural logarithm of 10, expressed as loge10,
  with an approximate value of 2.302585092994046.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.ln10, ln10, logarithm
   
   </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>2.302585092994046</apiData><apiValueClassifier>Number</apiValueClassifier><apiTipTexts><apiTipText>A mathematical constant for the natural logarithm of 10, expressed 
  as loge10, with an approximate value of 2.302585092994046.
  
  </apiTipText></apiTipTexts></apiValueDef><apiDesc>
  A mathematical constant for the natural logarithm of 10, expressed as log<sub>e</sub>10,
  with an approximate value of 2.302585092994046.
  
  </apiDesc></apiValueDetail></apiValue><apiValue id="Math:LN2"><apiName>LN2</apiName><shortdesc>
  A mathematical constant for the natural logarithm of 2, expressed as loge2,
  with an approximate value of 0.6931471805599453.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.ln2, ln2, natural logarithm
   
   </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>0.6931471805599453</apiData><apiValueClassifier>Number</apiValueClassifier><apiTipTexts><apiTipText>A mathematical constant for the natural logarithm of 2, expressed 
  as loge2, with an approximate value of 0.6931471805599453.
  
  </apiTipText></apiTipTexts></apiValueDef><apiDesc>
  A mathematical constant for the natural logarithm of 2, expressed as log<sub>e</sub>2,
  with an approximate value of 0.6931471805599453.
  
  </apiDesc></apiValueDetail></apiValue><apiValue id="Math:LOG10E"><apiName>LOG10E</apiName><shortdesc>
  A mathematical constant for the base-10 logarithm of the constant e (Math.E),
  expressed as log10e, with an approximate value of 0.4342944819032518.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.log10e, log10e, logarithm
   
   </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>0.4342944819032518</apiData><apiValueClassifier>Number</apiValueClassifier><apiTipTexts><apiTipText>A mathematical constant for the base-10 logarithm of the constant 
  e, expressed as log10e, with an approximate value of 0.4342944819032518.
  
  </apiTipText></apiTipTexts></apiValueDef><apiDesc>
  A mathematical constant for the base-10 logarithm of the constant <i>e</i> (<codeph>Math.E</codeph>),
  expressed as log<sub>10</sub>e, with an approximate value of 0.4342944819032518. 
  <p>The <codeph>Math.log()</codeph> method computes the natural logarithm of a number. Multiply the 
  result of <codeph>Math.log()</codeph> by <codeph>Math.LOG10E</codeph> to obtain the base-10 logarithm.</p>
  
  </apiDesc></apiValueDetail></apiValue><apiValue id="Math:LOG2E"><apiName>LOG2E</apiName><shortdesc>
  A mathematical constant for the base-2 logarithm of the constant e, expressed 
  as log2e, with an approximate value of 1.442695040888963387.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.log2e, log2e, logarithm
   
   </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>1.442695040888963387</apiData><apiValueClassifier>Number</apiValueClassifier><apiTipTexts><apiTipText>A mathematical constant for the base-2 logarithm of the constant 
  e, expressed as log2e, with an approximate value of 1.442695040888963387.
  
  </apiTipText></apiTipTexts></apiValueDef><apiDesc>
  A mathematical constant for the base-2 logarithm of the constant <i>e</i>, expressed 
  as log2e, with an approximate value of 1.442695040888963387.
  
  <p>The <codeph>Math.log</codeph> method computes the natural logarithm of a number. Multiply the 
  result of <codeph>Math.log()</codeph> by <codeph>Math.LOG2E</codeph> to obtain the base-2 logarithm.</p>
  
  </apiDesc></apiValueDetail></apiValue><apiValue id="Math:PI"><apiName>PI</apiName><shortdesc>
  A mathematical constant for the ratio of the circumference of a circle to its diameter,
  expressed as pi, with a value of 3.141592653589793.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.pi, pi
   
   </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>3.141592653589793</apiData><apiValueClassifier>Number</apiValueClassifier><apiTipTexts><apiTipText>A mathematical constant for the ratio of the circumference of a 
  circle to its diameter, expressed as pi, with a value of 3.141592653589793.
  
  </apiTipText></apiTipTexts></apiValueDef><apiDesc>
  A mathematical constant for the ratio of the circumference of a circle to its diameter,
  expressed as pi, with a value of 3.141592653589793.
  
  </apiDesc></apiValueDetail></apiValue><apiValue id="Math:SQRT1_2"><apiName>SQRT1_2</apiName><shortdesc> 
  A mathematical constant for the square root of one-half, with an approximate  
  value of 0.7071067811865476.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.sqrt1_2, sqrt1_2, square root
   
   </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>0.7071067811865476</apiData><apiValueClassifier>Number</apiValueClassifier><apiTipTexts><apiTipText>A mathematical constant for the square root of one-half, with an 
  approximate value of 0.7071067811865476.
  
  </apiTipText></apiTipTexts></apiValueDef><apiDesc> 
  A mathematical constant for the square root of one-half, with an approximate  
  value of 0.7071067811865476.
  
  </apiDesc></apiValueDetail></apiValue><apiValue id="Math:SQRT2"><apiName>SQRT2</apiName><shortdesc>
  A mathematical constant for the square root of 2, with an approximate 
  value of 1.4142135623730951.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>math.sqrt2, sqrt2, square root
   
   </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>1.4142135623730951</apiData><apiValueClassifier>Number</apiValueClassifier><apiTipTexts><apiTipText>A mathematical constant for the square root of 2, with an 
  approximate value of 1.4142135623730951.
  
  </apiTipText></apiTipTexts></apiValueDef><apiDesc>
  A mathematical constant for the square root of 2, with an approximate 
  value of 1.4142135623730951.
  
  </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="globalClassifier:Array"><apiName>Array</apiName><shortdesc>
 The Array class lets you access and manipulate arrays.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Array, Array object, built-in class
 
 </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/><apiTipTexts><apiTipText>Lets you access and manipulate indexed arrays.
 
 </apiTipText></apiTipTexts><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
 The Array class lets you access and manipulate arrays. Array indices are zero-based, which means that the first element in the array is <codeph>[0]</codeph>, the second element is <codeph>[1]</codeph>, and so on. To create an Array object, you use the <codeph>new Array()</codeph> constructor . <codeph>Array()</codeph> can also be
 invoked as a function. In addition, you can use the array access (<codeph>[]</codeph>) operator to initialize an array or access the elements of an array. 
 <p>You can store a wide variety of data types in an array element, including numbers, strings, objects, and even other arrays. You can create a <i>multidimensional</i> array by creating an indexed array and assigning to each of its elements a different indexed array. Such an array is considered multidimensional because it can be used to represent data in a table.</p>
 <p> Arrays are <i>sparse arrays</i>, meaning there might be an element at index 0 and another at index 5, but nothing in the index positions between those two elements. In such a case, the elements in positions 1 through 4 are undefined, which indicates the absence of an element, not necessarily the presence of an element with the value <codeph>undefined</codeph>.</p>
 
 <p>Array assignment is by reference rather than by value. When you assign one array variable to another array variable, both refer to the same array:</p>
 <codeblock>
 var oneArray:Array = new Array("a", "b", "c");
 var twoArray:Array = oneArray; // Both array variables refer to the same array.
 twoArray[0] = "z";             
 trace(oneArray);               // Output: z,b,c.
 </codeblock>
 <p>Do not use the Array class to create <i>associative arrays</i> (also called <i>hashes</i>), which are data 
 structures that contain named elements instead of numbered elements. To create associative arrays, use the Object class.
 Although ActionScript permits you to create associative arrays using the Array class, you cannot use any of the Array class methods or properties with associative arrays. </p>
 <p>You can extend the Array class and override or add methods. However, you must specify the subclass as <codeph>dynamic</codeph> 
 or you will lose the ability to store data in an array.</p>
 
 </apiDesc><example conref="examples\ArrayExample.as"> The following example creates a new Array object <codeph>myArr</codeph> with no arguments
 and an initial length of 0:
<codeblock>
package {
    import flash.display.Sprite;

    public class ArrayExample extends Sprite {
        public function ArrayExample() {
            var myArr:Array = new Array();
            trace(myArr.length); // 0
        }
    }
}
</codeblock></example></apiClassifierDetail><related-links><link href="operators.html#array_access"><linktext>[] (array access)</linktext></link><link href="#Object"><linktext>Object class</linktext></link></related-links><apiConstructor id="Array:Array_0"><apiName>Array</apiName><shortdesc>
	 Lets you create an array of the specified number of elements.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiException><apiDesc>The argument is a number that is not an integer greater than or equal to 0.	 
	 </apiDesc><apiItemName>RangeError</apiItemName><apiOperationClassifier>RangeError</apiOperationClassifier></apiException><apiParam><apiItemName>numElements</apiItemName><apiOperationClassifier>int</apiOperationClassifier><apiData>0</apiData><apiDesc>An integer that specifies the number of elements in the array.
	 
	 </apiDesc></apiParam></apiConstructorDef><apiDesc>
	 Lets you create an array of the specified number of elements. 
	 If you don't specify any parameters, an array containing 0 elements is created. 
	 If you specify a number of elements, an array is created with <codeph>numElements</codeph> number of elements. 
     <p><b>Note:</b> This class shows two constructor method entries because the constructor accepts 
     variable types of arguments. The constructor behaves differently depending on the type and number of 
     arguments passed, as detailed in each entry. ActionScript 3.0 does not support method or constructor overloading.</p>
     
	 
	 </apiDesc><example conref="examples\Array_Array.as"> The following example creates the Array object <codeph>myArr</codeph> with no arguments
 and an initial length of 0:
<codeblock>
package {
    import flash.display.Sprite;

    public class Array_Array extends Sprite {

        public function Array_Array() {
            var myArr:Array = new Array();
            trace(myArr.length); // 0
        }
    }
}
</codeblock></example><example conref="examples\Array_Array_2.as"> The following example creates an Array object with 5 initial elements, with a length of 5, and populates
 the first element with the string <codeph>"one"</codeph>, and adds the string element <codeph>"six"</codeph> to the end
 of the array by using the <codeph>push()</codeph> method:
<codeblock>
package {
    import flash.display.Sprite;

    public class Array_Array_2 extends Sprite {

        public function Array_Array_2() {
            var myArr:Array = new Array(5);
            trace(myArr.length); // 5
            myArr[0] = "one";
            myArr.push("six");
            trace(myArr);         // one,,,,,six
            trace(myArr.length); // 6
        }
    }
}
</codeblock></example></apiConstructorDetail><related-links><link href="operators.html#array_access"><linktext>[] array access</linktext></link><link href="#Array/length"><linktext>Array.length</linktext></link></related-links></apiConstructor><apiConstructor id="Array:Array_1"><apiName>Array</apiName><shortdesc>
	 Lets you create an array that contains the specified elements.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiException><apiDesc>The argument is a number that is not an integer greater than or equal to 0.	 
     </apiDesc><apiItemName>RangeError</apiItemName><apiOperationClassifier>RangeError</apiOperationClassifier></apiException><apiParam><apiItemName>values</apiItemName><apiType value="restParam"/><apiDesc>A comma-separated list of one or more arbitrary values. 
	 <p><b>Note: </b>If only a single numeric parameter is passed to the Array constructor, 
	 it is assumed to specify the array's <codeph>length</codeph> property.</p>
	 </apiDesc></apiParam></apiConstructorDef><apiDesc>
	 Lets you create an array that contains the specified elements.
	 You can specify values of any type. 
	 The first element in an array always has an index (or position) of 0.
     <p><b>Note:</b> This class shows two constructor entries because the constructor accepts 
     variable types of arguments. The constructor behaves differently depending on the type and number of 
     arguments passed, as detailed in each entry. ActionSript 3.0 does not support method or constructor overloading.</p>
	 </apiDesc><example conref="examples\Array_Array_3.as"> The following example creates a new Array object with an initial length of 3,
 populates the array with the string elements <codeph>one</codeph>, <codeph>two</codeph>, and <codeph>three</codeph>,
 and then converts the elements to a string.
<codeblock>
package {
    import flash.display.Sprite;

    public class Array_Array_3 extends Sprite {

        public function Array_Array_3() {
            var myArr:Array = new Array("one", "two", "three");
            trace(myArr.length); // 3
            trace(myArr);          // one,two,three
        }
    }
}
</codeblock></example></apiConstructorDetail><related-links><link href="operators.html#array_access"><linktext>[] array access</linktext></link><link href="#Array/length"><linktext>Array.length</linktext></link></related-links></apiConstructor><apiOperation id="Array:AS3:concat"><apiName>concat</apiName><shortdesc>
	 Concatenates the elements specified in the parameters with the elements in an array and creates a new array.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>array.concat, concat, concatenate
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An array that contains the elements from this array followed by elements from
  	 the parameters.
	 
	 </apiDesc><apiOperationClassifier>Array</apiOperationClassifier></apiReturn><apiParam><apiItemName>args</apiItemName><apiType value="restParam"/><apiDesc>A value of any data type (such as numbers, elements, or strings) to be concatenated in a new array. If you don't 
	 pass any values, the new array is a duplicate of the original array.
	 
	 </apiDesc></apiParam><apiTipTexts><apiTipText>Concatenates the elements specified in the parameters.
	 
	 </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
	 Concatenates the elements specified in the parameters with the elements in an array and creates a new array. If the parameters specify an array, the elements of that array are concatenated. 
 	 
 	 </apiDesc><example conref="examples\Array.concat.1.as"> The following code creates four Array objects:
 <ul>
   <li>The <codeph>numbers</codeph> array, which contains the numbers <codeph>1</codeph>, <codeph>2</codeph>, and <codeph>3</codeph>. </li>
   <li>The <codeph>letters</codeph> array, which contains the letters <codeph>a</codeph>, <codeph>b</codeph>, and <codeph>c</codeph>. </li>
   <li>The <codeph>numbersAndLetters</codeph> array, which calls the <codeph>concat()</codeph> method to produce the array <codeph>[1,2,3,a,b,c]</codeph>. </li>
   <li>The <codeph>lettersAndNumbers</codeph> array, which calls the <codeph>concat()</codeph> method to produce the array <codeph>[a,b,c,1,2,3]</codeph>. </li>
 </ul>
<codeblock>

var numbers:Array = new Array(1, 2, 3);
var letters:Array = new Array("a", "b", "c");
var numbersAndLetters:Array = numbers.concat(letters);
var lettersAndNumbers:Array = letters.concat(numbers);

trace(numbers);       // 1,2,3
trace(letters);       // a,b,c
trace(numbersAndLetters); // 1,2,3,a,b,c
trace(lettersAndNumbers); // a,b,c,1,2,3
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Array:AS3:every"><apiName>every</apiName><shortdesc>
	 Executes a test function on each item in the array until an item is reached that returns false for the 
     specified function.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A Boolean value of <codeph>true</codeph> if all items in the array return <codeph>true</codeph> for the specified function; otherwise, <codeph>false</codeph>.
	 
	 </apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn><apiParam><apiItemName>callback</apiItemName><apiOperationClassifier>Function</apiOperationClassifier><apiDesc>The function to run on each item in the array. This function can contain a simple comparison (for example, <codeph>item &lt; 20</codeph>) or a more complex operation, and is invoked with three arguments; the
     value of an item, the index of an item, and the Array object:
     <pre>function callback(item:*, index:int, array:Array):Boolean;</pre> 
	 
	 </apiDesc></apiParam><apiParam><apiItemName>thisObject</apiItemName><apiType value=""/><apiData>null</apiData><apiDesc>An object to use as <codeph>this</codeph> for the function.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Executes a test function on each item in the array until an item is reached that returns <codeph>false</codeph> for the 
     specified function. You use this method to determine whether all items in an array meet a criterion, such as having values
     less than a particular number.
     
     <p product="flash">For this method, the second parameter, <codeph>thisObject</codeph>, must be <codeph>null</codeph> if the
     first parameter, <codeph>callback</codeph>, is a method closure. Suppose you create a function in a movie clip
     called <codeph>me</codeph>:</p>
     <pre product="flash">
     function myFunction(obj:Object):void {
        //your code here
     }
     </pre>
     <p product="flash">Suppose you then use the <codeph>every()</codeph> method on an array called <codeph>myArray</codeph>:</p>
     <pre product="flash">
     myArray.every(myFunction, me);
     </pre>
     <p product="flash">Because <codeph>myFunction</codeph> is a member of the Timeline class, which cannot be overridden 
     by <codeph>me</codeph>, Flash Player will throw an exception.
     You can avoid this runtime error by assigning the function to a variable, as follows:</p>
     <pre product="flash">
     var myFunction:Function = function(obj:Object):void {
         //your code here
     };
     myArray.every(myFunction, me);
     </pre>
     
	 </apiDesc><example conref="examples\Array_every.as"> The following example tests two arrays to determine whether every item in each array is a number. It also outputs the results of the test, showing that <codeph>isNumeric</codeph> is <codeph>true</codeph> for the first array and <codeph>false</codeph> for the second:
<codeblock>
package {
    import flash.display.Sprite;
    public class Array_every extends Sprite {
        public function Array_every() {
            var arr1:Array = new Array(1, 2, 4);
            var res1:Boolean = arr1.every(isNumeric);
            trace("isNumeric:", res1); // true
 
            var arr2:Array = new Array(1, 2, "ham");
            var res2:Boolean = arr2.every(isNumeric);
            trace("isNumeric:", res2); // false
        }
        private function isNumeric(element:*, index:int, arr:Array):Boolean {
            return (element is Number);
        }
    }
}
</codeblock></example></apiOperationDetail><related-links><link href="#Array/some()"><linktext>Array.some()</linktext></link></related-links></apiOperation><apiOperation id="Array:AS3:filter"><apiName>filter</apiName><shortdesc>
	 Executes a test function on each item in the array and constructs a new array for all items that return true for the specified function.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A new array that contains all items from the original array that returned <codeph>true</codeph>.
	 
	 </apiDesc><apiOperationClassifier>Array</apiOperationClassifier></apiReturn><apiParam><apiItemName>callback</apiItemName><apiOperationClassifier>Function</apiOperationClassifier><apiDesc>The function to run on each item in the array. This function can contain a simple comparison (for example, <codeph>item &lt; 20</codeph>) or a more complex operation, and is invoked with three arguments; the
     value of an item, the index of an item, and the Array object:
     <pre>    function callback(item:*, index:int, array:Array):Boolean;</pre> 
	 
	 </apiDesc></apiParam><apiParam><apiItemName>thisObject</apiItemName><apiType value=""/><apiData>null</apiData><apiDesc>An object to use as <codeph>this</codeph> for the function.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Executes a test function on each item in the array and constructs a new array for all items that return <codeph>true</codeph> for the specified function. If an item returns <codeph>false</codeph>, it is not included in the new array.
     
     <p product="flash">For this method, the second parameter, <codeph>thisObject</codeph>, must be <codeph>null</codeph> if the
     first parameter, <codeph>callback</codeph>, is a method closure. Suppose you create a function in a movie clip
     called <codeph>me</codeph>:</p>
     <pre product="flash">
     function myFunction(obj:Object):void {
        //your code here
     }
     </pre>
     <p product="flash">Suppose you then use the <codeph>filter()</codeph> method on an array called <codeph>myArray</codeph>:</p>
     <pre product="flash"> 
     myArray.filter(myFunction, me);
     </pre>
     <p product="flash">Because <codeph>myFunction</codeph> is a member of the Timeline class, which cannot be overridden 
     by <codeph>me</codeph>, Flash Player will throw an exception.
     You can avoid this runtime error by assigning the function to a variable, as follows:</p>
     <pre product="flash">
     var myFunction:Function = function(obj:Object):void {
         //your code here
         };
     myArray.filter(myFunction, me);
     </pre>
     
	 </apiDesc><example conref="examples\Array.filter.as"> The following example creates an array of all employees who are managers:
<codeblock>
package {
    import flash.display.Sprite;
    public class Array_filter extends Sprite {
        public function Array_filter() {
            var employees:Array = new Array();
            employees.push({name:"Employee 1", manager:false});
            employees.push({name:"Employee 2", manager:true});
            employees.push({name:"Employee 3", manager:false});
            trace("Employees:");
            employees.forEach(traceEmployee);
            
            var managers:Array = employees.filter(isManager);
            trace("Managers:");
            managers.forEach(traceEmployee);
        }
        private function isManager(element:*, index:int, arr:Array):Boolean {
            return (element.manager == true);
        }
        private function traceEmployee(element:*, index:int, arr:Array):void {
            trace("\t" + element.name + ((element.manager) ? " (manager)" : ""));
        }
    }
}
</codeblock></example></apiOperationDetail><related-links><link href="#Array/map()"><linktext>Array.map()</linktext></link></related-links></apiOperation><apiOperation id="Array:AS3:forEach"><apiName>forEach</apiName><shortdesc>
	 Executes a function on each item in the array.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>callback</apiItemName><apiOperationClassifier>Function</apiOperationClassifier><apiDesc>The function to run on each item in the array. This function can contain a simple command 
     (for example, a <codeph>trace()</codeph> statement) or a more complex operation, and is invoked with three arguments; the
     value of an item, the index of an item, and the Array object:
     <pre>    function callback(item:*, index:int, array:Array):void;</pre> 
	 
	 </apiDesc></apiParam><apiParam><apiItemName>thisObject</apiItemName><apiType value=""/><apiData>null</apiData><apiDesc>An object to use as <codeph>this</codeph> for the function.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Executes a function on each item in the array.
     
     <p product="flash">For this method, the second parameter, <codeph>thisObject</codeph>, must be <codeph>null</codeph> if the
     first parameter, <codeph>callback</codeph>, is a method closure. Suppose you create a function in a movie clip
     called <codeph>me</codeph>:</p>
     <pre product="flash">
     function myFunction(obj:Object):void {
        //your code here
     }
     </pre>
     <p product="flash">Suppose you then use the <codeph>forEach()</codeph> method on an array called <codeph>myArray</codeph>:</p>
     <pre product="flash">
     myArray.forEach(myFunction, me);
     </pre>
     <p product="flash">Because <codeph>myFunction</codeph> is a member of the Timeline class, which cannot be overridden 
     by <codeph>me</codeph>, Flash Player will throw an exception.
     You can avoid this runtime error by assigning the function to a variable, as follows:</p>
     <pre product="flash">
     var myFunction:Function = function(obj:Object):void {
         //your code here
         };
     myArray.forEach(myFunction, me);
     </pre>
	 </apiDesc><example conref="examples\Array_forEach.as"> The following example runs the <codeph>trace()</codeph> statement in the <codeph>traceEmployee()</codeph> function on each item in the array:
<codeblock>
package {
    import flash.display.Sprite;
    public class Array_forEach extends Sprite {
        public function Array_forEach() {
            var employees:Array = new Array();
            employees.push({name:"Employee 1", manager:false});
            employees.push({name:"Employee 2", manager:true});
            employees.push({name:"Employee 3", manager:false});
            trace(employees);
            employees.forEach(traceEmployee);
        }
        private function traceEmployee(element:*, index:int, arr:Array):void {
            trace(element.name + " (" + element.manager + ")");
        }
    }
}
</codeblock></example><example conref="examples\Array_forEach_2.as"> The following example also runs the <codeph>trace()</codeph> statement in a slightly altered <codeph>traceEmployee()</codeph> function on each item in the array:
<codeblock>
package {
    import flash.display.Sprite;
    public class Array_forEach_2 extends Sprite {
        public function Array_forEach_2() {
            var employeeXML:XML = &lt;employees&gt;
                    &lt;employee name="Steven" manager="false" /&gt;
                    &lt;employee name="Bruce" manager="true" /&gt;
                    &lt;employee name="Rob" manager="false" /&gt;
                &lt;/employees&gt;;
            var employeesList:XMLList = employeeXML.employee;
            var employeesArray:Array = new Array();
            for each (var tempXML:XML in employeesList) {
                employeesArray.push(tempXML);
            }
            employeesArray.sortOn("@name");
            employeesArray.forEach(traceEmployee);
        }
        private function traceEmployee(element:*, index:Number, arr:Array):void {
            trace(element.@name + ((element.@manager == "true") ? " (manager)" : ""));
        }
    }
}
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Array:AS3:indexOf"><apiName>indexOf</apiName><shortdesc>
	 Searches for an item in an array by using strict equality (===) and returns the index 
	 position of the item.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A zero-based index position of the item in the array. If the <codeph>searchElement</codeph> argument
     is not found, the return value is -1.
	 
	 </apiDesc><apiOperationClassifier>int</apiOperationClassifier></apiReturn><apiParam><apiItemName>searchElement</apiItemName><apiType value=""/><apiDesc>The item to find in the array.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>fromIndex</apiItemName><apiOperationClassifier>int</apiOperationClassifier><apiData>0</apiData><apiDesc>The location in the array from which to start searching for the item.
     </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Searches for an item in an array by using strict equality (<codeph>===</codeph>) and returns the index 
	 position of the item.
	 </apiDesc><example conref="examples\Array_indexOf.as"> The following example displays the position of the specified array:
<codeblock>
package {
    import flash.display.Sprite;
    public class Array_indexOf extends Sprite {
        public function Array_indexOf() {
            var arr:Array = new Array(123,45,6789);
            arr.push("123-45-6789");
            arr.push("987-65-4321");
            
            var index:int = arr.indexOf("123");
            trace(index); // -1
            
            var index2:int = arr.indexOf(123);
            trace(index2); // 0
        }
    }
}
</codeblock></example></apiOperationDetail><related-links><link href="#Array/lastIndexOf()"><linktext>Array.lastIndexOf()</linktext></link><link href="operators.html#strict_equality"><linktext>=== (strict equality)</linktext></link></related-links></apiOperation><apiOperation id="Array:AS3:join"><apiName>join</apiName><shortdesc>
	 Converts the elements in an array to strings, inserts the specified separator between the 
	 elements, concatenates them, and returns the resulting string.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>array.join, join
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A string consisting of the elements of an array
	 converted to strings and separated by the specified parameter.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>sep</apiItemName><apiType value=""/><apiData>unknown</apiData><apiDesc>A character or string that separates array elements in 
	 the returned string. If you omit this parameter, a comma is used as the default 
	 separator. 
	 
	 </apiDesc></apiParam><apiTipTexts><apiTipText>Converts the elements in an array to strings.
	 
	 </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
	 Converts the elements in an array to strings, inserts the specified separator between the 
	 elements, concatenates them, and returns the resulting string. A nested array is always 
	 separated by a comma (,), not by the separator passed to the <codeph>join()</codeph> method.
	 
	 </apiDesc><example conref="examples\Array.join.1.as"> The following code creates an Array object <codeph>myArr</codeph> with elements <codeph>one</codeph>,
 <codeph>two</codeph>, and <codeph>three</codeph> and then a string containing <codeph>one and two and three</codeph>
 using the <codeph>join()</codeph> method.
<codeblock>

var myArr:Array = new Array("one", "two", "three");
var myStr:String = myArr.join(" and ");
trace(myArr); // one,two,three
trace(myStr); // one and two and three
</codeblock></example><example conref="examples\Array.join.2.as"> The following code creates an Array object <codeph>specialChars</codeph> with elements <codeph>(</codeph>,
 <codeph>)</codeph>, <codeph>-</codeph>, and a blank space and then creates a string containing <codeph>(888) 867-5309</codeph>.
 Then, using a <codeph>for</codeph> loop, it removes each type of special character listed in <codeph>specialChars</codeph> to
 produce a string (<codeph>myStr</codeph>) that contains only the digits of the phone number remaining: <codeph>888675309</codeph>.
 Note that other characters, such as <codeph>+</codeph>, could have been added to <codeph>specialChars</codeph> and then this
 routine would work with international phone number formats.
<codeblock>

var phoneString:String = "(888) 867-5309";

var specialChars:Array = new Array("(", ")", "-", " ");
var myStr:String = phoneString;

var ln:uint = specialChars.length;
for(var i:uint; i &lt; ln; i++) {
    myStr = myStr.split(specialChars[i]).join("");
}

var phoneNumber:Number = new Number(myStr);

trace(phoneString); // (888) 867-5309
trace(phoneNumber); // 8888675309
</codeblock></example></apiOperationDetail><related-links><link href="#String/split()"><linktext>String.split()</linktext></link></related-links></apiOperation><apiOperation id="Array:AS3:lastIndexOf"><apiName>lastIndexOf</apiName><shortdesc>
	 Searches for an item in an array, working backward from the last item, and returns the index position of the matching item using strict equality (===).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A zero-based index position of the item in the array. If the <codeph>searchElement</codeph> argument is 
     not found, the return value is -1.
	 
	 </apiDesc><apiOperationClassifier>int</apiOperationClassifier></apiReturn><apiParam><apiItemName>searchElement</apiItemName><apiType value=""/><apiDesc>The item to find in the array.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>fromIndex</apiItemName><apiOperationClassifier>int</apiOperationClassifier><apiData>0x7fffffff</apiData><apiDesc>The location in the array from which to start searching for the item. The default is the maximum
	 value allowed for an index. If you do not specify <codeph>fromIndex</codeph>, the search starts at the last item
	 in the array.
     </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Searches for an item in an array, working backward from the last item, and returns the index position of the matching item using strict equality (<codeph>===</codeph>).
	 </apiDesc><example conref="examples\Array_lastIndexOf.as"> The following example displays the position of the specified array:
<codeblock>
package {
    import flash.display.Sprite;
    public class Array_lastIndexOf extends Sprite {
        public function Array_lastIndexOf() {
            var arr:Array = new Array(123,45,6789,123,984,323,123,32);
            
            var index:int = arr.indexOf(123);
            trace(index); // 0
            
            var index2:int = arr.lastIndexOf(123);
            trace(index2); // 6
        }
    }
}
</codeblock></example></apiOperationDetail><related-links><link href="#Array/indexOf()"><linktext>Array.indexOf()</linktext></link><link href="operators.html#strict_equality"><linktext>=== (strict equality)</linktext></link></related-links></apiOperation><apiOperation id="Array:AS3:map"><apiName>map</apiName><shortdesc>
     Executes a function on each item in an array, and constructs a new array of items corresponding to the results of the function on 
     each item in the original array.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A new array that contains the results of the function on each item in the original array.
	 
	 </apiDesc><apiOperationClassifier>Array</apiOperationClassifier></apiReturn><apiParam><apiItemName>callback</apiItemName><apiOperationClassifier>Function</apiOperationClassifier><apiDesc>The function to run on each item in the array. This function can contain a simple command (such as changing the case of an array of strings) or a more complex operation, and is invoked with three arguments; the
     value of an item, the index of an item, and the Array object:
     <pre>    function callback(item:*, index:int, array:Array):void;</pre> 
	 
	 </apiDesc></apiParam><apiParam><apiItemName>thisObject</apiItemName><apiType value=""/><apiData>null</apiData><apiDesc>An object to use as <codeph>this</codeph> for the function.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
     Executes a function on each item in an array, and constructs a new array of items corresponding to the results of the function on 
     each item in the original array.
     
     <p product="flash">For this method, the second parameter, <codeph>thisObject</codeph>, must be <codeph>null</codeph> if the
     first parameter, <codeph>callback</codeph>, is a method closure. Suppose you create a function in a movie clip
     called <codeph>me</codeph>:</p>
     <pre product="flash">
     function myFunction(obj:Object):void {
        //your code here
     }
     </pre>
     <p product="flash">Suppose you then use the <codeph>map()</codeph> method on an array called <codeph>myArray</codeph>:</p>
     <pre product="flash">
     myArray.map(myFunction, me);
     </pre>
     <p product="flash">Because <codeph>myFunction</codeph> is a member of the Timeline class, which cannot be overridden 
     by <codeph>me</codeph>, Flash Player will throw an exception.
     You can avoid this runtime error by assigning the function to a variable, as follows:</p>
     <pre product="flash">
     var myFunction:Function = function(obj:Object):void {
         //your code here
         };
     myArray.map(myFunction, me);
     </pre>
	 </apiDesc><example conref="examples\Array_map.as"> The following example changes all items in the array to use uppercase letters:
<codeblock>
package {
    import flash.display.Sprite;
    public class Array_map extends Sprite {
        public function Array_map() {
            var arr:Array = new Array("one", "two", "Three");
            trace(arr); // one,two,Three

            var upperArr:Array = arr.map(toUpper);
            trace(upperArr); // ONE,TWO,THREE
        }
        private function toUpper(element:*, index:int, arr:Array):String {
            return String(element).toUpperCase();
        }
    }
}
</codeblock></example></apiOperationDetail><related-links><link href="#Array/filter()"><linktext>Array.filter()</linktext></link></related-links></apiOperation><apiOperation id="Array:AS3:pop"><apiName>pop</apiName><shortdesc>
	  Removes the last element from an array and returns the value of that element.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>array.pop, pop
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The value of the last element (of any data type) in the specified array.
	 
	 </apiDesc><apiType value="any"/></apiReturn></apiOperationDef><apiDesc>
	  Removes the last element from an array and returns the value of that element.
	 
	 </apiDesc><example conref="examples\Array.pop.1.as"> The following code creates an Array object <codeph>letters</codeph> with elements <codeph>a</codeph>,
 <codeph>b</codeph>, and <codeph>c</codeph>. The last element (<codeph>c</codeph>) is then removed from the array using the
 <codeph>pop()</codeph> method and assigned to the String object <codeph>letter</codeph>.
<codeblock>

var letters:Array = new Array("a", "b", "c");
trace(letters); // a,b,c
var letter:String = letters.pop();
trace(letters); // a,b
trace(letter);     // c
</codeblock></example></apiOperationDetail><related-links><link href="#Array/push()"><linktext>Array.push()</linktext></link><link href="#Array/shift()"><linktext>Array.shift()</linktext></link><link href="#Array/unshift()"><linktext>Array.unshift()</linktext></link></related-links></apiOperation><apiOperation id="Array:AS3:push"><apiName>push</apiName><shortdesc>
	 Adds one or more elements to the end of an array and returns the new length of the array.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>array.push, push
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An integer representing the length of the new array.
	 
	 </apiDesc><apiOperationClassifier>uint</apiOperationClassifier></apiReturn><apiParam><apiItemName>args</apiItemName><apiType value="restParam"/><apiDesc>One or more values to append to the array.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Adds one or more elements to the end of an array and returns the new length of the array.
	 
	 </apiDesc><example conref="examples\Array.push.1.as"> The following code creates an empty Array object <codeph>letters</codeph> and then populates the array
 with the elements <codeph>a</codeph>, <codeph>b</codeph>, and <codeph>c</codeph> 
 using the <codeph>push()</codeph> method.
<codeblock>

var letters:Array = new Array();

letters.push("a");
letters.push("b");
letters.push("c");

trace(letters.toString()); // a,b,c
</codeblock></example><example conref="examples\Array.push.2.as"> The following code creates an Array object <codeph>letters</codeph>, which is initially
 populated with the element <codeph>a</codeph>. The <codeph>push()</codeph> method
 is then used once to add the elements <codeph>b</codeph> and <codeph>c</codeph> to the end of the array,
 which is three elements after the push.
<codeblock>

var letters:Array = new Array("a");
var count:uint = letters.push("b", "c");

trace(letters); // a,b,c
trace(count);   // 3
</codeblock></example></apiOperationDetail><related-links><link href="#Array/pop()"><linktext>Array.pop()</linktext></link><link href="#Array/shift()"><linktext>Array.shift()</linktext></link><link href="#Array/unshift()"><linktext>Array.unshift()</linktext></link></related-links></apiOperation><apiOperation id="Array:AS3:reverse"><apiName>reverse</apiName><shortdesc>
	  Reverses the array in place.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>array.reverse, reverse
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The new array.
	 </apiDesc><apiOperationClassifier>Array</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	  Reverses the array in place.
	 
	 </apiDesc><example conref="examples\Array.reverse.1.as"> The following code creates an Array object <codeph>letters</codeph> with elements <codeph>a</codeph>,
 <codeph>b</codeph>, and <codeph>c</codeph>. The order of the array elements is then reversed using the
 <codeph>reverse()</codeph> method to produce the array <codeph>[c,b,a]</codeph>.
<codeblock>

var letters:Array = new Array("a", "b", "c");
trace(letters); // a,b,c
letters.reverse();
trace(letters); // c,b,a
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Array:AS3:shift"><apiName>shift</apiName><shortdesc>
	 Removes the first element from an array and returns that element.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>array.shift, shift
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The first element (of any data type) in an array.
	 
	 </apiDesc><apiType value="any"/></apiReturn></apiOperationDef><apiDesc>
	 Removes the first element from an array and returns that element. The remaining array elements are moved
     from their original position, i, to i-1.
	 
	 </apiDesc><example conref="examples\Array.shift.1.as"> The following code creates the Array object <codeph>letters</codeph> with elements <codeph>a</codeph>,
 <codeph>b</codeph>, and <codeph>c</codeph>. The <codeph>shift()</codeph> method is then used to remove the first
 element (<codeph>a</codeph>) from <codeph>letters</codeph> and assign it to the string <codeph>firstLetter</codeph>.
<codeblock>

var letters:Array = new Array("a", "b", "c");
var firstLetter:String = letters.shift();
trace(letters);     // b,c
trace(firstLetter); // a
</codeblock></example></apiOperationDetail><related-links><link href="#Array/pop()"><linktext>Array.pop()</linktext></link><link href="#Array/push()"><linktext>Array.push()</linktext></link><link href="#Array/unshift()"><linktext>Array.unshift()</linktext></link></related-links></apiOperation><apiOperation id="Array:AS3:slice"><apiName>slice</apiName><shortdesc>
	 Returns a new array that consists of a range of elements from the original array, without modifying the original array.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>array.slice, slice
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An array that consists of a range of elements from the original array.
	 
	 </apiDesc><apiOperationClassifier>Array</apiOperationClassifier></apiReturn><apiParam><apiItemName>startIndex</apiItemName><apiOperationClassifier>int</apiOperationClassifier><apiData>0</apiData><apiDesc>A number specifying the index of the starting point 
	 for the slice. If <codeph>startIndex</codeph> is a negative number, the starting 
	 point begins at the end of the array, where -1 is the last element.	
	 
	 </apiDesc></apiParam><apiParam><apiItemName>endIndex</apiItemName><apiOperationClassifier>int</apiOperationClassifier><apiData>16777215</apiData><apiDesc>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 array. If <codeph>endIndex</codeph> is a negative 
	 number, the ending point is specified from the end of the array, where -1 is the 
	 last element.
	 
	 </apiDesc></apiParam><apiTipTexts><apiTipText>Returns a new array that consists of a range of elements from the original array.
	 
	 </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
	 Returns a new array that consists of a range of elements from the original array, without modifying the original array. The returned array includes the <codeph>startIndex</codeph> element and all elements up to, but not including, the <codeph>endIndex</codeph> element. 
	 <p>If you don't pass any parameters, a duplicate of the original array is created.</p>
	 
	 </apiDesc><example conref="examples\Array.slice.1.as"> The following code creates an Array object <codeph>letters</codeph> with elements
 <codeph>[a,b,c,d,e,f]</codeph>. The array <codeph>someLetters</codeph> is then created by calling the
 <codeph>slice()</codeph> method on elements one (<codeph>b</codeph>) through three (<codeph>d</codeph>),
 resulting in an array with elements <codeph>b</codeph> and <codeph>c</codeph>.
<codeblock>

var letters:Array = new Array("a", "b", "c", "d", "e", "f");
var someLetters:Array = letters.slice(1,3);

trace(letters);     // a,b,c,d,e,f
trace(someLetters); // b,c
</codeblock></example><example conref="examples\Array.slice.2.as"> The following code creates an Array object <codeph>letters</codeph> with elements
 <codeph>[a,b,c,d,e,f]</codeph>.The array <codeph>someLetters</codeph> is then created by calling the
 <codeph>slice()</codeph> method on element two (<codeph>c</codeph>), resulting in an array with elements
 <codeph>[c,d,e,f]</codeph>.
<codeblock>

var letters:Array = new Array("a", "b", "c", "d", "e", "f");
var someLetters:Array = letters.slice(2);

trace(letters);     // a,b,c,d,e,f
trace(someLetters); // c,d,e,f
</codeblock></example><example conref="examples\Array.slice.3.as"> The following code creates an Array object <codeph>letters</codeph> with elements
 <codeph>[a,b,c,d,e,f]</codeph>. The array <codeph>someLetters</codeph> is then created by calling the
 <codeph>slice()</codeph> method on the second to last element from the end (<codeph>e</codeph>), resulting
 in an array with elements <codeph>e</codeph> and <codeph>f</codeph>.
<codeblock>

var letters:Array = new Array("a", "b", "c", "d", "e", "f");
var someLetters:Array = letters.slice(-2);

trace(letters);     // a,b,c,d,e,f
trace(someLetters); // e,f
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Array:AS3:some"><apiName>some</apiName><shortdesc>
     Executes a test function on each item in the array until an item is reached that returns true.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A Boolean value of <codeph>true</codeph> if any items in the array return <codeph>true</codeph> for the specified function; otherwise <codeph>false</codeph>.
	 
	 </apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn><apiParam><apiItemName>callback</apiItemName><apiOperationClassifier>Function</apiOperationClassifier><apiDesc>The function to run on each item in the array. This function can contain a simple comparison (for example
     <codeph>item &lt; 20</codeph>) or a more complex operation, and is invoked with three arguments; the
     value of an item, the index of an item, and the Array object:
     <pre>    function callback(item:*, index:int, array:Array):Boolean;</pre> 
	 
	 </apiDesc></apiParam><apiParam><apiItemName>thisObject</apiItemName><apiType value=""/><apiData>null</apiData><apiDesc>An object to use as <codeph>this</codeph> for the function.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
     Executes a test function on each item in the array until an item is reached that returns <codeph>true</codeph>. Use this method to determine whether any items in an array meet a criterion, such as having a value less than a particular number.
     
     <p product="flash">For this method, the second parameter, <codeph>thisObject</codeph>, must be <codeph>null</codeph> if the
     first parameter, <codeph>callback</codeph>, is a method closure. Suppose you create a function in a movie clip
     called <codeph>me</codeph>:</p>
     <pre product="flash">
     function myFunction(obj:Object):void {
        //your code here
     }
     </pre>
     <p product="flash">Suppose you then use the <codeph>some()</codeph> method on an array called <codeph>myArray</codeph>:</p>
     <pre product="flash">
     myArray.some(myFunction, me);
     </pre>
     <p product="flash">Because <codeph>myFunction</codeph> is a member of the Timeline class, which cannot be overridden 
     by <codeph>me</codeph>, Flash Player will throw an exception.
     You can avoid this runtime error by assigning the function to a variable, as follows:</p>
     <pre product="flash">
     var myFunction:Function = function(obj:Object):void {
         //your code here
         };
     myArray.some(myFunction, me);
     </pre>   
	 </apiDesc><example conref="examples\Array_some.as"> The following example displays which values are undefined:
<codeblock>
package {
    import flash.display.Sprite;
    public class Array_some extends Sprite {
        public function Array_some() {
            var arr:Array = new Array();
            arr[0] = "one";
            arr[1] = "two";
            arr[3] = "four";
            var isUndef:Boolean = arr.some(isUndefined);
            if (isUndef) {
                trace("array contains undefined values: " + arr);
            } else {
                trace("array contains no undefined values.");
            }
        }
        private function isUndefined(element:*, index:int, arr:Array):Boolean {
            return (element == undefined);
        }
    }
}
</codeblock></example></apiOperationDetail><related-links><link href="#Array/every()"><linktext>every()</linktext></link></related-links></apiOperation><apiOperation id="Array:AS3:sort"><apiName>sort</apiName><shortdesc>
	 Sorts the elements in an array.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>array.sort, sort
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The return value depends on whether you pass any arguments, as described in 
	 the following list:
	 <ul>
	   <li>If you specify a value of 4 or <codeph>Array.UNIQUESORT</codeph> for the <codeph>sortOptions</codeph> argument
	 of the <codeph>...args</codeph> parameter and two or more elements being sorted have identical sort fields,
	 Flash returns a value of 0 and does not modify the array. </li>
  	   <li>If you specify a value of 8 or <codeph>Array.RETURNINDEXEDARRAY</codeph> for 
  	 the <codeph>sortOptions</codeph> argument of the <codeph>...args</codeph> parameter, Flash returns a sorted numeric
     array of the indices that reflects the results of the sort and does not modify the array. </li>
	   <li>Otherwise, Flash returns nothing and modifies the array to reflect the sort order.</li>
	 </ul>
	 
	 </apiDesc><apiOperationClassifier>Array</apiOperationClassifier></apiReturn><apiParam><apiItemName>args</apiItemName><apiType value="restParam"/><apiDesc>The arguments specifying a comparison function and one or more values that determine the behavior of the sort.
	 <p>This method uses the syntax and argument order <codeph>Array.sort(compareFunction, sortOptions)</codeph> with the arguments defined as follows:</p>
     <ul><li><codeph>compareFunction</codeph> - A comparison function used to determine the sorting order of elements in an array. This argument is optional. A comparison function should take two arguments to compare. Given the elements A and B, the result of <codeph>compareFunction</codeph> can have a negative, 0, or positive value:
	 <ul>
	   <li>A negative return value specifies that A appears before B in the sorted sequence.</li>
	   <li>A return value of 0 specifies that A and B have the same sort order.</li>
	   <li>A positive return value specifies that A appears after B in the sorted sequence.</li>
	 </ul>
	 </li>
	 <li><codeph>sortOptions</codeph> - One or more numbers or defined constants, separated by the <codeph>|</codeph> (bitwise OR) operator, that change the behavior of the sort from the default. This argument is optional. The following values are acceptable for <codeph>sortOptions</codeph>: 
	  <ul>
	   <li>1 or <codeph>Array.CASEINSENSITIVE</codeph></li>
	   <li>2 or <codeph>Array.DESCENDING</codeph></li>
	   <li>4 or <codeph>Array.UNIQUESORT</codeph></li>
	   <li>8 or <codeph>Array.RETURNINDEXEDARRAY</codeph> </li>
	   <li>16 or <codeph>Array.NUMERIC</codeph></li>
	 </ul>
	 For more information, see the <codeph>Array.sortOn()</codeph> method.</li>
	 </ul>
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Sorts the elements in an array. This method sorts according to Unicode values. (ASCII is a subset of Unicode.)
	 <p>By default, <codeph>Array</codeph>.<codeph>sort()</codeph> works in the following way:</p>
	 <ul>
	   <li>Sorting is case-sensitive (<i>Z</i> precedes <i>a</i>).</li>
	   <li>Sorting is ascending (<i>a</i> precedes <i>b</i>). </li>
	   <li>The array is modified to reflect the sort order; multiple elements that have identical sort fields are placed consecutively in the sorted array in no particular order.</li>
	   <li>All elements, regardless of data type, are sorted as if they were strings, so 100 precedes 99, because "1" is a lower string value than "9".</li>
	 </ul>
	 <p>
	 To sort an array by using settings that deviate from the default settings, 
     you can either use one of the sorting options described in the <codeph>sortOptions</codeph> portion of the <codeph>...args</codeph> parameter description, or you can create your own custom function to do the sorting. 
	 If you create a custom function, you call the <codeph>sort()</codeph> method, and use the name
	 of your custom function as the first argument (<codeph>compareFunction</codeph>) 
	 </p>
	 
	 </apiDesc><example conref="examples\Array.sort.1.as"> The following code creates the Array object <codeph>vegetables</codeph> with elements
 <codeph>[spinach, green pepper, cilantro, onion, avocado]</codeph>. The array is then sorted by
 the <codeph>sort()</codeph> method, which is called with no parameters.  The result is <codeph>vegetables</codeph> sorted in
 alphabetical order (<codeph>[avocado, cilantro, green pepper, onion, spinach]</codeph>).
<codeblock>

var vegetables:Array = new Array("spinach",
                 "green pepper",
                 "cilantro",
                 "onion",
                 "avocado");

trace(vegetables); // spinach,green pepper,cilantro,onion,avocado
vegetables.sort();
trace(vegetables); // avocado,cilantro,green pepper,onion,spinach
</codeblock></example><example conref="examples\Array.sort.2.as"> The following code creates the Array object <codeph>vegetables</codeph> with elements
 <codeph>[spinach, green pepper, Cilantro, Onion, and Avocado]</codeph>. The array is then sorted by
 the <codeph>sort()</codeph> method, which is called with no parameters the first time; the result is
 <codeph>[Avocado,Cilantro,Onion,green pepper,spinach]</codeph>. Then <codeph>sort()</codeph> is called on
 <codeph>vegetables</codeph> again with the <codeph>CASEINSENSITIVE</codeph> constant as a parameter.
 The result is <codeph>vegetables</codeph> sorted in alphabetical order
 (<codeph>[Avocado, Cilantro, green pepper, Onion, spinach]</codeph>).
<codeblock>

var vegetables:Array = new Array("spinach",
                 "green pepper",
                 "Cilantro",
                 "Onion",
                 "Avocado");

vegetables.sort();
trace(vegetables); // Avocado,Cilantro,Onion,green pepper,spinach
vegetables.sort(Array.CASEINSENSITIVE);
trace(vegetables); // Avocado,Cilantro,green pepper,Onion,spinach
</codeblock></example><example conref="examples\Array.sort.3.as"> The following code creates the empty Array object <codeph>vegetables</codeph>, which is then
 populated through five calls to <codeph>push()</codeph>.  Each time <codeph>push()</codeph> is
 called, a new <codeph>Vegetable</codeph> object is created by a call to the <codeph>Vegetable()</codeph>
 constructor, which accepts a String (<codeph>name</codeph>) and Number (<codeph>price</codeph>) object.
 Calling <codeph>push()</codeph> five times with the values shown results in the following
 array: <codeph>[lettuce:1.49, spinach:1.89, asparagus:3.99, celery:1.29, squash:1.44]</codeph>.  The
 <codeph>sort()</codeph> method is then used to sort the array, resulting in the array
 <codeph>[asparagus:3.99, celery:1.29, lettuce:1.49, spinach:1.89, squash:1.44]</codeph>.
<codeblock>
var vegetables:Array = new Array();
vegetables.push(new Vegetable("lettuce", 1.49));
vegetables.push(new Vegetable("spinach", 1.89));
vegetables.push(new Vegetable("asparagus", 3.99));
vegetables.push(new Vegetable("celery", 1.29));
vegetables.push(new Vegetable("squash", 1.44));

trace(vegetables);
// lettuce:1.49, spinach:1.89, asparagus:3.99, celery:1.29, squash:1.44

vegetables.sort();

trace(vegetables);
// asparagus:3.99, celery:1.29, lettuce:1.49, spinach:1.89, squash:1.44

//The following code defines the Vegetable class
class Vegetable {
    private var name:String;
    private var price:Number;

    public function Vegetable(name:String, price:Number) {
        this.name = name;
        this.price = price;
    }

    public function toString():String {
        return " " + name + ":" + price;
    }
}
</codeblock></example><example conref="examples\Array.sort.4.as"> The following example is exactly the same as the previous one, except
 that the <codeph>sort()</codeph> method is used with a custom sort function
 (<codeph>sortOnPrice</codeph>), which sorts according to price instead of alphabetically.  Note that the
 new function <codeph>getPrice()</codeph> extracts the price.
<codeblock>

var vegetables:Array = new Array();
vegetables.push(new Vegetable("lettuce", 1.49));
vegetables.push(new Vegetable("spinach", 1.89));
vegetables.push(new Vegetable("asparagus", 3.99));
vegetables.push(new Vegetable("celery", 1.29));
vegetables.push(new Vegetable("squash", 1.44));

trace(vegetables);
// lettuce:1.49, spinach:1.89, asparagus:3.99, celery:1.29, squash:1.44

vegetables.sort(sortOnPrice);

trace(vegetables);
// celery:1.29, squash:1.44, lettuce:1.49, spinach:1.89, asparagus:3.99

function sortOnPrice(a:Vegetable, b:Vegetable):Number {
    var aPrice:Number = a.getPrice();
    var bPrice:Number = b.getPrice();

    if(aPrice &gt; bPrice) {
        return 1;
    } else if(aPrice &lt; bPrice) {
        return -1;
    } else  {
        //aPrice == bPrice
        return 0;
    }
}

// The following code defines the Vegetable class and should be in a separate package.
class Vegetable {
    private var name:String;
    private var price:Number;

    public function Vegetable(name:String, price:Number) {
        this.name = name;
        this.price = price;
    }

    public function getPrice():Number {
        return price;
    }

    public function toString():String {
        return " " + name + ":" + price;
    }
}
</codeblock></example><example conref="examples\Array.sort.5.as"> The following code creates the Array object <codeph>numbers</codeph> with elements
 <codeph>[3,5,100,34,10]</codeph>. A call to <codeph>sort()</codeph> without any parameters sorts
 alphabetically, producing the undesired result <codeph>[10,100,3,34,5]</codeph>.  To properly
 sort numeric values, you must pass the constant <codeph>NUMERIC</codeph> to the <codeph>sort()</codeph>
 method, which sorts <codeph>numbers</codeph> as follows: <codeph>[3,5,10,34,100]</codeph>.
 <p><b>Note:</b> The default behavior of the <codeph>sort()</codeph> function is to handle each entity as a string.
 The <codeph>Array.NUMERIC</codeph> argument does not actually convert other data types to the Number data type; it
 simply allows the sort algorithm to recognize numbers.</p>
<codeblock>

var numbers:Array = new Array(3,5,100,34,10);

trace(numbers); // 3,5,100,34,10
numbers.sort();
trace(numbers); // 10,100,3,34,5
numbers.sort(Array.NUMERIC);
trace(numbers); // 3,5,10,34,100
</codeblock></example></apiOperationDetail><related-links><link href="operators.html#bitwise_OR"><linktext>| (bitwise OR)</linktext></link><link href="#Array/sortOn()"><linktext>Array.sortOn()</linktext></link></related-links></apiOperation><apiOperation id="Array:AS3:sortOn"><apiName>sortOn</apiName><shortdesc>
	 Sorts the elements in an array according to one or more fields in the array.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>array.sortOn, sortOn
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The return value depends on whether you pass any parameters:
	 <ul>
	   <li>If you specify a value of 4 or <codeph>Array.UNIQUESORT</codeph> for the <codeph>options</codeph> parameter, and two or more elements being sorted have identical sort fields, a value of 0 is returned and the array is not modified. </li>
  	   <li>If you specify a value of 8 or <codeph>Array.RETURNINDEXEDARRAY</codeph> for the <codeph>options</codeph> parameter, an array is returned that reflects the results of the sort and the array is not modified.</li>
  	   <li>Otherwise, nothing is returned and the array is modified to reflect the sort order.</li>
	 </ul>
	 
	 </apiDesc><apiOperationClassifier>Array</apiOperationClassifier></apiReturn><apiParam><apiItemName>fieldName</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>A string that identifies a field to be used as the sort value, or an 
 	 array in which the first element represents the primary sort field, the  second represents 
 	 the secondary sort field, and so on.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>options</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiData>null</apiData><apiDesc>One or more numbers or names of defined constants, separated by the <codeph>bitwise OR (|)</codeph> operator, that change the sorting behavior. The following values are acceptable for the <codeph>options</codeph> parameter:
	 <ul>
	   <li><codeph>Array.CASEINSENSITIVE</codeph> or 1</li>
	   <li><codeph>Array.DESCENDING</codeph> or 2</li>
	   <li><codeph>Array.UNIQUESORT</codeph> or 4</li>
	   <li><codeph>Array.RETURNINDEXEDARRAY</codeph> or 8</li>
	   <li><codeph>Array.NUMERIC</codeph> or 16</li>
	 </ul>
     <p product="flash">Code hinting is enabled if you use the string form of the flag (for example, <codeph>DESCENDING</codeph>) rather than the numeric form (2).</p>
   	 
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Sorts the elements in an array according to one or more fields in the array. 
	 The array should have the following characteristics:
	 <ul>
	   <li>The array is an indexed array, not an associative array.</li>
 	   <li>Each element of the array holds an object with one or more properties.</li>
	   <li>All of the objects have at least one property in common, the values of which can be used
	       to sort the array. Such a property is called a <i>field</i>.</li>
	 </ul>
	 <p>If you pass multiple <codeph>fieldName</codeph> parameters, the first field represents the primary sort field, the second represents the next sort field, and so on. Flash sorts according to Unicode values. (ASCII is a subset of Unicode.) If either of the elements being compared does not contain the field that is specified in the <codeph>fieldName</codeph> parameter, the field is assumed to be set to <codeph>undefined</codeph>, and the elements are placed consecutively in the sorted array in no particular order.</p>
 	 <p>By default, <codeph>Array</codeph>.<codeph>sortOn()</codeph> works in the following way:</p>
	 <ul>
	   <li>Sorting is case-sensitive (<i>Z</i> precedes <i>a</i>).</li>
	   <li>Sorting is ascending (<i>a</i> precedes <i>b</i>). </li>
	   <li>The array is modified to reflect the sort order; multiple elements that have identical sort fields are placed consecutively in the sorted array in no particular order.</li>
	   <li>Numeric fields are sorted as if they were strings, so 100 precedes 99, because "1" is a lower string value than "9".</li>
	 </ul>
	 <p>Flash Player 7 added the <codeph>options</codeph> parameter, which you can use to override the default sort behavior. To sort a simple array (for example, an array with only one field), or to specify a sort order that the <codeph>options</codeph> parameter doesn't support, use <codeph>Array.sort()</codeph>.</p>
 	 <p>To pass multiple flags, separate them with the bitwise OR (<codeph>|</codeph>) operator:</p>
	 <codeblock>
	 my_array.sortOn(someFieldName, Array.DESCENDING | Array.NUMERIC);
	 </codeblock>
	 <p>Flash Player 8 added the ability to specify a different sorting option for each field when you sort by more than one field. In Flash Player 8 and later, the <codeph>options</codeph> parameter accepts an array of sort options such that each sort option corresponds to a sort field in the <codeph>fieldName</codeph> parameter. The following example sorts the primary sort field, <codeph>a</codeph>, using a descending sort; the secondary sort field, <codeph>b</codeph>, using a numeric sort; and the tertiary sort field, <codeph>c</codeph>, using a case-insensitive sort:</p>
	 <codeblock>
	 Array.sortOn (["a", "b", "c"], [Array.DESCENDING, Array.NUMERIC, Array.CASEINSENSITIVE]);
	 </codeblock>
	 <p><b>Note: </b>The <codeph>fieldName</codeph> and <codeph>options</codeph> arrays must have the same number of elements; otherwise, the <codeph>options</codeph> array is ignored. Also, the <codeph>Array.UNIQUESORT</codeph> and <codeph>Array.RETURNINDEXEDARRAY</codeph> options can be used only as the first element in the array; otherwise, they are ignored.</p>
	 
	 </apiDesc><example conref="examples\Array.sortOn.1.as"> The following code creates an empty Array object <codeph>vegetables</codeph> and the array
 is then populated using five calls to <codeph>push()</codeph>.  Each time <codeph>push()</codeph> is
 called, a new <codeph>Vegetable</codeph> object is created by calling the <codeph>Vegetable()</codeph>
 constructor, which accepts a String (<codeph>name</codeph>) and Number (<codeph>price</codeph>) object.
 Calling <codeph>push()</codeph> five times with the values shown results in the following
 array: <codeph>[lettuce:1.49, spinach:1.89, asparagus:3.99, celery:1.29, squash:1.44]</codeph>. The
 <codeph>sortOn()</codeph> method is then used with the <codeph>name</codeph> parameter to produce the following array:
 <codeph>[asparagus:3.99, celery:1.29, lettuce:1.49, spinach:1.89, squash:1.44]</codeph>. The
 <codeph>sortOn()</codeph> method is then called again with the price parameter, and the
 NUMERIC and DESCENDING constants to produce an array sorted by numbers in descending order:
 <codeph>[asparagus:3.99, spinach:1.89, lettuce:1.49, squash:1.44, celery:1.29]</codeph>.
<codeblock>

var vegetables:Array = new Array();
vegetables.push(new Vegetable("lettuce", 1.49));
vegetables.push(new Vegetable("spinach", 1.89));
vegetables.push(new Vegetable("asparagus", 3.99));
vegetables.push(new Vegetable("celery", 1.29));
vegetables.push(new Vegetable("squash", 1.44));

trace(vegetables);
// lettuce:1.49, spinach:1.89, asparagus:3.99, celery:1.29, squash:1.44

vegetables.sortOn("name");
trace(vegetables);
// asparagus:3.99, celery:1.29, lettuce:1.49, spinach:1.89, squash:1.44

vegetables.sortOn("price", Array.NUMERIC | Array.DESCENDING);
trace(vegetables);
// asparagus:3.99, spinach:1.89, lettuce:1.49, squash:1.44, celery:1.29

class Vegetable {
    public var name:String;
    public var price:Number;

    public function Vegetable(name:String, price:Number) {
        this.name = name;
        this.price = price;
    }

    public function toString():String {
        return " " + name + ":" + price;
    }
}
</codeblock></example><example conref="examples\Array.sortOn.2.as"> The following code creates an empty Array object <codeph>records</codeph> and the
 array is then populated using three calls to <codeph>push()</codeph>.  Each time <codeph>push()</codeph> is 
 called, the strings <codeph>name</codeph> and <codeph>city</codeph> and a <codeph>zip</codeph> number are
 added to <codeph>records</codeph>. Three <codeph>for</codeph> loops are used to print the array elements. The 
 first <codeph>for</codeph> loop prints the elements in the order in which they were added. The second <codeph>for</codeph>
 loop is run after <codeph>records</codeph> has been sorted by name and then city using the
 <codeph>sortOn()</codeph> method. The third <codeph>for</codeph> loop produces different output because 
 <codeph>records</codeph> is re-sorted by city then by name.
<codeblock>


var records:Array = new Array();
records.push({name:"john", city:"omaha", zip:68144});
records.push({name:"john", city:"kansas city", zip:72345});
records.push({name:"bob", city:"omaha", zip:94010});

for(var i:uint = 0; i &lt; records.length; i++) {
    trace(records[i].name + ", " + records[i].city);
}
// Results:
// john, omaha
// john, kansas city
// bob, omaha

trace("records.sortOn('name', 'city');");
records.sortOn(["name", "city"]);
for(var i:uint = 0; i &lt; records.length; i++) {
    trace(records[i].name + ", " + records[i].city);
}
// Results:
// bob, omaha
// john, kansas city
// john, omaha

trace("records.sortOn('city', 'name');");
records.sortOn(["city", "name"]);
for(var i:uint = 0; i &lt; records.length; i++) {
    trace(records[i].name + ", " + records[i].city);
}
// Results:
// john, kansas city
// bob, omaha
// john, omaha
</codeblock></example><example conref="examples\Array.sortOn.3.as"> The following code creates an empty Array object <codeph>users</codeph> and the
 array is then populated using four calls to <codeph>push()</codeph>.  Each time <codeph>push()</codeph> is
 called, a User object is created with the <codeph>User()</codeph> constructor and a <codeph>name</codeph>
 string and <codeph>age</codeph> uint are added to users.  The resulting array set is
 <codeph>[Bob:3,barb:35,abcd:3,catchy:4]</codeph>.
 <p>The array is then sorted in the following ways:
 <ol>
   <li>By name only, producing the array <codeph>[Bob:3,abcd:3,barb:35,catchy:4]</codeph></li>
   <li>By name and using the <codeph>CASEINSENSITIVE</codeph> constant,
     producing the array <codeph>[abcd:3,barb:35,Bob:3,catchy:4]</codeph></li>
   <li>By name and using the <codeph>CASEINSENSITIVE</codeph> and <codeph>DESCENDING</codeph> constants,
     producing the array <codeph>[catchy:4,Bob:3,barb:35,abcd:3]</codeph></li>
   <li>By age only, producing the array <codeph>[abcd:3,Bob:3,barb:35,catchy:4]</codeph></li>
   <li>By age and using the <codeph>NUMERIC</codeph> constant,
     producing the array <codeph>[Bob:3,abcd:3,catchy:4,barb:35]</codeph></li>
   <li>By age and using the <codeph>DESCENDING</codeph> and <codeph>NUMERIC</codeph> constants,
     producing the array <codeph>[barb:35,catchy:4,Bob:3,abcd:3]</codeph></li>
 </ol>
 </p>
 <p>An array called <codeph>indices</codeph> is then created and assigned the results of a sort
 by age and using the <codeph>NUMERIC</codeph> and <codeph>RETURNINDEXEDARRAY</codeph> constants,
 resulting in the array <codeph>[Bob:3,abcd:3,catchy:4,barb:35]</codeph>, which is then printed out
 using a <codeph>for</codeph> loop.</p>
<codeblock>

class User {
    public var name:String;
    public var age:Number;
    public function User(name:String, age:uint) {
        this.name = name;
        this.age = age;
    }

    public function toString():String {
        return this.name + ":" + this.age;
    }
}

var users:Array = new Array();
users.push(new User("Bob", 3));
users.push(new User("barb", 35));
users.push(new User("abcd", 3));
users.push(new User("catchy", 4));

trace(users); // Bob:3,barb:35,abcd:3,catchy:4

users.sortOn("name");
trace(users); // Bob:3,abcd:3,barb:35,catchy:4

users.sortOn("name", Array.CASEINSENSITIVE);
trace(users); // abcd:3,barb:35,Bob:3,catchy:4

users.sortOn("name", Array.CASEINSENSITIVE | Array.DESCENDING);
trace(users); // catchy:4,Bob:3,barb:35,abcd:3

users.sortOn("age");
trace(users); // abcd:3,Bob:3,barb:35,catchy:4

users.sortOn("age", Array.NUMERIC);
trace(users); // Bob:3,abcd:3,catchy:4,barb:35

users.sortOn("age", Array.DESCENDING | Array.NUMERIC);
trace(users); // barb:35,catchy:4,Bob:3,abcd:3

var indices:Array = users.sortOn("age", Array.NUMERIC | Array.RETURNINDEXEDARRAY);
var index:uint;
for(var i:uint = 0; i &lt; indices.length; i++) {
    index = indices[i];
    trace(users[index].name, ": " + users[index].age);
}

// Results:
// Bob : 3
// abcd : 3
// catchy : 4
// barb : 35
</codeblock></example></apiOperationDetail><related-links><link href="operators.html#bitwise_OR"><linktext>| (bitwise OR)</linktext></link><link href="#Array/sort()"><linktext>Array.sort()</linktext></link></related-links></apiOperation><apiOperation id="Array:AS3:splice"><apiName>splice</apiName><shortdesc>
	 Adds elements to and removes elements from an array.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>array.splice, splice
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An array containing the elements that were removed from the original array.
	 
	 </apiDesc><apiOperationClassifier>Array</apiOperationClassifier></apiReturn><apiParam><apiItemName>startIndex</apiItemName><apiOperationClassifier>int</apiOperationClassifier><apiDesc>An integer that specifies the index of the element in the array where the insertion or 
	 deletion begins. You can use a negative integer to specify a position relative to the end of the array
	 (for example, -1 is the last element of the array).
	 </apiDesc></apiParam><apiParam><apiItemName>deleteCount</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiDesc>An integer that specifies the number of elements to be deleted. This number includes the 
	 element specified in the <codeph>startIndex</codeph> parameter. If you do not specify a value for the 
	 <codeph>deleteCount</codeph> parameter, the method deletes all of the values from the <codeph>startIndex</codeph>
	 element to the last element in the array. If the value is 0, no elements are deleted. 	 
	 </apiDesc></apiParam><apiParam><apiItemName>values</apiItemName><apiType value="restParam"/><apiDesc>An optional list of one or more comma-separated values
	 to insert into the array at the position specified in the <codeph>startIndex</codeph> parameter.
	 If an inserted value is of type Array, the array is kept intact and inserted as a single element.
	 For example, if you splice an existing array of length three with another array of length three,
	 the resulting array will have only four elements. One of the elements, however, will be an array of length three.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Adds elements to and removes elements from an array. This method modifies the array without 
	 making a copy.
	 <p><b>Note:</b> To override this method in a subclass of Array, use <codeph>...args</codeph> for the parameters,
	 as this example shows:</p>
	 <pre>
	 public override function splice(...args) {
	   // your statements here
	 }
	 </pre>
	 </apiDesc><example conref="examples\Array.splice.1.as"> The following code creates the Array object <codeph>vegetables</codeph> with the elements
 <codeph>[spinach, green pepper, cilantro, onion, avocado]</codeph>. The <codeph>splice()</codeph>
 method is then called with the parameters 2 and 2, which assigns
 <codeph>cilantro</codeph> and <codeph>onion</codeph> to the <codeph>spliced</codeph> array. The
 <codeph>vegetables</codeph> array then contains <codeph>[spinach,green pepper,avocado]</codeph>. The
 <codeph>splice()</codeph> method is called a second time using the parameters 1, 0,
 and the <codeph>spliced</codeph> array to assign
 <codeph>[cilantro,onion]</codeph> as the second element in <codeph>vegetables</codeph>.
<codeblock>

var vegetables:Array = new Array("spinach",
                 "green pepper",
                 "cilantro",
                 "onion",
                 "avocado");

var spliced:Array = vegetables.splice(2, 2);
trace(vegetables); // spinach,green pepper,avocado
trace(spliced);    // cilantro,onion

vegetables.splice(1, 0, spliced);
trace(vegetables); // spinach,cilantro,onion,green pepper,avocado

</codeblock></example><example conref="examples\Array.splice.2.as"> Notice that <codeph>cilantro</codeph> and <codeph>onion</codeph> trace out as if <codeph>vegetables</codeph>
 has 5 elements, even though it actually has four (and the second element is another array containing
 two elements). To add <codeph>cilantro</codeph> and <codeph>onion</codeph> individually, you would use:
<codeblock>
 
var vegetables:Array = new Array("spinach",
                 "green pepper",
                 "cilantro",
                 "onion",
                 "avocado");
 
 var spliced:Array = vegetables.splice(2, 2);
 trace(vegetables); // spinach,green pepper,avocado
 trace(spliced);    // cilantro,onion
 
 vegetables.splice(1, 0, "cilantro", "onion");
 trace(vegetables); // spinach,cilantro,onion,green pepper,avocado
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Array:toLocaleString"><apiName>toLocaleString</apiName><shortdesc>
     Returns a string that represents the elements in the specified array.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>A string of array elements.
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
     Returns a string that represents the elements in the specified array. Every element in the array, 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 <codeph>Array.toString()</codeph> method.
   	 
     
	 </apiDesc></apiOperationDetail><related-links><link href="#Array/toString()"><linktext>Array.toString()</linktext></link></related-links></apiOperation><apiOperation id="Array:toString"><apiName>toString</apiName><shortdesc>
	 Returns a string that represents the elements in the specified array.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>array.toString, toString
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>A string of array elements.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns a string that represents the elements in the specified array. Every element in the array, 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 <codeph>Array.join()</codeph> method.
   	 
	 
	 </apiDesc><example conref="examples\Array.toString.1.as"> The following code creates an Array, converts the values to strings, and stores them in
 the <codeph>vegnums</codeph> variable of the String data type.

<codeblock>

var vegetables:Array = new Array();
vegetables.push(1);
vegetables.push(2);
vegetables.push(3);
vegetables.push(4);
vegetables.push(5);
var vegnums:String = vegetables.toString();
trace(vegnums+",6");
// 1,2,3,4,5,6
</codeblock></example></apiOperationDetail><related-links><link href="#String/split()"><linktext>String.split()</linktext></link><link href="#Array/join()"><linktext>Array.join()</linktext></link></related-links></apiOperation><apiOperation id="Array:AS3:unshift"><apiName>unshift</apiName><shortdesc>
     Adds one or more elements to the beginning of an array and returns the new length of the array.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>array.unshift, unshift
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An integer representing the new length of the array.
	 
	 </apiDesc><apiOperationClassifier>uint</apiOperationClassifier></apiReturn><apiParam><apiItemName>args</apiItemName><apiType value="restParam"/><apiDesc>One or more numbers, elements, or variables to be inserted at the beginning of the array.  
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
     Adds one or more elements to the beginning of an array and returns the new length of the array. The other
     elements in the array are moved from their original position, i, to i+1.
	 
	 </apiDesc><example conref="examples\Array.unshift.1.as"> The following code creates the empty Array object <codeph>names</codeph>.
 The strings <codeph>Bill</codeph> and <codeph>Jeff</codeph> are added by the <codeph>push()</codeph> method,
 and then the strings <codeph>Alfred</codeph> and <codeph>Kyle</codeph> are added to the beginning of
 <codeph>names</codeph> by two calls to the <codeph>unshift()</codeph> method.
<codeblock>

var names:Array = new Array();
names.push("Bill");
names.push("Jeff");

trace(names); // Bill,Jeff

names.unshift("Alfred");
names.unshift("Kyle");

trace(names); // Kyle,Alfred,Bill,Jeff
</codeblock></example></apiOperationDetail><related-links><link href="#Array/pop()"><linktext>Array.pop()</linktext></link><link href="#Array/push()"><linktext>Array.push()</linktext></link><link href="#Array/shift()"><linktext>Array.shift()</linktext></link></related-links></apiOperation><apiValue id="Array:CASEINSENSITIVE"><apiName>CASEINSENSITIVE</apiName><shortdesc>
     Specifies case-insensitive sorting for the Array class sorting methods.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><helpid>x217F6
	  
	  </helpid></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>1</apiData><apiValueClassifier>uint</apiValueClassifier></apiValueDef><apiDesc>
     Specifies case-insensitive sorting for the Array class sorting methods. You can use this constant
	 for the <codeph>options</codeph> parameter in the <codeph>sort()</codeph> or <codeph>sortOn()</codeph> method. 
	 <p>The value of this constant is 1.</p>
     </apiDesc></apiValueDetail><related-links><link href="#Array/sort()"><linktext>Array.sort()</linktext></link><link href="#Array/sortOn()"><linktext>Array.sortOn()</linktext></link></related-links></apiValue><apiValue id="Array:DESCENDING"><apiName>DESCENDING</apiName><shortdesc>
     Specifies descending sorting for the Array class sorting methods.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><helpid>x217F7
	  
	  </helpid></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>2</apiData><apiValueClassifier>uint</apiValueClassifier></apiValueDef><apiDesc>
     Specifies descending sorting for the Array class sorting methods. 
 	 You can use this constant for the <codeph>options</codeph> parameter in the <codeph>sort()</codeph>
 	 or <codeph>sortOn()</codeph> method. 
 	 <p>The value of this constant is 2.</p>
	 
     </apiDesc></apiValueDetail><related-links><link href="#Array/sort()"><linktext>Array.sort()</linktext></link><link href="#Array/sortOn()"><linktext>Array.sortOn()</linktext></link></related-links></apiValue><apiValue id="Array:NUMERIC"><apiName>NUMERIC</apiName><shortdesc>
     Specifies numeric (instead of character-string) sorting for the Array class sorting methods.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><helpid>x217F8
	  
	  </helpid></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>16</apiData><apiValueClassifier>uint</apiValueClassifier></apiValueDef><apiDesc>
     Specifies numeric (instead of character-string) sorting for the Array class sorting methods. 
     Including this constant in the <codeph>options</codeph>
 	 parameter causes the <codeph>sort()</codeph> and <codeph>sortOn()</codeph> methods 
 	 to sort numbers as numeric values, not as strings of numeric characters.  
     Without the <codeph>NUMERIC</codeph> constant, sorting treats each array element as a 
 	 character string and produces the results in Unicode order. 
 	 
     <p>For example, given the array of values <codeph>[2005, 7, 35]</codeph>, if the <codeph>NUMERIC</codeph> 
 	 constant is <b>not</b> included in the <codeph>options</codeph> parameter, the 
     sorted array is <codeph>[2005, 35, 7]</codeph>, but if the <codeph>NUMERIC</codeph> constant <b>is</b> included, 
     the sorted array is <codeph>[7, 35, 2005]</codeph>. </p>
 	 
 	 <p>This constant applies only to numbers in the array; it does 
     not apply to strings that contain numeric data such as <codeph>["23", "5"]</codeph>.</p>
 	 
 	 <p>The value of this constant is 16.</p>
     
     </apiDesc></apiValueDetail><related-links><link href="#Array/sort()"><linktext>Array.sort()</linktext></link><link href="#Array/sortOn()"><linktext>Array.sortOn()</linktext></link></related-links></apiValue><apiValue id="Array:RETURNINDEXEDARRAY"><apiName>RETURNINDEXEDARRAY</apiName><shortdesc>
	 Specifies that a sort returns an array that consists of array indices.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><helpid>x217F9
	  
	  </helpid></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>8</apiData><apiValueClassifier>uint</apiValueClassifier></apiValueDef><apiDesc>
	 Specifies that a sort returns an array that consists of array indices. You can use this constant
 	 for the <codeph>options</codeph> parameter in the <codeph>sort()</codeph> or <codeph>sortOn()</codeph> 
 	 method, so you have access to multiple views of the array elements while the original array is unmodified. 
 	 <p>The value of this constant is 8.</p>
     
     </apiDesc></apiValueDetail><related-links><link href="#Array/sort()"><linktext>Array.sort()</linktext></link><link href="#Array/sortOn()"><linktext>Array.sortOn()</linktext></link></related-links></apiValue><apiValue id="Array:UNIQUESORT"><apiName>UNIQUESORT</apiName><shortdesc>
     Specifies the unique sorting requirement for the Array class sorting methods.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><helpid>x217FA
	  
	  </helpid></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>4</apiData><apiValueClassifier>uint</apiValueClassifier></apiValueDef><apiDesc>
     Specifies the unique sorting requirement for the Array class sorting methods. 
     You can use this constant for the <codeph>options</codeph> parameter in the <codeph>sort()</codeph> or <codeph>sortOn()</codeph> 
	 method. The unique sorting option terminates the sort if any two elements
	 or fields being sorted have identical values. 
	 <p>The value of this constant is 4.</p>
     
     </apiDesc></apiValueDetail><related-links><link href="#Array/sort()"><linktext>Array.sort()</linktext></link><link href="#Array/sortOn()"><linktext>Array.sortOn()</linktext></link></related-links></apiValue><apiValue id="Array:length:get"><apiName>length</apiName><shortdesc>
	 A non-negative integer specifying the number of elements in the array.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>array.length, length
	  
	  </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>uint</apiValueClassifier></apiValueDef><apiDesc>
	 A non-negative integer specifying the number of elements in the array. This property is automatically updated when new elements are added to the array. When you assign a value to an array element (for example, <codeph>my_array[index] = value</codeph>), if <codeph>index</codeph> is a number, and <codeph>index+1</codeph> is greater than the <codeph>length</codeph> property, the <codeph>length</codeph> property is updated to <codeph>index+1</codeph>.
   	 <p><b>Note: </b>If you assign a value to the <codeph>length</codeph> property that is shorter than the existing length, the array will be truncated.</p>
   	 
	 </apiDesc><example conref="examples\Array.length.1.as"> The following code creates an Array object <codeph>names</codeph> with the string element <codeph>Bill</codeph>.
 It then uses the <codeph>push()</codeph> method to add another string element <codeph>Kyle</codeph>.  The length of the array, as
 determined by the <codeph>length</codeph> property, was one element before the use of <codeph>push()</codeph> and is two
 elements after <codeph>push()</codeph> is called.  Another string, <codeph>Jeff</codeph>,
 is added to make the length of <codeph>names</codeph> three elements.  The <codeph>shift()</codeph> method is then called twice
 to remove <codeph>Bill</codeph> and <codeph>Kyle</codeph>, making the final array of <codeph>length</codeph> one.
<codeblock>

var names:Array = new Array("Bill");
names.push("Kyle");
trace(names.length); // 2

names.push("Jeff");
trace(names.length); // 3

names.shift();
names.shift();
trace(names.length); // 1
</codeblock></example></apiValueDetail></apiValue></apiClassifier><apiClassifier id="globalClassifier:RegExp"><apiName>RegExp</apiName><shortdesc>
     
     The RegExp class lets you work with regular expressions, which are patterns that you can use 
     to perform searches in strings and to replace text in strings.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>RegExp
     </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
     
     The RegExp class lets you work with regular expressions, which are patterns that you can use 
     to perform searches in strings and to replace text in strings.
     
     <p>You can create a new RegExp object by using the <codeph>new RegExp()</codeph> constructor or by
     assigning a RegExp literal to a variable:</p>
     
     <codeblock> var pattern1:RegExp = new RegExp("test-\\d", "i");
     var pattern2:RegExp = /test-\d/i;
     </codeblock>
     
     <p>For more information, see "Using Regular Expressions" in <i>Programming 
     ActionScript 3.0</i>.</p>
     
     </apiDesc><example conref="examples\RegExpExample.as"> The following example shows how you can use regular expressions to parse
 strings and return a new string or a Boolean value, based on the string passed in.  The 
 <codeph>informalizeGreeting()</codeph> method simply replaces the word <codeph>Hello</codeph> with <codeph>Hi</codeph>, 
 regardless of case.  It also strips out the surname in the name in the string 
 (assuming that name matches the specified pattern). In the <codeph>validateEmail()</codeph> and 
 <codeph>validatePhoneNumber()</codeph> methods, the string passed is checked to see if its pattern matches a valid 
 email address or a specific phone number pattern, and the methods return Boolean values based on the results. 
<codeblock>
package {
    import flash.display.Sprite;

    public class RegExpExample extends Sprite {        
        public function RegExpExample() {            
            var formalGreeting:String = "Hello, John Smith.";
            trace(informalizeGreeting(formalGreeting));    // Hi, John.

            var validEmail:String = "name@domain.com";
            trace(validateEmail(validEmail));        // true
            
            var invalidEmail:String = "foo";
            trace(validateEmail(invalidEmail));  // false
            
            var validPhoneNumber:String = "415-555-1212";
            trace(validatePhoneNumber(validPhoneNumber));    // true
            
            var invalidPhoneNumber:String = "312-867-530999";
            trace(validatePhoneNumber(invalidPhoneNumber));  // false
        }
        private function informalizeGreeting(str:String):String {
            var pattern:RegExp = new RegExp("hello, (\\w+) \\w+", "i");
            return str.replace(pattern, "Hi, $1");
        }
        private function validateEmail(str:String):Boolean {
            var pattern:RegExp = /(\w|[_.\-])+@((\w|-)+\.)+\w{2,4}+/;
            var result:Object = pattern.exec(str);
            if(result == null) {
                return false;
            }
            return true;
        }
        private function validatePhoneNumber(str:String):Boolean {
            var pattern:RegExp = /^\d{3}-\d{3}-\d{4}$/;
            var result:Object = pattern.exec(str);
            if(result == null) {
                return false;
            }
            return true;
        }
    }
}
</codeblock></example></apiClassifierDetail><related-links><link href="#String/match()"><linktext>String.match()</linktext></link><link href="#String/replace()"><linktext>String.replace()</linktext></link><link href="#String/search()"><linktext>String.search()</linktext></link></related-links><apiConstructor id="RegExp:RegExp"><apiName>RegExp</apiName><shortdesc>
        Lets you construct a regular expression from two strings.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>RegExp, RegExp.attribute, attribute
        </keyword></asCustoms></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>re</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The pattern of the regular expression (also known as the <i>constructor string</i>). This is the 
        main part  of the regular expression (the part that goes within the "/" characters). 
        
        <p><b>Notes:</b> </p>
        
        <ul>
        
        <li>Do not include the starting and trailing "/" characters; use these only when defining a regular expression
        literal without using the constructor. For example, the following two regular expressions are equivalent:
        
        <codeblock> var re1:RegExp = new RegExp("bob", "i"); 
        var re2:RegExp = /bob/i;</codeblock>
        
        </li>
        
        <li>In a regular expression that is defined with the <codeph>RegExp()</codeph> constructor method, to use a 
        metasequence that begins with the backslash (\) character, such as <codeph>\d</codeph> (which matches any digit), 
        type the backslash character twice. For example, the following two regular expressions are equivalent:
        
        <codeblock> var re1:RegExp = new RegExp("\\d+", ""); 
        var re2:RegExp = /\d/;</codeblock>
        
        <p>In the first expression, you must type the backlash character twice in this case, because the first parameter of the <codeph>RegExp() </codeph>
        constructor method is a string, and in a string literal you must type a backslash character twice to have it 
        recognized as a single  backslash character.</p>
        
        </li>
        
        </ul>
        
        </apiDesc></apiParam><apiParam><apiItemName>flags</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The modifiers of the regular expression. These can include the following:
        
        <ul>
        
           <li> <codeph>g</codeph>  When using the <codeph>replace()</codeph> method of the String class, 
          specify this modifier to replace all matches, rather than only the first one. 
          This modifier corresponds to the <codeph>global</codeph> property of the RegExp instance.</li>
           <li> <codeph>i</codeph>  The regular expression is evaluated <i>without</i> case 
          sensitivity. This modifier corresponds to the <codeph>ignoreCase</codeph> property of the RegExp instance.</li>
           <li> <codeph>s</codeph>  The dot (<codeph>.</codeph>) character matches new-line characters. Note 
              This modifier corresponds to the <codeph>dotall</codeph> property of the RegExp instance.</li>
           <li> <codeph>m</codeph>  The caret (<codeph>^</codeph>) character and dollar sign (<codeph>$</codeph>) match 
          before <i>and</i> after new-line characters. This modifier corresponds to the 
          <codeph>multiline</codeph> property of the RegExp instance.</li>
           <li> <codeph>x</codeph>  White space characters in the <codeph>re</codeph> string are ignored, 
          so that you can write more readable constructors. This modifier corresponds to the
              <codeph>extended</codeph> property of the RegExp instance.</li>
        
        </ul>
        
        <p>All other characters in the <codeph>flags</codeph> string are ignored. </p>
        
        </apiDesc></apiParam></apiConstructorDef><apiDesc>
        Lets you construct a regular expression from two strings. One string defines the pattern of the
        regular expression, and the other defines the flags used in the regular expression. 
        
        </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="RegExp:AS3:exec"><apiName>exec</apiName><shortdesc>
         Performs a search for the regular expression on the given string str.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>RegExp, RegExp.exec, exec
         </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>If there is no match, <codeph>null</codeph>; otherwise, an object with the following properties: 
         
         <ul>
         
          <li>An array, in which element 0 contains the complete matching substring, and  
         other elements of the array (1 through <i>n</i>) contain substrings that match parenthetical groups  
         in the regular expression </li>
         
          <li><codeph>index</codeph>  The character position of the matched substring within 
              the string</li>
         
          <li><codeph>input</codeph>  The string (<codeph>str</codeph>)</li>
         
         </ul>
         
         
         </apiDesc><apiOperationClassifier>Object</apiOperationClassifier></apiReturn><apiParam><apiItemName>str</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The string to search.  
         
         </apiDesc></apiParam></apiOperationDef><apiDesc>
         Performs a search for the regular expression on the given string <codeph>str</codeph>. 
         
         <p>If the <codeph>g</codeph> (<codeph>global</codeph>) flag is <i>not</i> set for the regular 
         expression, then the search starts 
         at the beginning of the string (at index position 0); the search ignores
         the <codeph>lastIndex</codeph> property of the regular expression.</p>
         
         <p>If the <codeph>g</codeph> (<codeph>global</codeph>) flag <i>is</i> set for the regular 
         expression, then the search starts 
         at the index position specified by the <codeph>lastIndex</codeph> property of the regular expression. 
         If the search matches a substring, the <codeph>lastIndex</codeph> property changes to match the position 
         of the end of the match. </p>
         
         </apiDesc><example>When the <codeph>g</codeph> (<codeph>global</codeph>) flag is <i>not</i> set in the regular expression, then you can 
         use <codeph>exec()</codeph> to find the first match in the string: 
         
         <codeblock>
         var myPattern:RegExp = /(\w~~)sh(\w~~)/ig;   
         var str:String = "She sells seashells by the seashore";
         var result:Object = myPattern.exec(str);
         trace(result);
         </codeblock>
         
         <p> The <codeph>result</codeph> object is set to the following:</p>
         
         <ul>
         
          <li> <codeph>result[0]</codeph> is set to <codeph>"She"</codeph> (the complete
              match). </li>
         
          <li> <codeph>result[1]</codeph> is set to an empty string (the first matching  
              parenthetical group). </li>
         
          <li> <codeph>result[2]</codeph> is set to <codeph>"e"</codeph> (the second matching  
              parenthetical group). </li>
         
          <li> <codeph>result.index</codeph> is set to 0.</li>
         
          <li> <codeph>result.input</codeph> is set to the input string: <codeph>"She sells seashells 
          by the seashore"</codeph>.</li>
         
         </ul> 
         
         
         
         <p> In the following example, the <codeph>g</codeph> (<codeph>global</codeph>) flag <i>is</i> set in the regular 
         expression, so you can use <codeph>exec()</codeph> repeatedly to find multiple matches:</p>
         
         <codeblock>
         var myPattern:RegExp = /(\w~~)sh(\w~~)/ig;  
         var str:String = "She sells seashells by the seashore";
         var result:Object = myPattern.exec(str);
         
         while (result != null) {
             trace ( result.index, "\t", result);
             result = myPattern.exec(str);
         }
         </codeblock>
         
         <p> This code results in the following output:</p>
         
         <pre><codeph>
            0      She,,e
            10     seashells,sea,ells
            27     seashore,sea,ore
         </codeph></pre>
         
         </example></apiOperationDetail><related-links><link href="#String/match()"><linktext>String.match()</linktext></link><link href="#String/search()"><linktext>String.search()</linktext></link></related-links></apiOperation><apiOperation id="RegExp:AS3:test"><apiName>test</apiName><shortdesc>
         Tests for the match of the regular expression in the given string str.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>RegExp, RegExp.test, test
          
          </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>If there is a match, <codeph>true</codeph>; otherwise, <codeph>false</codeph>.
         
         </apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn><apiParam><apiItemName>str</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The string to test.
         
         </apiDesc></apiParam></apiOperationDef><apiDesc>
         Tests for the match of the regular expression in the given string <codeph>str</codeph>. 
         
         <p>If the <codeph>g</codeph> (<codeph>global</codeph>) flag is <i>not</i> set for the regular expression, 
         then the search starts at the beginning of the string (at index position 0); the search ignores
         the <codeph>lastIndex</codeph> property of the regular expression.</p>
         
         <p>If the <codeph>g</codeph> (<codeph>global</codeph>) flag <i>is</i> set for the regular expression, then the search starts 
         at the index position specified by the <codeph>lastIndex</codeph> property of the regular expression. 
         If the search matches a substring, the <codeph>lastIndex</codeph> property changes to match the 
         position of the end of the match. </p>
         
         </apiDesc><example conref="examples\RegExp.test.1.as"> The following example shows the use of the <codeph>test()</codeph> method on a regular
 expression in which the <codeph>g</codeph> (<codeph>global</codeph>) flag is set: 
<codeblock>
var re1:RegExp = /\w/g;
var str:String = "a b c";
trace (re1.lastIndex); // 0
trace (re1.test(str)); // true
trace (re1.lastIndex); // 1
trace (re1.test(str)); // true
trace (re1.lastIndex); // 3
trace (re1.test(str)); // true
trace (re1.lastIndex); // 5
trace (re1.test(str)); // false
</codeblock></example></apiOperationDetail></apiOperation><apiValue id="RegExp:dotall:get"><apiName>dotall</apiName><shortdesc>
         Specifies whether the dot character (.) in a regular expression pattern matches 
         new-line characters.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>RegExp, RegExp.dotall, dotall
          
          </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>Boolean</apiValueClassifier></apiValueDef><apiDesc>
         Specifies whether the dot character (.) in a regular expression pattern matches 
         new-line characters. Use the <codeph>s</codeph> flag when constructing 
         a regular expression to set <codeph>dotall = true</codeph>.
         
         </apiDesc><example conref="examples\RegExp.dotall.1.as"> The following example shows the effect of the <codeph>s</codeph> (<codeph>dotall</codeph>) 
 flag on a regular expression: 
<codeblock>
var str:String = "&lt;p&gt;Hello\n"
        + "again&lt;/p&gt;"
        + "&lt;p&gt;Hello&lt;/p&gt;";

var pattern:RegExp = /&lt;p&gt;.*?&lt;\/p&gt;/;
trace(pattern.dotall) // false
trace(pattern.exec(str)); // &lt;p&gt;Hello&lt;/p&gt;

pattern = /&lt;p&gt;.*?&lt;\/p&gt;/s;
trace(pattern.dotall) // true
trace(pattern.exec(str)); 
   </codeblock></example></apiValueDetail></apiValue><apiValue id="RegExp:extended:get"><apiName>extended</apiName><shortdesc>
         Specifies whether to use extended mode for the regular expression.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>RegExp, RegExp.extended, extended
          
          </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>Boolean</apiValueClassifier></apiValueDef><apiDesc>
         Specifies whether to use extended mode for the regular expression. 
         When a RegExp object is in extended mode, white space characters in the constructor  
         string are ignored. This is done to allow more readable constructors.
         
         <p>Use the <codeph>x</codeph> flag when constructing a regular expression to set 
         <codeph>extended = true</codeph>. </p>
         
         </apiDesc><example conref="examples\RegExp.extended.1.as"> The following example shows different ways to construct the same regular
 expression. In each, the regular expression is to match a phone number pattern of 
 xxx-xxx-xxxx or (xxx) xxx-xxxx or (xxx)xxx-xxxx.
 The second regular expression uses the <codeph>x</codeph> flag, causing the white spaces in  
 the string to be ignored. 
<codeblock>
var rePhonePattern1:RegExp = /\d{3}-\d{3}-\d{4}|\(\d{3}\)\s?\d{3}-\d{4}/; 
var str:String = "The phone number is (415)555-1212.";

trace(rePhonePattern1.extended) // false
trace(rePhonePattern1.exec(str)); // (415)555-1212

var rePhonePattern2:RegExp = / \d{3}-\d{3}-\d{4}  |   \( \d{3} \) \ ? \d{3}-\d{4}  /x; 
trace(rePhonePattern2.extended) // true
trace(rePhonePattern2.exec(str)); // (415)555-1212
</codeblock></example></apiValueDetail></apiValue><apiValue id="RegExp:global:get"><apiName>global</apiName><shortdesc>
         Specifies whether to use global matching for the regular expression.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>RegExp, RegExp.global, global
          
          </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>Boolean</apiValueClassifier></apiValueDef><apiDesc>
         Specifies whether to use global matching for the regular expression. When 
         <codeph>global == true</codeph>, the <codeph>lastIndex</codeph> property is set after a match is 
         found. The next time a match is requested, the regular expression engine starts from 
         the <codeph>lastIndex</codeph> position in the string. Use the <codeph>g</codeph> flag when 
         constructing a regular expression  to set <codeph>global</codeph> to <codeph>true</codeph>. 
         
         </apiDesc><example conref="examples\RegExp.global.1.as"> The following example shows the effect setting the <codeph>g</codeph> 
 (<codeph>global</codeph>) flag on the <codeph>exec()</codeph> method:
<codeblock>
var pattern:RegExp = /foo\d/; 
var str:String = "foo1 foo2";
trace(pattern.global); // false
trace(pattern.exec(str)); // foo1
trace(pattern.lastIndex); // 0
trace(pattern.exec(str)); // foo1

pattern = /foo\d/g;
trace(pattern.global); // true
trace(pattern.exec(str)); // foo1
trace(pattern.lastIndex); // 4
trace(pattern.exec(str)); // foo2
</codeblock></example></apiValueDetail></apiValue><apiValue id="RegExp:ignoreCase:get"><apiName>ignoreCase</apiName><shortdesc>
         Specifies whether the regular expression ignores case sensitivity.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>RegExp, RegExp.ignoreCase, ignoreCase
         </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>Boolean</apiValueClassifier></apiValueDef><apiDesc>
         Specifies whether the regular expression ignores case sensitivity. Use the 
         <codeph>i</codeph> flag when constructing a regular expression to set 
         <codeph>ignoreCase = true</codeph>. 
         
         </apiDesc><example conref="examples\RegExp.ignoreCase.1.as"> The following example shows the effect of setting the <codeph>i</codeph> 
 (<codeph>ignoreCase</codeph>) flag:
<codeblock>
var pattern:RegExp = /bob/; 
var str:String = "Bob bob";
trace(pattern.ignoreCase); // false
trace(pattern.exec(str)); // bob

pattern = /bob/i;
trace(pattern.ignoreCase); // true
trace(pattern.exec(str)); // Bob
</codeblock></example></apiValueDetail></apiValue><apiValue id="RegExp:lastIndex:get"><apiName>lastIndex</apiName><shortdesc>
         Specifies the index position in the string at which to start the next search.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>RegExp, RegExp.lastIndex, lastIndex
          
          </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
         Specifies the index position in the string at which to start the next search. This property 
         affects the <codeph>exec()</codeph> and <codeph>test()</codeph> methods of the RegExp class. 
         However, the <codeph>match()</codeph>, <codeph>replace()</codeph>, and <codeph>search()</codeph> methods
         of the String class ignore the <codeph>lastIndex</codeph> property and start all searches from
         the beginning of the string.
         
         <p>When the <codeph>exec()</codeph> or <codeph>test()</codeph> method finds a match and the <codeph>g</codeph> 
         (<codeph>global</codeph>) flag is set to <codeph>true</codeph> for the regular expression, the method
         automatically sets the <codeph>lastIndex</codeph> property to the index position of the character 
         <i>after</i> the last character in the matching substring of the last match. If the 
         <codeph>g</codeph> (<codeph>global</codeph>) flag is set to <codeph>false</codeph>, the method does not 
         set the <codeph>lastIndex</codeph>property.</p>
         
         <p>You can set the <codeph>lastIndex</codeph> property to adjust the starting position
         in the string for regular expression matching. </p>
         
         </apiDesc><example conref="examples\RegExp.lastIndex.1.as"> The following example shows the effect of setting the <codeph>lastIndex</codeph>
 property, and it shows how it is updated after a call to the <codeph>exec()</codeph> method on a
 regular expression in which the <codeph>g</codeph> (<codeph>global</codeph>) flag is set:
<codeblock>
var pattern:RegExp = /\w\d/g; 
var str:String = "a1 b2 c3 d4";
pattern.lastIndex = 2; 
trace(pattern.exec(str)); // b2
trace(pattern.lastIndex); // 5
trace(pattern.exec(str)); // c3
trace(pattern.lastIndex); // 8
trace(pattern.exec(str)); // d4
trace(pattern.lastIndex); // 11
trace(pattern.exec(str)); // null
</codeblock></example></apiValueDetail></apiValue><apiValue id="RegExp:multiline:get"><apiName>multiline</apiName><shortdesc>
         Specifies whether the m (multiline) flag is set.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>RegExp, RegExp.multiline, multiline
          
          </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>Boolean</apiValueClassifier></apiValueDef><apiDesc>
         Specifies whether the <codeph>m</codeph> (<codeph>multiline</codeph>) flag is set. If it is set,
         the caret (<codeph>^</codeph>) and dollar sign (<codeph>$</codeph>) in a regular expression 
         match before and after new lines. 
         Use the <codeph>m</codeph> flag when constructing a regular expression to set 
         <codeph>multiline = true</codeph>.
         
         </apiDesc><example conref="examples\RegExp.multiline.1.as"> The following example shows the effect setting the <codeph>m</codeph> (<codeph>multiline</codeph>) flag:
<codeblock>
var pattern:RegExp = /^bob/; 
var str:String = "foo\n"
                + "bob";
trace(pattern.multiline); // false
trace(pattern.exec(str)); // null

pattern = /^bob/m;
trace(pattern.multiline); // true
trace(pattern.exec(str)); // bob
</codeblock></example></apiValueDetail></apiValue><apiValue id="RegExp:source:get"><apiName>source</apiName><shortdesc>
         Specifies the pattern portion of the regular expression.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>RegExp, RegExp.source, source
          
          </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>String</apiValueClassifier></apiValueDef><apiDesc>
         Specifies the pattern portion of the regular expression.
         
         </apiDesc><example conref="examples\RegExp.source.1.as"> The following code outputs the <codeph>source</codeph> parameter for two regular expressions:
<codeblock>
var re1:RegExp = /aabb/gi;
trace (re1.source); // aabb

var re2:RegExp = new RegExp("x+y*", "i");
trace(re2.source); // x+y*
</codeblock></example></apiValueDetail></apiValue></apiClassifier><apiClassifier id="globalClassifier:Date"><apiName>Date</apiName><shortdesc>
 The Date class represents date and time information.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Date object, built-in class, date 
  
  </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/><apiFinal/><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
 The Date class represents date and time information. An instance of the Date class represents a particular point 
 in time for which the properties such as month, day, hours, and seconds can be queried or modified. The Date 
 class lets you retrieve date and time values relative to universal time (Greenwich mean time, now called universal 
 time or UTC) or relative to local time, which is determined by the local time zone setting on the operating system 
 that is running Flash Player. The methods of the Date class are not static but apply only to the individual Date 
 object specified when the method is called. The <codeph>Date.UTC()</codeph> and <codeph>Date.parse()</codeph> methods are 
 exceptions; they are static methods.
 <p product="flash">The Date class handles daylight saving time differently, depending on the operating system and 
 Flash Player version. Flash Player 6 and later versions handle daylight saving time on the following operating 
 systems in these ways:</p>
 <ul product="flash">
 <li>Windows - the Date object automatically adjusts its output for daylight saving time. The Date object detects 
 whether daylight saving time is employed in the current locale, and if so, it detects the standard-to-daylight 
 saving time transition date and times. However, the transition dates currently in effect are applied to dates in 
 the past and the future, so the daylight saving time bias might calculate incorrectly for dates in the past when 
 the locale had different transition dates.</li>
 <li>Mac OS X - the Date object automatically adjusts its output for daylight saving time. The time zone information 
 database in Mac OS X is used to determine whether any date or time in the present or past should have a daylight 
 saving time bias applied.</li>
 <li>Mac OS 9 - the operating system provides only enough information to determine whether the current date and 
 time should have a daylight saving time bias applied. Accordingly, the date object assumes that the current 
 daylight saving time bias applies to all dates and times in the past or future.</li>
 </ul>
 <p product="flash">Flash Player 5 handles daylight saving time on the following operating systems as follows:</p>
 <ul product="flash">
 <li>Windows - the U.S. rules for daylight saving time are always applied, which leads to incorrect transitions 
 in Europe and other areas that employ daylight saving time but have different transition times than the U.S. Flash 
 correctly detects whether daylight saving time is used in the current locale.</li>
 </ul>
 <p>To use the Date class, construct a Date instance using the <codeph>new</codeph> operator.</p>
 <p>ActionScript 3.0 adds several new accessor properties that can be used in place of many Date class methods 
 that access or modify Date instances. ActionScript 3.0 also includes several new variations of the 
 <codeph>toString()</codeph> method that are included for ECMA-262 3rd Edition compliance, including: 
 <codeph>Date.toLocaleString()</codeph>, <codeph>Date.toTimeString()</codeph>, <codeph>Date.toLocaleTimeString()</codeph>, 
 <codeph>Date.toDateString()</codeph>, and <codeph>Date.toLocaleDateString()</codeph>.</p>
 <p>To compute relative time or time elapsed, see the <codeph>getTimer()</codeph> method in the flash.utils package.</p>
 
 </apiDesc><example conref="examples\DateExample.as"> The following example shows various uses of the <codeph>Date()</codeph> constructor to assign the
 following variables:
 <ul>
   <li><codeph>myDate1</codeph> calls <codeph>Date()</codeph> with no parameters, which sets <codeph>myDate1</codeph> to the
     current date and time (according to your current system's date and time). </li>
   <li><codeph>myDate2</codeph> calls <codeph>Date()</codeph> with the <codeph>year</codeph> (<codeph>2000</codeph>), month
     (<codeph>0</codeph> = January), and <codeph>day</codeph> (<codeph>1</codeph>) parameters passed to it.</li>
   <li><codeph>myDate3</codeph> calls <codeph>Date()</codeph> with the <codeph>year</codeph> (<codeph>65</codeph> = 1965),
     <codeph>month</codeph> (<codeph>2</codeph> = March), the <codeph>day</codeph> (<codeph>6</codeph>), the <codeph>hour</codeph>
     (<codeph>9</codeph>), the <codeph>minute</codeph> (<codeph>30</codeph>), the <codeph>second</codeph> (<codeph>15</codeph>)
     and the <codeph>millisecond</codeph>-+ (<codeph>0</codeph>) passed as parameters.</li>
   <li><codeph>myDate4</codeph> calls <codeph>Date()</codeph> with the time value representing the number of milliseconds
     <b>before</b> (since the value is negative) 0:00:00 GMT January 1, 1970.</li>
 </ul>
<codeblock>

package {
    import flash.display.Sprite;
    
    public class DateExample extends Sprite{
        public function DateExample() {
            var myDate1:Date = new Date();
            trace(myDate1); // [NOW]

            var myDate2:Date = new Date(2000, 0, 1);
            trace(myDate2); // Sat Jan 1 00:00:00 GMT-0800 2000

            var myDate3:Date = new Date(65, 2, 6, 9, 30, 15, 0);
            trace(myDate3); // Sat Mar 6 09:30:15 GMT-0800 1965

            var myDate4:Date = new Date(-14159025000);
            trace(myDate4); // Sun Jul 20 19:56:15 GMT-0700 1969
        }        
    }    
}
</codeblock></example></apiClassifierDetail><related-links><link href="flash.utils.xml#/getTimer()"><linktext>flash.utils.getTimer()</linktext></link></related-links><apiConstructor id="Date:Date"><apiName>Date</apiName><shortdesc>
	 Constructs a new Date object that holds the specified date and time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>new Date, constructor, date
	  
	  </keyword></asCustoms></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>yearOrTimevalue</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>If other parameters are specified, this number represents a 
	 year (such as 1965); otherwise, it represents a time value. If the number represents a year, a 
	 value of 0 to 99 indicates 1900 through 1999; otherwise all four digits of the year must be 
	 specified. If the number represents a time value (no other parameters are specified), it is the
	 number of milliseconds before or after 0:00:00 GMT January 1, 1970; a negative values represents  
	 a time <i>before</i> 0:00:00 GMT January 1, 1970, and a positive value represents a time after.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>month</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 (January) to 11 (December).
	 
	 </apiDesc></apiParam><apiParam><apiItemName>date</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>1</apiData><apiDesc>An integer from 1 to 31. 
	 
	 </apiDesc></apiParam><apiParam><apiItemName>hour</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>0</apiData><apiDesc>An integer from 0 (midnight) to 23 (11 p.m.).
	 
	 </apiDesc></apiParam><apiParam><apiItemName>minute</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>0</apiData><apiDesc>An integer from 0 to 59. 
	 
	 </apiDesc></apiParam><apiParam><apiItemName>second</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>0</apiData><apiDesc>An integer from 0 to 59. 
	 
	 </apiDesc></apiParam><apiParam><apiItemName>millisecond</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>0</apiData><apiDesc>An integer from 0 to 999 of milliseconds. 
	 
	 </apiDesc></apiParam></apiConstructorDef><apiDesc>
	 Constructs a new Date object that holds the specified date and time.  
	 
	 <p>The <codeph>Date()</codeph> constructor takes up to seven parameters (year, month,  
	 ..., millisecond) to specify a date and time to the millisecond. The date that
	 the newly constructed Date object contains depends on the number, and data type, of arguments passed. </p>
	 <ul>
	   <li>If you pass no arguments, the Date object is assigned the current date and time.</li>
	   <li>If you pass one argument of data type Number, the Date object is assigned a time value based on the number of milliseconds since January 1, 1970 0:00:000 GMT, as specified by the lone argument.</li>
	   <li>If you pass one argument of data type String, and the string contains a valid date, the Date object  contains a time value based on that date.</li>
	   <li>If you pass two or more arguments, the Date object is assigned a time value based on the argument values passed, which represent the date's year, month, date, hour, minute, second, and milliseconds.</li>
	 </ul>
	 <p>If you pass a string to the Date class constructor, the date can be in a variety of formats, but must at least include the month, date, and year. For example, <codeph>Feb 1 2005</codeph> is valid, but <codeph>Feb 2005</codeph> is not. The following list indicates some of the valid formats:</p>
	 <ul>
	   <li>Day Month Date Hours:Minutes:Seconds GMT Year (for instance, "Tue Feb 1 00:00:00 GMT-0800 2005", which matches <codeph>toString()</codeph>)</li>
	   <li>Day Month Date Year Hours:Minutes:Seconds AM/PM (for instance, "Tue Feb 1 2005 12:00:00 AM", which matches <codeph>toLocaleString()</codeph>)</li>
	   <li>Day Month Date Year (for instance, "Tue Feb 1 2005", which matches <codeph>toDateString()</codeph>)</li>
	   <li>Month/Day/Year (for instance, "02/01/2005")</li>
	   <li>Month/Year (for instance, "02/2005")</li>
	 </ul>
	 </apiDesc></apiConstructorDetail><related-links><link href="#Date/getMonth()"><linktext>getMonth()</linktext></link><link href="#Date/getDate()"><linktext>getDate()</linktext></link><link href="#Date/getFullYear()"><linktext>getFullYear()</linktext></link></related-links></apiConstructor><apiOperation id="Date:UTC"><apiName>UTC</apiName><shortdesc>
	 Returns the number of milliseconds between midnight on January 1, 1970, universal time, 
	 and the time specified in the parameters.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.utc, utc, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>The number of milliseconds since January 1, 1970 and the specified date and time.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>year</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A four-digit integer that represents the year (for example, 2000).
	 
	 </apiDesc></apiParam><apiParam><apiItemName>month</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 (January) to 11 (December).
	 
	 </apiDesc></apiParam><apiParam><apiItemName>date</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>1</apiData><apiDesc>An integer from 1 to 31. 
	 
	 </apiDesc></apiParam><apiParam><apiItemName>hour</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>0</apiData><apiDesc>An integer from 0 (midnight) to 23 (11 p.m.).
	 
	 </apiDesc></apiParam><apiParam><apiItemName>minute</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>0</apiData><apiDesc>An integer from 0 to 59. 
	 
	 </apiDesc></apiParam><apiParam><apiItemName>second</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>0</apiData><apiDesc>An integer from 0 to 59. 
	 
	 </apiDesc></apiParam><apiParam><apiItemName>millisecond</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>0</apiData><apiDesc>An integer from 0 to 999. 
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Returns the number of milliseconds between midnight on January 1, 1970, universal time, 
	 and the time specified in the parameters. This method uses universal time, whereas the 
	 <codeph>Date</codeph> constructor uses local time.
	 <p>This method is useful if you want to pass a UTC date to the Date class constructor.
	 Because the Date class constructor accepts the millisecond offset as an argument, you
	 can use the Date.UTC() method to convert your UTC date into the corresponding millisecond 
	 offset, and send that offset as an argument to the Date class constructor:</p>
	 
	 </apiDesc><example conref="examples\Date.UTC.1.as"> The following example creates a new Date object <codeph>someBirthday</codeph> with parameters
 <codeph>year</codeph> (<codeph>1974</codeph>), <codeph>month</codeph> (<codeph>10</codeph> = November), <codeph>day</codeph>
 (<codeph>30</codeph>), <codeph>hour</codeph> (<codeph>1</codeph>) and <codeph>minute</codeph> (<codeph>20</codeph>) using local
 time.  Then a call to <codeph>UTC()</codeph> within a <codeph>setTime()</codeph> method resets the same parameters
 to universal time.
<codeblock>

var someBirthday:Date = new Date(1974, 10, 30, 15, 20);
trace(someBirthday.toString());

someBirthday.setTime(Date.UTC(1974, 10, 30, 15, 20));
trace(someBirthday.toString());
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:getDate"><apiName>getDate</apiName><shortdesc>
	 Returns the day of the month (an integer from 1 to 31) specified by a Date object
	 according to local time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.getdate, getdate, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The day of the month (1 - 31) a <codeph>Date</codeph> object represents.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the day of the month (an integer from 1 to 31) specified by a <codeph>Date</codeph> object
	 according to local time. Local time is determined by the operating system on which 
	 Flash Player is running.
	 
 	 </apiDesc><example conref="examples\Date.getDate.1.as"> The following example creates a new Date object <codeph>someBirthday</codeph> with parameters
 <codeph>year</codeph> (<codeph>1974</codeph>), <codeph>month</codeph> (<codeph>10</codeph> = November), <codeph>day</codeph>
 (<codeph>30</codeph>), <codeph>hour</codeph> (<codeph>1</codeph>) and <codeph>minute</codeph> (<codeph>20</codeph>).
 The <codeph>getDate()</codeph> method is then called, which retrieves the day of the month.
<codeblock>
package {
    import flash.display.Sprite;

    public class DateExample extends Sprite {

        public function DateExample() {
            var someBirthday:Date = new Date(1974, 10, 30, 1, 20);
            trace(someBirthday);            // Sat Nov 30 01:20:00 GMT-0800 1974
            trace(someBirthday.getDate()); // 30
        }
    }
}
</codeblock></example></apiOperationDetail><related-links><link href="#Date/getMonth()"><linktext>getMonth()</linktext></link><link href="#Date/getFullYear()"><linktext>getFullYear()</linktext></link></related-links></apiOperation><apiOperation id="Date:AS3:getDay"><apiName>getDay</apiName><shortdesc>
	 Returns the day of the week (0 for Sunday, 1 for Monday, and so on) specified by this
	 Date according to local time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.getday, getday, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A numeric version of the day of the week (0 - 6) a <codeph>Date</codeph> object
	 represents.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the day of the week (0 for Sunday, 1 for Monday, and so on) specified by this
	 <codeph>Date</codeph> according to local time. Local time is determined by the operating 
	 system on which Flash Player is running.
	 
 	 </apiDesc><example conref="examples\Date.getDay.1.as"> The following example creates a new Array object <codeph>weekDayLabels</codeph>, with elements
 <codeph>[Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday]</codeph> and a new Date object <codeph>someBirthday</codeph> with parameters
 <codeph>year</codeph> (<codeph>1974</codeph>), <codeph>month</codeph> (<codeph>10</codeph> = November), <codeph>day</codeph>
 (<codeph>30</codeph>), <codeph>hour</codeph> (<codeph>1</codeph>) and <codeph>minute</codeph> (<codeph>20</codeph>).
 The <codeph>getDay()</codeph> method is then called twice, which first shows the day of the month
 as 6 and then shows the day of the week using <codeph>weekDayLabels</codeph>.
<codeblock>

var weekDayLabels:Array = new Array("Sunday",
                    "Monday",
                    "Tuesday",
                    "Wednesday",
                    "Thursday",
                    "Friday",
                    "Saturday");

var someBirthday:Date = new Date(1974, 10, 30, 1, 20);
trace(someBirthday);                       // Sat Nov 30 01:20:00 GMT-0800 1974
trace(someBirthday.getDay());            // 6
trace(weekDayLabels[someBirthday.getDay()]); // Saturday
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:getFullYear"><apiName>getFullYear</apiName><shortdesc>
	 Returns the full year (a four-digit number, such as 2000) of a Date object 
	 according to local time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.getfullyear, getfullyear, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The full year a <codeph>Date</codeph> object represents.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the full year (a four-digit number, such as 2000) of a <codeph>Date</codeph> object 
	 according to local time. Local time is determined by the operating system on which 
	 Flash Player is running.
	 
	 </apiDesc><example conref="examples\Date.getFullYear.1.as"> The following example creates a new Date object <codeph>someBirthday</codeph> with parameters
 <codeph>year</codeph> (<codeph>1974</codeph>), <codeph>month</codeph> (<codeph>10</codeph> = November), <codeph>day</codeph>
 (<codeph>30</codeph>), <codeph>hour</codeph> (<codeph>1</codeph>) and <codeph>minute</codeph> (<codeph>20</codeph>).
 The <codeph>getFullYear()</codeph> method is then called, which retrieves the four-digit year.
<codeblock>

var someBirthday:Date = new Date(1974, 10, 30, 1, 20);
trace(someBirthday);           // Sat Nov 30 01:20:00 GMT-0800 1974
trace(someBirthday.getFullYear()); // 1974
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:getHours"><apiName>getHours</apiName><shortdesc>
	 Returns the hour (an integer from 0 to 23) of the day portion of a Date object
	 according to local time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.gethours, gethours, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The hour (0 - 23) of the day a <codeph>Date</codeph> object represents.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the hour (an integer from 0 to 23) of the day portion of a <codeph>Date</codeph> object
	 according to local time. Local time is determined by the operating system on which 
	 Flash Player is running. 
	 
	 </apiDesc><example conref="examples\Date.getHours.1.as"> The following example creates a new Date object <codeph>someBirthday</codeph> with parameters
 <codeph>year</codeph> (<codeph>1974</codeph>), <codeph>month</codeph> (<codeph>10</codeph> = November), <codeph>day</codeph>
 (<codeph>30</codeph>), <codeph>hour</codeph> (<codeph>1</codeph>) and <codeph>minute</codeph> (<codeph>20</codeph>).
 The <codeph>getHours()</codeph> and <codeph>getMinutes()</codeph> methods are then called, which
 retrieves the hours and the minutes in 24-hour format.  Finally, a string <codeph>localTime</codeph>
 is created and assigned to the result of a call to the function <codeph>getUSClockTime()</codeph>, which, in turn calls
 <codeph>getHours()</codeph> and <codeph>getMinutes()</codeph> again, resulting in the time <codeph>03:05 PM</codeph>.
<codeblock>

var someBirthday:Date = new Date(1974, 10, 30, 15, 5);

trace(someBirthday); // Sat Nov 30 15:20:00 GMT-0800 1974
trace(someBirthday.getHours() + ":" + someBirthday.getMinutes()); // 15:5

var localTime:String = getUSClockTime(someBirthday.getHours(), someBirthday.getMinutes());
trace(localTime);    // 03:05 PM

function getUSClockTime(hrs:uint, mins:uint):String {
    var modifier:String = "PM";
    var minLabel:String = doubleDigitFormat(mins);

    if(hrs &gt; 12) {
        hrs = hrs-12;
    } else if(hrs == 0) {
        modifier = "AM";
        hrs = 12;
    } else if(hrs &lt; 12) {
        modifier = "AM";
    }

    return (doubleDigitFormat(hrs) + ":" + minLabel + " " + modifier);
}

function doubleDigitFormat(num:uint):String {
    if(num &lt; 10) {
        return ("0" + num);
    }
    return num;
}
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:getMilliseconds"><apiName>getMilliseconds</apiName><shortdesc>
	 Returns the milliseconds (an integer from 0 to 999) portion of a Date object
	 according to local time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.getmilliseconds, getmilliseconds, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The milliseconds portion of a <codeph>Date</codeph> object.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the milliseconds (an integer from 0 to 999) portion of a <codeph>Date</codeph> object
	 according to local time. Local time is determined by the operating system on which 
	 Flash Player is running.
	 
	 </apiDesc><example conref="examples\Date.getMilliseconds.1.as"> The following example creates a new Date object <codeph>now</codeph> with no parameters.
 The <codeph>getMilliseconds()</codeph> method is then called, which retrieves the milliseconds of the
 Date object <codeph>now</codeph> at the time it was created.
<codeblock>

var now:Date = new Date();
trace(now.getMilliseconds());
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:getMinutes"><apiName>getMinutes</apiName><shortdesc>
	 Returns the minutes (an integer from 0 to 59) portion of a Date object
	 according to local time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.getminutes, getminutes, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The minutes portion of a <codeph>Date</codeph> object.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the minutes (an integer from 0 to 59) portion of a <codeph>Date</codeph> object
	 according to local time. Local time is determined by the operating system on which 
	 Flash Player is running.
	 
	 </apiDesc><example conref="examples\Date.getMinutes.1.as"> The following example creates a new Date object <codeph>now</codeph> with no parameters.
 The <codeph>getMinutes()</codeph> method is then called, which retrieves the minutes of the
 Date object <codeph>now</codeph> at the time it was created.
<codeblock>

var now:Date = new Date();
trace(now);
trace(now.getMinutes());
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:getMonth"><apiName>getMonth</apiName><shortdesc>
	 Returns the month (0 for January, 1 for February, and so on) portion of this 
	 Date according to local time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.getmonth, getmonth, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The month (0 - 11) portion of a <codeph>Date</codeph> object.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the month (0 for January, 1 for February, and so on) portion of this <codeph>
	 Date</codeph> according to local time. Local time is determined by the operating system 
	 on which Flash Player is running.
	 
	 </apiDesc><example conref="examples\Date.getMonth.1.as"> The following example creates a new Array object <codeph>monthLabels</codeph>, with elements
 <codeph>January</codeph> through <codeph>December</codeph> and a new Date object <codeph>now</codeph> with no parameters.
 The <codeph>getMonth()</codeph> method is then called twice, which first returns the month number and
 then the month name of the month the Date object <codeph>now</codeph> was created.
<codeblock>

var monthLabels:Array = new Array("January",
                  "February",
                  "March",
                  "April",
                  "May",
                  "June",
                  "July",
                  "August",
                  "September",
                  "October",
                  "November",
                  "December");

var now:Date = new Date();
trace(now.getMonth());
trace(monthLabels[now.getMonth()]);
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:getSeconds"><apiName>getSeconds</apiName><shortdesc>
	 Returns the seconds (an integer from 0 to 59) portion of a Date object
	 according to local time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.getseconds, getseconds, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The seconds (0 to 59) portion of a <codeph>Date</codeph> object.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the seconds (an integer from 0 to 59) portion of a <codeph>Date</codeph> object
	 according to local time. Local time is determined by the operating system on which 
	 Flash Player is running.
	 
	 </apiDesc><example conref="examples\Date.getSeconds.1.as"> The following example creates a new  Date object <codeph>now</codeph> with no parameters.
 The <codeph>getSeconds()</codeph> method is then called, which retrieves the seconds of the
 Date object <codeph>now</codeph> at the time it was created.
<codeblock>

var now:Date = new Date();
trace(now.getSeconds());
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:getTime"><apiName>getTime</apiName><shortdesc>
	 Returns the number of milliseconds since midnight January 1, 1970, universal time, 
	 for a Date object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.gettime, gettime, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The number of milliseconds since Jan 1, 1970 that a <codeph>Date</codeph> object represents.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the number of milliseconds since midnight January 1, 1970, universal time, 
	 for a <codeph>Date</codeph> object. Use this method to represent a specific instant in time 
	 when comparing two or more <codeph>Date</codeph> objects.
	 
	 </apiDesc><example conref="examples\Date.getTime.1.as"> The following example creates a new Date object <codeph>mlk</codeph> with parameters
 <codeph>year</codeph> (<codeph>1929</codeph>), <codeph>month</codeph> (<codeph>0</codeph> = January), and 
 <codeph>day</codeph> (<codeph>15</codeph>). The <codeph>getTime()</codeph> method is then called, which 
 retrieves the milliseconds since midnight January 1, 1970, which is negative since the year is 
 set to 1929.
<codeblock>

var mlk:Date = new Date(1929, 0, 15);
trace(mlk);           // Tue Jan 15 00:00:00 GMT-0800 1929
trace(mlk.getTime()); // -1292601600000
</codeblock></example><example conref="examples\Date.getTime.2.as"> The following example creates a new Date object <codeph>now</codeph> with no parameters
 and then uses the following DateMath (created below) class methods to add time to the original Date
 object <codeph>now</codeph> from the time it was created:
 <ul>
   <li><codeph>addSeconds()</codeph>: adds 30 seconds to <codeph>now</codeph>.</li>
   <li><codeph>addMinutes()</codeph>: adds 30 minutes to  <codeph>now</codeph>.</li>
   <li><codeph>addHours()</codeph>: adds 6 hours to the Date object <codeph>now</codeph>.</li>
   <li><codeph>addDays()</codeph>: adds 30 days to the Date object <codeph>now</codeph>.</li>
   <li><codeph>addWeeks()</codeph>: adds 4 weeks to <codeph>now</codeph>.</li>
 </ul>

<codeblock>

var now:Date = new Date();
trace(now);
trace(DateMath.addSeconds(now, 30));
trace(DateMath.addMinutes(now, 30));
trace(DateMath.addHours(now, 6));
trace(DateMath.addDays(now, 30));
trace(DateMath.addWeeks(now, 4));

class DateMath {
    public static function addWeeks(date:Date, weeks:Number):Date {
        return addDays(date, weeks*7);
    }

    public static function addDays(date:Date, days:Number):Date {
        return addHours(date, days*24);
    }

    public static function addHours(date:Date, hrs:Number):Date {
        return addMinutes(date, hrs*60);
    }

    public static function addMinutes(date:Date, mins:Number):Date {
        return addSeconds(date, mins*60);
    }

    public static function addSeconds(date:Date, secs:Number):Date {
        var mSecs:Number = secs * 1000;
        var sum:Number = mSecs + date.getTime();
        return new Date(sum);
    }
}
</codeblock> <b>Note</b>: it's important to use getTime when performing Date arithmetic because it will continue
 to work during leap years and doesn't require a bunch of if logic like following pseudo-code:
 <pre>
 function addMonths(num:Number):void {
     currentMonth = currentMonth + num;
     if(currentMonth &gt; 12) {
         currentYear++;
         currentMonth = currentMonth - 12;
     }
 }
 </pre>
</example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:getTimezoneOffset"><apiName>getTimezoneOffset</apiName><shortdesc>
     Returns the difference, in minutes, between universal 
     time (UTC) and the computer's local time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.gettimezoneoffset, gettimezoneoffset, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The minutes you need to add to the computer's local time value to equal UTC. If
     your computer's time is set later than UTC, the return value will be negative.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
     Returns the difference, in minutes, between universal 
     time (UTC) and the computer's local time. 
	 
	 </apiDesc><example conref="examples\Date.getTimezoneOffset.1.as"> The following example creates a new Date object <codeph>now</codeph> with no parameters.
 The <codeph>getTimezoneOffset()</codeph> method is then called, which retrieves the difference (in minutes) of the
 time <codeph>now</codeph> was created and Universal Time.  The time zone offset is then converted to hours by
 dividing the result by 60.
<codeblock>

var date:Date = new Date();
trace(date.getTimezoneOffset() / 60);
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:getUTCDate"><apiName>getUTCDate</apiName><shortdesc>
	 Returns the day of the month (an integer from 1 to 31) of a Date object, 
	 according to universal time (UTC).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.getutcdate, getutcdate, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The UTC day of the month (1 to 31) that a <codeph>Date</codeph> object represents.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the day of the month (an integer from 1 to 31) of a <codeph>Date</codeph> object, 
	 according to universal time (UTC).
	 
	 </apiDesc><example conref="examples\Date.getUTCDate.1.as"> The following example creates a new Date object <codeph>someBirthday</codeph> with parameters
 <codeph>year</codeph> (<codeph>1974</codeph>), <codeph>month</codeph> (<codeph>10</codeph> = November), <codeph>day</codeph>
 (<codeph>30</codeph>), <codeph>hour</codeph> (<codeph>1</codeph>) and <codeph>minute</codeph> (<codeph>20</codeph>).
 The <codeph>getUTCDate()</codeph> method is then called, which retrieves the day of the month, according to the UTC.
<codeblock>

var someBirthday:Date = new Date(1974, 10, 30, 1, 20);
trace(someBirthday);             // Sat Nov 30 01:20:00 GMT-0800 1974
trace(someBirthday.getUTCDate()); // 30
</codeblock></example></apiOperationDetail><related-links><link href="#Date/getDate()"><linktext>getDate()</linktext></link></related-links></apiOperation><apiOperation id="Date:AS3:getUTCDay"><apiName>getUTCDay</apiName><shortdesc>
	 Returns the day of the week (0 for Sunday, 1 for Monday, and so on) of this Date
	  according to universal time (UTC).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.getutcday, getutcday, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The UTC day of the week (0 to 6) that a <codeph>Date</codeph> object represents.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the day of the week (0 for Sunday, 1 for Monday, and so on) of this <codeph>Date
	 </codeph> according to universal time (UTC).
	 
	 </apiDesc><example conref="examples\Date.getUTCDay.1.as"> The following example creates a new Array object <codeph>weekDayLabels</codeph>, with elements
 <codeph>[Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday]</codeph> and a new Date object <codeph>someBirthday</codeph> with parameters
 <codeph>year</codeph> (<codeph>1974</codeph>), <codeph>month</codeph> (<codeph>10</codeph> = November), <codeph>day</codeph>
 (<codeph>30</codeph>), <codeph>hour</codeph> (<codeph>1</codeph>) and <codeph>minute</codeph> (<codeph>20</codeph>).
 The <codeph>getUTCDay()</codeph> method is then called twice, which first shows the day of the month
 as 6 and then shows the day of the week using <codeph>weekDayLabels</codeph>, according to the UTC.
<codeblock>

var weekDayLabels:Array = new Array("Sunday",
                    "Monday",
                    "Tuesday",
                    "Wednesday",
                    "Thursday",
                    "Friday",
                    "Saturday");

var someBirthday:Date = new Date(1974, 10, 30, 1, 20);
trace(someBirthday);           // Sat Nov 30 01:20:00 GMT-0800 1974
trace(someBirthday.getUTCDay()); // 6
trace(weekDayLabels[someBirthday.getUTCDay()]); // Saturday
</codeblock></example></apiOperationDetail><related-links><link href="#Date/getDay()"><linktext>getDay()</linktext></link></related-links></apiOperation><apiOperation id="Date:AS3:getUTCFullYear"><apiName>getUTCFullYear</apiName><shortdesc>
	 Returns the four-digit year of a Date object according to universal time (UTC).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.getutcfullyear, getutcfullyear, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The UTC four-digit year a <codeph>Date</codeph> object represents.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the four-digit year of a <codeph>Date</codeph> object according to universal time (UTC).
	 
	 </apiDesc><example conref="examples\Date.getUTCFullYear.1.as"> The following example creates a new Date object <codeph>someBirthday</codeph> with parameters
 <codeph>year</codeph> (<codeph>1974</codeph>), <codeph>month</codeph> (<codeph>10</codeph> = November), <codeph>day</codeph>
 (<codeph>30</codeph>), <codeph>hour</codeph> (<codeph>1</codeph>) and <codeph>minute</codeph> (<codeph>20</codeph>).
 The <codeph>getUTCFullYear()</codeph> method is then called, which retrieves the four-digit year, according to the UTC.
<codeblock>

var someBirthday:Date = new Date(1974, 10, 30, 1, 20);
trace(someBirthday);                 // Sat Nov 30 01:20:00 GMT-0800 1974
trace(someBirthday.getUTCFullYear()); // 1974
</codeblock></example></apiOperationDetail><related-links><link href="#Date/getFullYear()"><linktext>getFullYear()</linktext></link></related-links></apiOperation><apiOperation id="Date:AS3:getUTCHours"><apiName>getUTCHours</apiName><shortdesc>
	 Returns the hour (an integer from 0 to 23) of the day of a Date object
	 according to universal time (UTC).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.getutchours, getutchours, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The UTC hour of the day (0 to 23) a <codeph>Date</codeph> object represents.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the hour (an integer from 0 to 23) of the day of a <codeph>Date</codeph> object
	 according to universal time (UTC).
	 
	 </apiDesc><example conref="examples\Date.getUTCHours.1.as"> The following example creates a new Date object <codeph>someBirthday</codeph> with parameters
 <codeph>year</codeph> (<codeph>1974</codeph>), <codeph>month</codeph> (<codeph>10</codeph> = November), <codeph>day</codeph>
 (<codeph>30</codeph>), <codeph>hour</codeph> (<codeph>1</codeph>) and <codeph>minute</codeph> (<codeph>20</codeph>).
 The <codeph>getHours()</codeph> and <codeph>getMinutes()</codeph> methods are then called, which retrieves
 the hours and the minutes in 24-hour format.  Finally, a string <codeph>localTime</codeph> is created and
 assigned to the result of a call to the function <codeph>getUSClockTime()</codeph>, which, in turn calls
 <codeph>getHours()</codeph> and <codeph>getMinutes()</codeph> again, resulting in the time <codeph>03:05 PM</codeph>.
 Lastly, a String variable <codeph>utcTime</codeph> is created in the same manner as <codeph>localTime</codeph>,
 and in this case, the result is the same.
<codeblock>

var someBirthday:Date = new Date(1974, 10, 30, 15, 5);

trace(someBirthday); // Sat Nov 30 15:20:00 GMT-0800 1974
trace(someBirthday.getHours() + ":" + someBirthday.getMinutes()); // 15:5

var localTime:String = getUSClockTime(someBirthday.getHours(), someBirthday.getMinutes());
trace(localTime);    // 03:05 PM

var utcTime:String = getUSClockTime(someBirthday.getUTCHours(), someBirthday.getUTCMinutes());
trace(utcTime);      // 11:05 PM

function getUSClockTime(hrs:uint, mins:uint):String {
    var modifier:String = "PM";
    var minLabel:String = doubleDigitFormat(mins);

    if(hrs &gt; 12) {
        hrs = hrs-12;
    } else if(hrs == 0) {
        modifier = "AM";
        hrs = 12;
    } else if(hrs &lt; 12) {
        modifier = "AM";
    }

    return (doubleDigitFormat(hrs) + ":" + minLabel + " " + modifier);
}

function doubleDigitFormat(num:uint):String {
    if(num &lt; 10) {
        return ("0" + num);
    }
    return num;
}
</codeblock></example></apiOperationDetail><related-links><link href="#Date/getHours()"><linktext>getHours()</linktext></link></related-links></apiOperation><apiOperation id="Date:AS3:getUTCMilliseconds"><apiName>getUTCMilliseconds</apiName><shortdesc>
	  Returns the milliseconds (an integer from 0 to 999) portion of a Date object
	 according to universal time (UTC).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.getutcmilliseconds, getutcmilliseconds, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The UTC milliseconds portion of a <codeph>Date</codeph> object.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	  Returns the milliseconds (an integer from 0 to 999) portion of a <codeph>Date</codeph> object
	 according to universal time (UTC).
	 
	 </apiDesc><example conref="examples\Date.getUTCMilliseconds.1.as"> The following example creates a new Date object <codeph>now</codeph> with no parameters.
 The <codeph>getUTCMilliseconds()</codeph> method is then called, which retrieves the milliseconds of the
 Date object <codeph>now</codeph> at the time it was created, according to the UTC
<codeblock>

var now:Date = new Date();
trace(now.getUTCMilliseconds());
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:getUTCMinutes"><apiName>getUTCMinutes</apiName><shortdesc>
	 Returns the minutes (an integer from 0 to 59) portion of a Date object
	 according to universal time (UTC).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.getutcminutes, getutcminutes, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The UTC minutes portion of a <codeph>Date</codeph> object.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the minutes (an integer from 0 to 59) portion of a <codeph>Date</codeph> object
	 according to universal time (UTC).
	 
	 </apiDesc><example conref="examples\Date.getUTCMinutes.1.as"> The following example creates a new Date object <codeph>now</codeph> with no parameters.
 The <codeph>getUTCMinutes()</codeph> method is then called, which retrieves the minutes of the
 Date object <codeph>now</codeph> at the time it was created, according to the UTC
<codeblock>

var now:Date = new Date();
trace(now.getUTCMinutes());
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:getUTCMonth"><apiName>getUTCMonth</apiName><shortdesc>
	 Returns the month (0 [January] to 11 [December]) portion of a Date object
	 according to universal time (UTC).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.getutcmonth, getutcmonth, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The UTC month portion of a <codeph>Date</codeph> object.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the month (0 [January] to 11 [December]) portion of a <codeph>Date</codeph> object
	 according to universal time (UTC).
	 
	 </apiDesc><example conref="examples\Date.getUTCMonth.1.as"> The following example creates a new Array object <codeph>monthLabels</codeph>, with elements
 <codeph>January</codeph> through <codeph>December</codeph> and a new Date object <codeph>now</codeph> with no parameters.
 The <codeph>getUTCMonth()</codeph> method is then called twice, which first returns the month number and
 then the month name of the month the Date object <codeph>now</codeph> was created, according to the UTC
<codeblock>

var monthLabels:Array = new Array("January",
                  "February",
                  "March",
                  "April",
                  "May",
                  "June",
                  "July",
                  "August",
                  "September",
                  "October",
                  "November",
                  "December");

var now:Date = new Date();
trace(now.getMonth());
trace(now.getUTCMonth());
trace(monthLabels[now.getUTCMonth()]);
</codeblock></example></apiOperationDetail><related-links><link href="#Date/getMonth()"><linktext>getMonth()</linktext></link></related-links></apiOperation><apiOperation id="Date:AS3:getUTCSeconds"><apiName>getUTCSeconds</apiName><shortdesc>
	 Returns the seconds (an integer from 0 to 59) portion of a Date object
	 according to universal time (UTC).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.getutcseconds, getutcseconds, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The UTC seconds portion of a <codeph>Date</codeph> object.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the seconds (an integer from 0 to 59) portion of a <codeph>Date</codeph> object
	 according to universal time (UTC).
	 
	 </apiDesc><example conref="examples\Date.getUTCSeconds.1.as"> The following example creates a new Date object <codeph>now</codeph> with no parameters.
 The <codeph>getUTCSeconds()</codeph> method is then called, which retrieves the seconds of the
 Date object <codeph>now</codeph> at the time it was created, according to the UTC
<codeblock>

var now:Date = new Date();
trace(now.getUTCSeconds());
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:parse"><apiName>parse</apiName><shortdesc>
	 Converts a string representing a date into a number equaling the number of milliseconds 
	 elapsed since January 1, 1970, UTC.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiStatic/><apiReturn><apiDesc>A number representing the milliseconds elapsed since January 1, 1970, UTC.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>date</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>A string representation of a date, which conforms to the format for the output of
     <codeph>Date.toString()</codeph>. The date format for the output of <codeph>Date.toString()</codeph> is: 
     <pre>
     Day Mon DD HH:MM:SS TZD YYYY
     </pre>
     <p>For example: </p>
     <pre>
     Wed Apr 12 15:30:17 GMT-0700 2006
     </pre>
     <p>The Time Zone Designation (TZD) is always in the form <codeph>GMT-HHMM</codeph> or <codeph>UTC-HHMM</codeph> indicating the 
     hour and minute offset relative to Greenwich Mean Time (GMT), which is now also called universal time (UTC).
     The year month and day terms can be separated by a forward slash (<codeph>/</codeph>) or by spaces, but never by a
     dash (<codeph>-</codeph>). Other supported formats include the following (you can include partial representations of these 
     formats; that is, just the month, day, and year):</p>
     <pre>
     MM/DD/YYYY HH:MM:SS TZD
     HH:MM:SS TZD Day Mon/DD/YYYY 
     Mon DD YYYY HH:MM:SS TZD
     Day Mon DD HH:MM:SS TZD YYYY
     Day DD Mon HH:MM:SS TZD YYYY
     Mon/DD/YYYY HH:MM:SS TZD
     YYYY/MM/DD HH:MM:SS TZD
     </pre>
     
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Converts a string representing a date into a number equaling the number of milliseconds 
	 elapsed since January 1, 1970, UTC.
	 
     </apiDesc><example conref="examples\Date.parse.1.as"> The following example assigns a date string to <codeph>dateParsed</codeph> for November 30, 1974.  
 The <codeph>Date.parse()</codeph> method is then called, which converts the date into milliseconds since January 1, 1970.
<codeblock>
var dateParsed:String = "Sat Nov 30 1974";

var milliseconds:Number = Date.parse(dateParsed);
trace(milliseconds); // 155030400000
</codeblock></example></apiOperationDetail><related-links><link href="#Date/toString()"><linktext>Date.toString()</linktext></link></related-links></apiOperation><apiOperation id="Date:AS3:setDate"><apiName>setDate</apiName><shortdesc>
	 Sets the day of the month, according to local time, and returns the new time in 
	 milliseconds.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.setdate, setdate, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The new time, in milliseconds.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>day</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 1 to 31.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Sets the day of the month, according to local time, and returns the new time in 
	 milliseconds. Local time is determined by the operating system on which Flash Player 
	 is running.
	 
	 </apiDesc><example conref="examples\Date.setDate.1.as"> The following example creates a new Date object <codeph>someBirthday</codeph> with parameters
 <codeph>year</codeph> (<codeph>1974</codeph>), <codeph>month</codeph> (<codeph>10</codeph> = November), <codeph>day</codeph>
 (<codeph>30</codeph>), <codeph>hour</codeph> (<codeph>1</codeph>) and <codeph>minute</codeph> (<codeph>20</codeph>).  The
 method <codeph>getDate()</codeph> is then called, which retrieves the day of the month.  Next
 <codeph>setDate()</codeph> is called with the <codeph>day</codeph> parameter set to <codeph>20</codeph> and
 then <codeph>getDate()</codeph> is called again, which retrieves the newly set day of month.
<codeblock>

var someBirthday:Date = new Date(1974, 10, 30, 1, 20);
trace(someBirthday);            // Sat Nov 30 01:20:00 GMT-0800 1974
trace(someBirthday.getDate()); // 30

someBirthday.setDate(20);
trace(someBirthday.getDate()); // 20
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:setFullYear"><apiName>setFullYear</apiName><shortdesc>
	 Sets the year, according to local time, and returns the new time in milliseconds.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.setfullyear, setfullyear, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The new time, in milliseconds.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>year</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A four-digit number specifying a year. Two-digit numbers do not represent 
	 four-digit years; for example, 99 is not the year 1999, but the year 99.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>month</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 (January) to 11 (December). 
	 
	 </apiDesc></apiParam><apiParam><apiItemName>day</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A number from 1 to 31. 
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Sets the year, according to local time, and returns the new time in milliseconds. If 
	 the <codeph>month</codeph> and <codeph>day</codeph> parameters are specified, 
	 they are set to local time. Local time is determined by the operating system on which 
	 Flash Player is running.
	 <p>
	 Calling this method does not modify the other fields of the <codeph>Date</codeph> but 
	 <codeph>Date.getUTCDay()</codeph> and <codeph>Date.getDay()</codeph> can report a new value 
	 if the day of the week changes as a result of calling this method.
	 </p>
	 
	 </apiDesc><example conref="examples\Date.setFullYear.1.as"> The following example creates a new Date object <codeph>someBirthday</codeph> with parameters
 <codeph>year</codeph> (<codeph>1974</codeph>), <codeph>month</codeph> (<codeph>10</codeph> = November), <codeph>day</codeph>
 (<codeph>30</codeph>), <codeph>hour</codeph> (<codeph>1</codeph>) and <codeph>minute</codeph> (<codeph>20</codeph>).  The
 method <codeph>getFullYear()</codeph> is then called, which retrieves the four-digit year.
 Next <codeph>setFullYear()</codeph> is called with the <codeph>year</codeph> parameter set to
 <codeph>2000</codeph> and then <codeph>getFullYear()</codeph> is called again, which retrieves the newly set year.
<codeblock>

var someBirthday:Date = new Date(1974, 10, 30, 1, 20);
trace(someBirthday);           // Sat Nov 30 01:20:00 GMT-0800 1974
trace(someBirthday.getFullYear()); // 1974

someBirthday.setFullYear(2000);
trace(someBirthday.getFullYear()); // 2000
</codeblock></example></apiOperationDetail><related-links><link href="#Date/getUTCDay()"><linktext>getUTCDay()</linktext></link><link href="#Date/getDay()"><linktext>getDay()</linktext></link></related-links></apiOperation><apiOperation id="Date:AS3:setHours"><apiName>setHours</apiName><shortdesc>
	 Sets the hour, according to local time, and returns the new time in milliseconds.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.sethours, sethours, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The new time, in milliseconds.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>hour</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 (midnight) to 23 (11 p.m.).
     </apiDesc></apiParam><apiParam><apiItemName>minute</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 to 59. 
     </apiDesc></apiParam><apiParam><apiItemName>second</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 to 59. 
     </apiDesc></apiParam><apiParam><apiItemName>millisecond</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 to 999. 
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Sets the hour, according to local time, and returns the new time in milliseconds. 
	 Local time is determined by the operating system on which Flash Player is running.
	 
	 </apiDesc><example conref="examples\Date.setHours.1.as"> The following example creates a new Date object <codeph>someBirthday</codeph> with parameters
 <codeph>year</codeph> (<codeph>1974</codeph>), <codeph>month</codeph> (<codeph>10</codeph> = November), <codeph>day</codeph>
 (<codeph>30</codeph>), <codeph>hour</codeph> (<codeph>1</codeph>) and <codeph>minute</codeph> (<codeph>20</codeph>).  The methods
 <codeph>getHours()</codeph> and
 <codeph>getMinutes()</codeph> are then called, which retrieves the hours and minutes.  Next <codeph>setHours()</codeph>
 is called with the <codeph>hour</codeph> parameter set to <codeph>12</codeph> and then <codeph>getHours()</codeph> and
 <codeph>getMinutes()</codeph> are called again, which retrieves the newly set hours and minutes.
<codeblock>

var someBirthday:Date = new Date(1974, 10, 30, 15, 20);

trace(someBirthday); // Sat Nov 30 15:20:00 GMT-0800 1974
trace(someBirthday.getHours() + ":" + someBirthday.getMinutes()); // 15:20

someBirthday.setHours(12);
trace(someBirthday.getHours() + ":" + someBirthday.getMinutes()); // 12:20
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:setMilliseconds"><apiName>setMilliseconds</apiName><shortdesc>
	 Sets the milliseconds, according to local time, and returns the new time in 
	 milliseconds.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.setmilliseconds, setmilliseconds, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The new time, in milliseconds.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>millisecond</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 to 999.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Sets the milliseconds, according to local time, and returns the new time in 
	 milliseconds. Local time is determined by the operating system on which Flash Player 
	 is running.
	 
	 </apiDesc><example conref="examples\Date.setMilliseconds.1.as"> The following example creates a new Date object <codeph>now</codeph> with no parameters.
 The method <codeph>getMilliseconds()</codeph> is then called, which retrieves the milliseconds when
 <codeph>now</codeph> was created.  Then another new Date object <codeph>before</codeph> with an additional
 call to <codeph>setMilliseconds()</codeph> with the <codeph>millisecond</codeph> parameter set to <codeph>4</codeph> and
 <codeph>getMilliseconds()</codeph> is called again, which retrieves the newly set milliseconds.
<codeblock>

var now:Date = new Date();
trace(now);
trace(now.getMilliseconds());

var before:Date = new Date(now.setMilliseconds(4));
trace(before);
trace(before.getMilliseconds());
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:setMinutes"><apiName>setMinutes</apiName><shortdesc>
	 Sets the minutes, according to local time, and returns the new time in milliseconds.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.setminutes, setminutes, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The new time, in milliseconds.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>minute</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 to 59.
     </apiDesc></apiParam><apiParam><apiItemName>second</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 to 59.
     </apiDesc></apiParam><apiParam><apiItemName>millisecond</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 to 999.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Sets the minutes, according to local time, and returns the new time in milliseconds. 
	 Local time is determined by the operating system on which Flash Player is running.
	 
	 </apiDesc><example conref="examples\Date.setMinutes.1.as"> The following example creates a new Date object <codeph>now</codeph> with no parameters.
 The method <codeph>getMinutes()</codeph> is then called, which retrieves the minutes when
 <codeph>now</codeph> was created.  Then another new Date object <codeph>before</codeph> with an additional
 call to <codeph>setMinutes()</codeph> with the <codeph>minute</codeph> parameter set to <codeph>0</codeph> and
 <codeph>getMinutes()</codeph> is called again, which retrieves the newly set minutes.
<codeblock>

var now:Date = new Date();
trace(now);
trace(now.getMinutes());

var before:Date = new Date(now.setMinutes(0));
trace(before);
trace(before.getMinutes());
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:setMonth"><apiName>setMonth</apiName><shortdesc>
	 Sets the month and optionally the day of the month, according to local time, and 
	 returns the new time in milliseconds.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.setmonth, setmonth, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The new time, in milliseconds.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>month</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 (January) to 11 (December).
	 
	 </apiDesc></apiParam><apiParam><apiItemName>day</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 1 to 31. 
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Sets the month and optionally the day of the month, according to local time, and 
	 returns the new time in milliseconds. Local time is determined by the operating 
	 system on which Flash Player is running.
	 
	 </apiDesc><example conref="examples\Date.setMonth.1.as"> The following example creates a new Array object <codeph>monthLabels</codeph>, with elements
 <codeph>January</codeph> through <codeph>December</codeph> and a new month object <codeph>now</codeph> with no parameters.
 The method <codeph>getMonth()</codeph> is then called, which retrieves the month in which
 <codeph>now</codeph> was created.  Next <codeph>setMonth()</codeph> is called with the <codeph>month</codeph> parameter set to
 <codeph>0</codeph> and then <codeph>getMonth()</codeph> is called again, which retrieves the newly set month..
<codeblock>

var monthLabels:Array = new Array("January",
                  "February",
                  "March",
                  "April",
                  "May",
                  "June",
                  "July",
                  "August",
                  "September",
                  "October",
                  "November",
                  "December");

var now:Date = new Date();
trace(now.getMonth());
trace(monthLabels[now.getMonth()]);

now.setMonth(0);
trace(now.getMonth());             // 0
trace(monthLabels[now.getMonth()]); // January
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:setSeconds"><apiName>setSeconds</apiName><shortdesc>
	 Sets the seconds, according to local time, and returns the new time in milliseconds.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.setseconds, setseconds, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The new time, in milliseconds.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>second</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 to 59.
     </apiDesc></apiParam><apiParam><apiItemName>millisecond</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 to 999.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Sets the seconds, according to local time, and returns the new time in milliseconds. 
	 Local time is determined by the operating system on which Flash Player is running.
	 
	 </apiDesc><example conref="examples\Date.setSeconds.1.as"> The following example creates a new Date object <codeph>now</codeph> with no parameters.  
 The method <codeph>getseconds()</codeph> is then called, which retrieves the seconds when
 <codeph>now</codeph> was created.  Then the <codeph>setSeconds()</codeph> is called with the <codeph>second</codeph>
 parameter set to <codeph>0</codeph> and 
 <codeph>getSeconds()</codeph> is called again, which retrieves the newly set seconds.
<codeblock>

var now:Date = new Date();
trace(now.getSeconds());

now.setSeconds(0);
trace(now.getSeconds()); // 0
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:setTime"><apiName>setTime</apiName><shortdesc>
	 Sets the date in milliseconds since midnight on January 1, 1970, and returns the new 
	 time in milliseconds.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.settime, settime, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The new time, in milliseconds.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>millisecond</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer value where 0 is midnight on January 1, universal time (UTC).
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Sets the date in milliseconds since midnight on January 1, 1970, and returns the new 
	 time in milliseconds. 
	 
	 </apiDesc><example conref="examples\Date.setTime.1.as"> The following example creates a new Date object <codeph>now</codeph> with no parameters.
 The <codeph>setTime()</codeph> method is then called, with the <codeph>millisecond</codeph> parameter set
 to <codeph>-1292601600000</codeph>, which sets the time to <codeph>Tue Jan 15 00:00:00 GMT-0800 1929</codeph>.
<codeblock>

var now:Date = new Date();
trace(now);

now.setTime(-1292601600000);
trace(now); // Tue Jan 15 00:00:00 GMT-0800 1929
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:setUTCDate"><apiName>setUTCDate</apiName><shortdesc>
	 Sets the day of the month, in universal time (UTC), and returns the new time in 
	 milliseconds.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.setutcdate, setutcdate, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The new time, in milliseconds.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>day</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A number; an integer from 1 to 31.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Sets the day of the month, in universal time (UTC), and returns the new time in 
	 milliseconds. Calling this method does not modify the other fields of a <codeph>Date
	 </codeph> object, but the <codeph>Date.getUTCDay()</codeph> and <codeph>Date.getDay()</codeph> methods can report 
	 a new value if the day of the week changes as a result of calling this method.
	 
	 </apiDesc><example conref="examples\Date.setUTCDate.1.as"> The following example creates a new Date object <codeph>someBirthday</codeph> with parameters
 <codeph>year</codeph> (<codeph>1974</codeph>), <codeph>month</codeph> (<codeph>10</codeph> = November), <codeph>day</codeph>
 (<codeph>30</codeph>), <codeph>hour</codeph> (<codeph>1</codeph>) and <codeph>minute</codeph> (<codeph>20</codeph>).  The method
 <codeph>getUTCDate()</codeph> is called and correctly returns the day of the month.  Next <codeph>setUTCDate()</codeph>
 is called with the <codeph>day</codeph> parameter set to <codeph>1</codeph> and a <codeph>trace()</codeph> statement
 confirms the date was correctly set.
<codeblock>

var someBirthday:Date = new Date(1974, 10, 30, 1, 20);
trace(someBirthday); // Sat Nov 30 01:20:00 GMT-0800 1974
trace(someBirthday.getUTCDate()); // 30

someBirthday.setUTCDate(1);
trace(someBirthday); // Fri Nov 1 01:20:00 GMT-0800 1974
</codeblock></example></apiOperationDetail><related-links><link href="#Date/getUTCDay()"><linktext>getUTCDay()</linktext></link><link href="#Date/getDay()"><linktext>getDay()</linktext></link></related-links></apiOperation><apiOperation id="Date:AS3:setUTCFullYear"><apiName>setUTCFullYear</apiName><shortdesc>
	 Sets the year, in universal time (UTC), and returns the new time in milliseconds.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.setutcfullyear, setutcfullyear, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An integer.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>year</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer that represents the year specified as a full four-digit year, 
	 such as 2000.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>month</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 (January) to 11 (December). 
	 
	 </apiDesc></apiParam><apiParam><apiItemName>day</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 1 to 31. 
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Sets the year, in universal time (UTC), and returns the new time in milliseconds. 
	 <p>
	 Optionally, this method can also set the month and day of the month. Calling 
	 this method does not modify the other fields, but the <codeph>Date.getUTCDay()</codeph> and 
	 <codeph>Date.getDay()</codeph> methods can report a new value if the day of the week changes as a 
	 result of calling this method. 
	 </p>
	 
 	 </apiDesc><example conref="examples\Date.setUTCFullYear.1.as"> The following example creates a new Date object <codeph>someBirthday</codeph> with parameters
 <codeph>year</codeph> (<codeph>1974</codeph>), <codeph>month</codeph> (<codeph>10</codeph> = November), <codeph>day</codeph>
 (<codeph>30</codeph>), <codeph>hour</codeph> (<codeph>1</codeph>) and <codeph>minute</codeph> (<codeph>20</codeph>).  The method
 <codeph>getUTCFullYear()</codeph> is called and correctly returns the four-digit year.  Next <codeph>setUTCFullYear()</codeph>
 is called with the <codeph>year</codeph> parameter set to <codeph>1975</codeph> and a <codeph>trace()</codeph> statement
 confirms the year was correctly set.
<codeblock>

var someBirthday:Date = new Date(1974, 10, 30, 1, 20);
trace(someBirthday); // Sat Nov 30 01:20:00 GMT-0800 1974
trace(someBirthday.getUTCFullYear()); // 1974

someBirthday.setUTCFullYear(1975);
trace(someBirthday); // Thu Nov 30 01:20:00 GMT-0800 1975
</codeblock></example></apiOperationDetail><related-links><link href="#Date/getUTCDay()"><linktext>getUTCDay()</linktext></link><link href="#Date/getDay()"><linktext>getDay()</linktext></link></related-links></apiOperation><apiOperation id="Date:AS3:setUTCHours"><apiName>setUTCHours</apiName><shortdesc>
	 Sets the hour, in universal time (UTC), and returns the new time in milliseconds.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.setutchours, setutchours, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The new time, in milliseconds.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>hour</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 (midnight) to 23 (11 p.m.).
	 
	 </apiDesc></apiParam><apiParam><apiItemName>minute</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 to 59. 
	 
	 </apiDesc></apiParam><apiParam><apiItemName>second</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 to 59. 
	 
	 </apiDesc></apiParam><apiParam><apiItemName>millisecond</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 to 999. 
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Sets the hour, in universal time (UTC), and returns the new time in milliseconds. 
	 Optionally, the minutes, seconds, and milliseconds can be specified.
	 
	 </apiDesc><example conref="examples\Date.setUTCHours.1.as"> The following example creates a new Date object <codeph>someBirthday</codeph> with parameters
 <codeph>year</codeph> (<codeph>1974</codeph>), <codeph>month</codeph> (<codeph>10</codeph> = November), <codeph>day</codeph>
 (<codeph>30</codeph>), <codeph>hour</codeph> (<codeph>1</codeph>) and <codeph>minute</codeph> (<codeph>20</codeph>).  The methods
 <codeph>getHours()</codeph>, <codeph>getMinutes()</codeph>, <codeph>getUTCHours()</codeph>, and <codeph>getUTCMinutes()</codeph>
 are then called, which retrieves the hours and minutes. Next <codeph>setUTCHours()</codeph> is called with the
 <codeph>hour</codeph> parameter set to <codeph>12</codeph> and then the methods <codeph>getHours()</codeph>,
 <codeph>getMinutes()</codeph>, <codeph>getUTCHours()</codeph>, and <codeph>getUTCMinutes()</codeph> are re-called and
 correctly display the updated hour.
<codeblock>

var someBirthday:Date = new Date(1974, 10, 30, 15, 20);

trace(someBirthday); // Sat Nov 30 15:20:00 GMT-0800 1974
trace(someBirthday.getHours() + ":" + someBirthday.getMinutes());     // 15:20
trace(someBirthday.getUTCHours() + ":" + someBirthday.getUTCMinutes()); // 23:20

someBirthday.setUTCHours(12);
trace(someBirthday.getHours() + ":" + someBirthday.getMinutes());     // 4:20
trace(someBirthday.getUTCHours() + ":" + someBirthday.getUTCMinutes()); // 12:20
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:setUTCMilliseconds"><apiName>setUTCMilliseconds</apiName><shortdesc>
	 Sets the milliseconds, in universal time (UTC), and returns the new time in milliseconds.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.setutcmilliseconds, setutcmilliseconds, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The new time, in milliseconds.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>millisecond</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 to 999.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Sets the milliseconds, in universal time (UTC), and returns the new time in milliseconds.
	 
	 </apiDesc><example conref="examples\Date.setUTCMilliseconds.1.as"> The following example creates a new Date object <codeph>now</codeph> with no parameters.
 The method <codeph>getUTCMilliseconds()</codeph> is then called, which retrieves the UTCMilliseconds when
 <codeph>now</codeph> was created.  Then another new Date object <codeph>before</codeph> with an additional
 call to <codeph>setUTCMilliseconds()</codeph> with the <codeph>millisecond</codeph> parameter set to <codeph>4</codeph> and
 <codeph>getUTCMilliseconds()</codeph> is called again, which retrieves the newly set milliseconds.
<codeblock>


var now:Date = new Date();
trace(now);
trace(now.getUTCMilliseconds());

var before:Date = new Date(now.setUTCMilliseconds(4));
trace(before);
trace(before.getUTCMilliseconds());
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:setUTCMinutes"><apiName>setUTCMinutes</apiName><shortdesc>
	 Sets the minutes, in universal time (UTC), and returns the new time in milliseconds.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.setutcminutes, setutcminutes, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The new time, in milliseconds.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>minute</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 to 59.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>second</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 to 59. 
	 
	 </apiDesc></apiParam><apiParam><apiItemName>millisecond</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 to 999. 
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Sets the minutes, in universal time (UTC), and returns the new time in milliseconds.
	 Optionally, you can specify the seconds and milliseconds.
	 
	 </apiDesc><example conref="examples\Date.setUTCMinutes.1.as"> The following example creates a new Date object <codeph>now</codeph> with no parameters.
 The method <codeph>getUTCMinutes()</codeph> is then called, which retrieves the UTCMinutes when
 <codeph>now</codeph> was created.  Then another new Date object <codeph>before</codeph> with an additional
 call to <codeph>setUTCMinutes()</codeph> with the <codeph>minute</codeph> parameter set to <codeph>0</codeph> and
 <codeph>getUTCMinutes()</codeph> is called again, which retrieves the newly set minutes.
<codeblock>

var now:Date = new Date();
trace(now);
trace(now.getUTCMinutes());

var before:Date = new Date(now.setUTCMinutes(0));
trace(before);
trace(before.getUTCMinutes());
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:setUTCMonth"><apiName>setUTCMonth</apiName><shortdesc>
	 Sets the month, and optionally the day, in universal time(UTC) and returns the new 
	 time in milliseconds.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.setutcmonth, setutcmonth, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The new time, in milliseconds.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>month</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 (January) to 11 (December).
	 
	 </apiDesc></apiParam><apiParam><apiItemName>day</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 1 to 31. 
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Sets the month, and optionally the day, in universal time(UTC) and returns the new 
	 time in milliseconds. Calling this method does not modify the other fields, but the
	 <codeph>Date.getUTCDay()</codeph> and <codeph>Date.getDay()</codeph> methods might report a new 
	 value if the day of the week changes as a result of calling this method.
	 
	 </apiDesc><example conref="examples\Date.setUTCMonth.1.as"> The following example creates a new Array object <codeph>UTCMonthLabels</codeph>, with elements
 <codeph>January</codeph> through <codeph>December</codeph> and a new UTCMonth object <codeph>now</codeph> with no parameters.
 The method <codeph>getUTCMonth()</codeph> is then called, which retrieves the UTCMonth in which
 <codeph>now</codeph> was created.  Next <codeph>setUTCMonth()</codeph> is called with the <codeph>month</codeph> parameter set to
 <codeph>0</codeph> and then <codeph>getUTCMonth()</codeph> is called again, which retrieves the newly set month..
<codeblock>

var UTCMonthLabels:Array = new Array("January",
                  "February",
                  "March",
                  "April",
                  "May",
                  "June",
                  "July",
                  "August",
                  "September",
                  "October",
                  "November",
                  "December");

var now:Date = new Date();
trace(now.getUTCMonth());
trace(UTCMonthLabels[now.getUTCMonth()]);

now.setUTCUTCMonth(0);
trace(now.getUTCMonth());              // 0
trace(UTCMonthLabels[now.getUTCMonth()]); // January
</codeblock></example></apiOperationDetail><related-links><link href="#Date/getDay()"><linktext>getDay()</linktext></link></related-links></apiOperation><apiOperation id="Date:AS3:setUTCSeconds"><apiName>setUTCSeconds</apiName><shortdesc>
	 Sets the seconds, and optionally the milliseconds, in universal time (UTC) and 
	 returns the new time in milliseconds.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.setutcseconds, setutcseconds, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The new time, in milliseconds.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>second</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 to 59.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>millisecond</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>An integer from 0 to 999. 
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Sets the seconds, and optionally the milliseconds, in universal time (UTC) and 
	 returns the new time in milliseconds.
	 
	 </apiDesc><example conref="examples\Date.setUTCSeconds.1.as"> The following example creates a new Date object <codeph>now</codeph> with no parameters.  
 The method <codeph>getUTCSeconds()</codeph> is then called, which retrieves the seconds when
 <codeph>now</codeph> was created.  Then the <codeph>setUTCSeconds()</codeph> is called with the <codeph>second</codeph>
 parameter set to <codeph>0</codeph> and <codeph>getUTCSeconds()</codeph> is called again, which retrieves the 
 newly set seconds.
<codeblock>

var now:Date = new Date();
trace(now.getUTCSeconds());

now.setUTCSeconds(0);
trace(now.getUTCSeconds()); // 0
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:toDateString"><apiName>toDateString</apiName><shortdesc>
	 Returns a string representation of the day and date only, and does not include the time or timezone.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage name="ActionScript" version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The string representation of day and date only.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns a string representation of the day and date only, and does not include the time or timezone.
	 Contrast with the following methods:
	 <ul>
	   <li><codeph>Date.toTimeString()</codeph>, which returns only the time and timezone</li>
	   <li><codeph>Date.toString()</codeph>, which returns not only the day and date, but also the time and timezone.</li>
	 </ul>
	 
	 </apiDesc><example conref="examples\Date.toDateString.1.as"> The following example creates a new Date object <codeph>now</codeph> with no parameters
 and then the following methods are called within a <codeph>trace()</codeph> statement
 <ul>
   <li><codeph>toString</codeph>: displays all parameters for <codeph>now</codeph> at the time <codeph>now</codeph> was created.</li>
   <li><codeph>toDateString()</codeph>: displays the <codeph>day</codeph>, <codeph>month</codeph>, and <codeph>year</codeph> parameters
     for the time <codeph>now</codeph> was created.</li>
 </ul>
<codeblock>

var now:Date = new Date();
trace(now);
trace(now.toDateString());
</codeblock></example></apiOperationDetail><related-links><link href="#Date/toString()"><linktext>toString()</linktext></link></related-links></apiOperation><apiOperation id="Date:AS3:toLocaleDateString"><apiName>toLocaleDateString</apiName><shortdesc>
	 Returns a String representation of the day and date only, and does not include the time or timezone.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage name="ActionScript" version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The <codeph>String</codeph> representation of day and date only.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns a String representation of the day and date only, and does not include the time or timezone.
	 This method returns the same value as <codeph>Date.toDateString</codeph>.
	 Contrast with the following methods:
	 <ul>
	   <li><codeph>Date.toTimeString()</codeph>, which returns only the time and timezone</li>
	   <li><codeph>Date.toString()</codeph>, which returns not only the day and date, but also the
	 time and timezone.</li>
	 </ul>
	 
	 </apiDesc></apiOperationDetail><related-links><link href="#Date/toDateString()"><linktext>toDateString()</linktext></link><link href="#Date/toTimeString()"><linktext>toTimeString()</linktext></link><link href="#Date/toString()"><linktext>toString()</linktext></link></related-links></apiOperation><apiOperation id="Date:AS3:toLocaleString"><apiName>toLocaleString</apiName><shortdesc>
	 Returns a String representation of the day, date, time, given in local time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A string representation of a <codeph>Date</codeph> object in the local timezone.
	 
	  
	  </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns a String representation of the day, date, time, given in local time.
	 Contrast with the <codeph>Date.toString()</codeph> method, which returns the same information (plus the timezone)
	 with the year listed at the end of the string.
	 
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:toLocaleTimeString"><apiName>toLocaleTimeString</apiName><shortdesc>
	 Returns a String representation of the time only, and does not include the day, date, year, or timezone.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage name="ActionScript" version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The string representation of time and timezone only.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns a String representation of the time only, and does not include the day, date, year, or timezone.
	 Contrast with the <codeph>Date.toTimeString()</codeph> method, which returns the time and timezone.
	 
	 </apiDesc></apiOperationDetail><related-links><link href="#Date/toTimeString()"><linktext>toTimeString()</linktext></link></related-links></apiOperation><apiOperation id="Date:AS3:toString"><apiName>toString</apiName><shortdesc>
	 Returns a String representation of the day, date, time, and timezone.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.tostring, tostring, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The string representation of a <codeph>Date</codeph> object.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns a String representation of the day, date, time, and timezone.
     The date format for the output is: 
     <pre>
     Day Mon Date HH:MM:SS TZD YYYY
     </pre>
     <p>For example:</p>
     <pre>
     Wed Apr 12 15:30:17 GMT-0700 2006
     </pre>
	 
	 </apiDesc><example conref="examples\Date.toString.1.as"> The following example creates a new Date object <codeph>now</codeph> with no parameters
 and then <codeph>toString</codeph> is called within a <codeph>trace()</codeph> statement, which
 displays all parameters for <codeph>now</codeph> at the time <codeph>now</codeph> was created.
<codeblock>


var now:Date = new Date();
trace(now);
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Date:AS3:toTimeString"><apiName>toTimeString</apiName><shortdesc>
	 Returns a String representation of the time and timezone only, and does not include the day and date.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage name="ActionScript" version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The string representation of time and timezone only.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns a String representation of the time and timezone only, and does not include the day and date.
	 Contrast with the <codeph>Date.toDateString()</codeph> method, which returns only the day and date.
	 
	 </apiDesc></apiOperationDetail><related-links><link href="#Date/toDateString()"><linktext>toDateString()</linktext></link></related-links></apiOperation><apiOperation id="Date:AS3:toUTCString"><apiName>toUTCString</apiName><shortdesc>
	 Returns a String representation of the day, date, and time in universal time (UTC).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The string representation of a <codeph>Date</codeph> object in UTC time.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns a String representation of the day, date, and time in universal time (UTC).
	 For example, the date February 1, 2005 is returned as <codeph>Tue Feb 1 00:00:00 2005 UTC</codeph>.
	 
	 </apiDesc></apiOperationDetail><related-links><link href="#Date/toString()"><linktext>toString()</linktext></link></related-links></apiOperation><apiOperation id="Date:AS3:valueOf"><apiName>valueOf</apiName><shortdesc>
	 Returns the number of milliseconds since midnight January 1, 1970, universal time, 
	 for a Date object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>date.valueof, valueof, date
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The number of milliseconds since January 1, 1970 that a <codeph>Date</codeph> object represents.
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the number of milliseconds since midnight January 1, 1970, universal time, 
	 for a <codeph>Date</codeph> object.
	 
	 </apiDesc><example conref="examples\Date.valueOf.1.as"> The following example creates a new Date object <codeph>now</codeph> with no parameters
 The <codeph>getTime()</codeph> method is then called, which retrieves the number of milliseconds between
 the time <codeph>now</codeph> was created and midnight on
 January 1, 1970, and then <codeph>valueOf()</codeph> is called, which retrieves the same thing.
<codeblock>


var now:Date = new Date();
trace(now.getTime());
trace(now.valueOf());
</codeblock></example></apiOperationDetail></apiOperation><apiValue id="Date:AS3:date:get"><apiName>date</apiName><shortdesc>
	 The day of the month (an integer from 1 to 31) specified by a Date object
	 according to local time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="AS3"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 The day of the month (an integer from 1 to 31) specified by a <codeph>Date</codeph> object
	 according to local time. Local time is determined by the operating system on which 
	 Flash Player is running.
	 
 	 </apiDesc></apiValueDetail><related-links><link href="#Date/getDate()"><linktext>getDate()</linktext></link><link href="#Date/setDate()"><linktext>setDate()</linktext></link></related-links></apiValue><apiValue id="Date:AS3:dateUTC:get"><apiName>dateUTC</apiName><shortdesc>
	 The day of the month (an integer from 1 to 31) of a Date object 
	 according to universal time (UTC).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="AS3"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 The day of the month (an integer from 1 to 31) of a <codeph>Date</codeph> object 
	 according to universal time (UTC).
	 
	 </apiDesc></apiValueDetail><related-links><link href="#Date/getUTCDate()"><linktext>getUTCDate()</linktext></link><link href="#Date/setUTCDate()"><linktext>setUTCDate()</linktext></link></related-links></apiValue><apiValue id="Date:AS3:day:get"><apiName>day</apiName><shortdesc>
	 The day of the week (0 for Sunday, 1 for Monday, and so on) specified by this
	 Date according to local time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="AS3"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 The day of the week (0 for Sunday, 1 for Monday, and so on) specified by this
	 <codeph>Date</codeph> according to local time. Local time is determined by the operating 
	 system on which Flash Player is running.
	 
 	 </apiDesc></apiValueDetail><related-links><link href="#Date/getDay()"><linktext>getDay()</linktext></link></related-links></apiValue><apiValue id="Date:AS3:dayUTC:get"><apiName>dayUTC</apiName><shortdesc>
	 The day of the week (0 for Sunday, 1 for Monday, and so on) of this Date
	  according to universal time (UTC).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="AS3"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 The day of the week (0 for Sunday, 1 for Monday, and so on) of this <codeph>Date
	 </codeph> according to universal time (UTC).
	 
	 </apiDesc></apiValueDetail><related-links><link href="#Date/getUTCDay()"><linktext>getUTCDay()</linktext></link></related-links></apiValue><apiValue id="Date:AS3:fullYear:get"><apiName>fullYear</apiName><shortdesc>
	 The full year (a four-digit number, such as 2000) of a Date object
	 according to local time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="AS3"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 The full year (a four-digit number, such as 2000) of a <codeph>Date</codeph> object
	 according to local time. Local time is determined by the operating system on which 
	 Flash Player is running.
	 
	 </apiDesc></apiValueDetail><related-links><link href="#Date/getFullYear()"><linktext>getFullYear()</linktext></link><link href="#Date/setFullYear()"><linktext>setFullYear()</linktext></link></related-links></apiValue><apiValue id="Date:AS3:fullYearUTC:get"><apiName>fullYearUTC</apiName><shortdesc>
	 The four-digit year of a Date object according to universal time (UTC).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="AS3"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 The four-digit year of a <codeph>Date</codeph> object according to universal time (UTC).
	 
	 </apiDesc></apiValueDetail><related-links><link href="#Date/getUTCFullYear()"><linktext>getUTCFullYear()</linktext></link><link href="#Date/setUTCFullYear()"><linktext>setUTCFullYear()</linktext></link></related-links></apiValue><apiValue id="Date:AS3:hours:get"><apiName>hours</apiName><shortdesc>
	 The hour (an integer from 0 to 23) of the day portion of a Date object
	 according to local time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="AS3"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 The hour (an integer from 0 to 23) of the day portion of a <codeph>Date</codeph> object
	 according to local time. Local time is determined by the operating system on which 
	 Flash Player is running. 
	 
	 </apiDesc></apiValueDetail><related-links><link href="#Date/getHours()"><linktext>getHours()</linktext></link><link href="#Date/setHours()"><linktext>setHours()</linktext></link></related-links></apiValue><apiValue id="Date:AS3:hoursUTC:get"><apiName>hoursUTC</apiName><shortdesc>
	 The hour (an integer from 0 to 23) of the day of a Date object
	 according to universal time (UTC).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="AS3"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 The hour (an integer from 0 to 23) of the day of a <codeph>Date</codeph> object
	 according to universal time (UTC).
	 
	 </apiDesc></apiValueDetail><related-links><link href="#Date/getUTCHours()"><linktext>getUTCHours()</linktext></link><link href="#Date/setUTCHours()"><linktext>setUTCHours()</linktext></link></related-links></apiValue><apiValue id="Date:AS3:milliseconds:get"><apiName>milliseconds</apiName><shortdesc>
	 The milliseconds (an integer from 0 to 999) portion of a Date object
	 according to local time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="AS3"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 The milliseconds (an integer from 0 to 999) portion of a <codeph>Date</codeph> object
	 according to local time. Local time is determined by the operating system on which 
	 Flash Player is running.
	 
	 </apiDesc></apiValueDetail><related-links><link href="#Date/getMilliseconds()"><linktext>getMilliseconds()</linktext></link><link href="#Date/setMilliseconds()"><linktext>setMilliseconds()</linktext></link></related-links></apiValue><apiValue id="Date:AS3:millisecondsUTC:get"><apiName>millisecondsUTC</apiName><shortdesc>
	 The milliseconds (an integer from 0 to 999) portion of a Date object
	 according to universal time (UTC).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="AS3"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 The milliseconds (an integer from 0 to 999) portion of a <codeph>Date</codeph> object
	 according to universal time (UTC).
	 
	 </apiDesc></apiValueDetail><related-links><link href="#Date/getUTCMilliseconds()"><linktext>getUTCMilliseconds()</linktext></link><link href="#Date/setUTCMilliseconds()"><linktext>setUTCMilliseconds()</linktext></link></related-links></apiValue><apiValue id="Date:AS3:minutes:get"><apiName>minutes</apiName><shortdesc>
	 The minutes (an integer from 0 to 59) portion of a Date object
	 according to local time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="AS3"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 The minutes (an integer from 0 to 59) portion of a <codeph>Date</codeph> object
	 according to local time. Local time is determined by the operating system on which 
	 Flash Player is running.
	 
	 </apiDesc></apiValueDetail><related-links><link href="#Date/getMinutes()"><linktext>getMinutes()</linktext></link><link href="#Date/setMinutes()"><linktext>setMinutes()</linktext></link></related-links></apiValue><apiValue id="Date:AS3:minutesUTC:get"><apiName>minutesUTC</apiName><shortdesc>
	 The minutes (an integer from 0 to 59) portion of a Date object
	 according to universal time (UTC).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="AS3"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 The minutes (an integer from 0 to 59) portion of a <codeph>Date</codeph> object
	 according to universal time (UTC).
	 
	 </apiDesc></apiValueDetail><related-links><link href="#Date/getUTCMinutes()"><linktext>getUTCMinutes()</linktext></link><link href="#Date/setUTCMinutes()"><linktext>setUTCMinutes()</linktext></link></related-links></apiValue><apiValue id="Date:AS3:month:get"><apiName>month</apiName><shortdesc>
	 The month (0 for January, 1 for February, and so on) portion of a 
	 Date object according to local time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="AS3"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 The month (0 for January, 1 for February, and so on) portion of a <codeph>
	 Date</codeph> object according to local time. Local time is determined by the operating system 
	 on which Flash Player is running.
	 
	 </apiDesc></apiValueDetail><related-links><link href="#Date/getMonth()"><linktext>getMonth()</linktext></link><link href="#Date/setMonth()"><linktext>setMonth()</linktext></link></related-links></apiValue><apiValue id="Date:AS3:monthUTC:get"><apiName>monthUTC</apiName><shortdesc>
	 The month (0 [January] to 11 [December]) portion of a Date object
	 according to universal time (UTC).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="AS3"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 The month (0 [January] to 11 [December]) portion of a <codeph>Date</codeph> object
	 according to universal time (UTC).
	 
	 </apiDesc></apiValueDetail><related-links><link href="#Date/getUTCMonth()"><linktext>getUTCMonth()</linktext></link><link href="#Date/setUTCMonth()"><linktext>setUTCMonth()</linktext></link></related-links></apiValue><apiValue id="Date:AS3:seconds:get"><apiName>seconds</apiName><shortdesc>
	 The seconds (an integer from 0 to 59) portion of a Date object
	 according to local time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="AS3"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 The seconds (an integer from 0 to 59) portion of a <codeph>Date</codeph> object
	 according to local time. Local time is determined by the operating system on which 
	 Flash Player is running.
	 
	 </apiDesc></apiValueDetail><related-links><link href="#Date/getSeconds()"><linktext>getSeconds()</linktext></link><link href="#Date/setSeconds()"><linktext>setSeconds()</linktext></link></related-links></apiValue><apiValue id="Date:AS3:secondsUTC:get"><apiName>secondsUTC</apiName><shortdesc>
	 The seconds (an integer from 0 to 59) portion of a Date object
	 according to universal time (UTC).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="AS3"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 The seconds (an integer from 0 to 59) portion of a <codeph>Date</codeph> object
	 according to universal time (UTC).
	 
	 </apiDesc></apiValueDetail><related-links><link href="#Date/getUTCSeconds()"><linktext>getUTCSeconds()</linktext></link><link href="#Date/setUTCSeconds()"><linktext>setUTCSeconds()</linktext></link></related-links></apiValue><apiValue id="Date:AS3:time:get"><apiName>time</apiName><shortdesc>
	 The number of milliseconds since midnight January 1, 1970, universal time, 
	 for a Date object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="AS3"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
	 The number of milliseconds since midnight January 1, 1970, universal time, 
	 for a <codeph>Date</codeph> object. Use this method to represent a specific instant in time 
	 when comparing two or more <codeph>Date</codeph> objects.
	 
	 </apiDesc></apiValueDetail><related-links><link href="#Date/getTime()"><linktext>getTime()</linktext></link><link href="#Date/setTime()"><linktext>setTime()</linktext></link></related-links></apiValue><apiValue id="Date:AS3:timezoneOffset:get"><apiName>timezoneOffset</apiName><shortdesc>
     The difference, in minutes, between universal time (UTC) and the computer's local time.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="AS3"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
     The difference, in minutes, between universal time (UTC) and the computer's local time. 
     Specifically, this value is the number of minutes you need to add to the computer's local
     time to equal UTC. If your computer's time is set later than UTC, the value will be negative.
     </apiDesc></apiValueDetail><related-links><link href="#Date/getTimezoneOffset()"><linktext>getTimezoneOffset()</linktext></link></related-links></apiValue></apiClassifier><apiClassifier id="globalClassifier:URIError"><apiName>URIError</apiName><shortdesc>
 A URIError exception is thrown when one of the global URI handling functions is used 
 in a way that is incompatible with its definition.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Error, URIError
 
 </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/><apiBaseClassifier>Error</apiBaseClassifier></apiClassifierDef><apiDesc>
 A URIError exception is thrown when one of the global URI handling functions is used 
 in a way that is incompatible with its definition. This exception is thrown when an invalid 
 URI is specified to a function that expects a valid URI, such as the <codeph>Socket.connect()</codeph> 
 method.
 
 
 </apiDesc></apiClassifierDetail><related-links><link href="flash.net.xml#Socket/connect()"><linktext>flash.net.Socket.connect()</linktext></link></related-links><apiConstructor id="URIError:URIError"><apiName>URIError</apiName><shortdesc>
	 Creates a new URIError object.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>message</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiData></apiData><apiDesc>Contains the message associated with the URIError object.  
	  
	  </apiDesc></apiParam></apiConstructorDef><apiDesc>
	 Creates a new URIError object.
     </apiDesc></apiConstructorDetail></apiConstructor></apiClassifier><apiClassifier id="globalClassifier:Object"><apiName>Object</apiName><shortdesc>
 The Object class is at the root of the ActionScript
 runtime class hierarchy.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>object, object object, built-in class
 
 </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/></apiClassifierDef><apiDesc>
 The Object class is at the root of the <ph platform="actionscript">ActionScript</ph>
 <ph platform="javascript">runtime</ph> class hierarchy. Objects are created by constructors using the
 <codeph>new</codeph> operator syntax, and can have properties assigned to them dynamically. 
 <ph platform="actionscript">Objects can also be created by 
 assigning an object literal, as in:</ph>
 
 <codeblock platform="actionscript">var obj:Object = {a:"foo", b:"bar"}</codeblock>
 
 <p platform="actionscript">All classes that don't declare an explicit base class extend the built-in Object class.</p>
 
 <p platform="javascript">All runtime classes in the Adobe Integrated Runtime extend the runtime.Object class.</p>
 
 <p platform="actionscript">You can use the Object class to create <i>associative arrays</i>. At its core, an associative array is an instance of the Object class, and each key-value pair is represented by a property and its value. Another reason to declare an associative array using the Object data type is that you can then use an object literal to populate your associative array (but only at the time you declare it). The following example creates an associative array using an object literal, accesses items using both the dot operator and the array access operator, and then adds a new key-value pair by creating a new property:</p>
 
 <codeblock platform="actionscript">
 var myAssocArray:Object = {fname:"John", lname:"Public"};
 trace(myAssocArray.fname);     // John
 trace(myAssocArray["lname"]);  // Public
 myAssocArray.initial = "Q";
 trace(myAssocArray.initial);   // Q</codeblock> 
 
 <p platform="actionscript">ActionScript 3.0 has two types of inheritance: class inheritance and prototype inheritance:</p>
 <ul platform="actionscript">
 <li>Class inheritance - is the primary inheritance mechanism and supports inheritance of fixed properties. A fixed property is a variable, constant or method declared as part of a class definition. Every class definition is now represented by a special class object that stores information about the class. </li>
 <li>Prototype inheritance - is the only inheritance mechanism in previous versions of ActionScript and serves as an alternate form of inheritance in ActionScript 3.0. Each class has an associated prototype object, and the properties of the prototype object are shared by all instances of the class. When a class instance is created, it has a reference to its class's prototype object, which serves as a link between the instance and its associated class prototype object. At run time, when a property is not found on a class instance, the delegate, which is the class prototype object, is checked for that property. If the prototype object does not contain the property, the process continues with the prototype object's delegate checking in consecutively higher levels in the hierarchy until Flash Player finds the property. </li>
 </ul>
 
 <p platform="actionscript">Both class inheritance and prototype inheritance can exist simultaneously, as shown in the following example:</p>
 
 <codeblock platform="actionscript">
 class A {
     var x = 1
     prototype.px = 2
 }
 dynamic class B extends A {
     var y = 3
     prototype.py = 4
 }
  
 var b = new B()
 b.x // 1 via class inheritance
 b.px // 2 via prototype inheritance from A.prototype
 b.y // 3
 b.py // 4 via prototype inheritance from B.prototype
  
 B.prototype.px = 5
 b.px // now 5 because B.prototype hides A.prototype
  
 b.px = 6
 b.px // now 6 because b hides B.prototype</codeblock>
 
 <p platform="actionscript">Using functions instead of classes, you can construct custom prototype inheritance trees. With classes, the prototype inheritance tree mirrors the class inheritance tree. However, since the prototype objects are dynamic, you can add and delete prototype-based properties at run time.</p>
 
 </apiDesc><example conref="examples\ObjectExample.as"> The following example uses the classes <codeph>ObjectExample</codeph> and <codeph>Circle</codeph>
 to demonstrate the dynamic nature of the Object class, and how value objects can be transformed into 
 Shape objects and then added to the stage at the specified x/y coordinates.
 
 <p>The example creates the value objects <codeph>firstInitObj</codeph> and <codeph>secondInitObj</codeph>. The custom
 class <codeph>Circle</codeph> accepts the value object and loops over it while setting its matching internal
 properties to those defined in the value object.</p>
<codeblock>
package {
    import flash.display.Sprite;

    public class ObjectExample extends Sprite {
        public function ObjectExample() {
            var firstInitObj:Object = new Object();
            firstInitObj.bgColor = 0xFF0000;
            firstInitObj.radius = 25;
            firstInitObj.xCenter = 25;
            firstInitObj.yCenter = 25;
                        
            var firstCircle:Circle = new Circle(firstInitObj);
            addChild(firstCircle);
            firstCircle.x = 50;
            firstCircle.y = 50;

            var secondInitObj:Object = {bgColor:0xCCCCCC, radius:50, xCenter:50, yCenter:50};

            var secondCircle:Circle = new Circle(secondInitObj);            
            addChild(secondCircle);
            secondCircle.x = 100;
            secondCircle.y = 100;
        }
        
    }
}

import flash.display.Shape;
    
class Circle extends Shape {
    public var bgColor:Number = 0xFFFFFF;
    public var radius:Number = 0;
    public var xCenter:Number = 0;
    public var yCenter:Number = 0;
        
    public function Circle(initObj:Object) {
        for(var i:String in initObj) {
            this[i] = initObj[i];
        }
        draw();
    }
        
    public function draw():void {
        graphics.beginFill(bgColor);
        graphics.drawCircle(xCenter, yCenter, radius);
        graphics.endFill();
    }
}
</codeblock></example></apiClassifierDetail><related-links><link href="#Object/prototype"><linktext>prototype</linktext></link></related-links><apiConstructor id="Object:Object"><apiName>Object</apiName><shortdesc>
	 Creates an Object object and stores a reference to the object's constructor method in the object's constructor property.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/></apiConstructorDef><apiDesc>
	 Creates an Object object and stores a reference to the object's constructor method in the object's <codeph>constructor</codeph> property.
	 
	 </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="Object:AS3:hasOwnProperty"><apiName>hasOwnProperty</apiName><shortdesc>
	 Indicates whether an object has a specified property defined.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><category>Method
	 </category></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>If the target object has the property specified by the <codeph>name</codeph> 
	 parameter this value is <codeph>true</codeph>, otherwise <codeph>false</codeph>.
	 
	 </apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn><apiParam><apiItemName>name</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The property of the object.	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Indicates whether an object has a specified property defined. This method returns <codeph>true</codeph> if the target object has
	 a property that matches the string specified by the <codeph>name</codeph> parameter, and <codeph>false</codeph> otherwise. 
	 The following types of properties cause this method to return <codeph>true</codeph> for objects that are instances of a class (as opposed to class objects):
	 <ul>
	   <li>Fixed instance properties—variables, constants, or methods defined by the object's class that are not static;</li>
	   <li>Inherited fixed instance properties—variables, constants, or methods inherited by the object's class;</li>
	   <li>Dynamic properties—properties added to an object after it is instantiated (outside of its class definition). To add dynamic properties, the object's defining class must be declared with the <codeph>dynamic</codeph> keyword.</li>
	 </ul>
	 <p>The following types of properties cause this method to return <codeph>false</codeph> for objects that are instances of a class:</p>
	 <ul>
	   <li>Static properties—variables, constants, or methods defined with the static keyword in an object's defining class or any of its superclasses;</li>
	   <li>Prototype properties—properties defined on a prototype object that is part of the object's prototype chain. In ActionScript 3.0, the prototype chain is not used for class inheritance, but still exists as an alternative form of inheritance. For example, an instance of the Array class can access the <codeph>valueOf()</codeph> method because it exists on <codeph>Object.prototype</codeph>, which is part of the prototype chain for the Array class. Although you can use <codeph>valueOf()</codeph> on an instance of Array, the return value of <codeph>hasOwnProperty("valueOf")</codeph> for that instance is <codeph>false</codeph>.</li>
	 </ul>
	 
	 <p platform="actionscript">ActionScript 3.0 also has class objects, which are direct representations of class definitions. 
	 When called on class objects, the <codeph>hasOwnProperty()</codeph> method returns <codeph>true</codeph> only if a property 
	 is a static property defined on that class object. For example, if you create a subclass of Array named 
	 CustomArray, and define a static property in CustomArray named <codeph>foo</codeph>, a call to 
	 <codeph>CustomArray.hasOwnProperty("foo")</codeph> returns <codeph>true</codeph>.
	 For the static property <codeph>DESCENDING</codeph> defined in the Array class, however, a call to 
	 <codeph>CustomArray.hasOwnProperty("DESCENDING")</codeph> returns <codeph>false</codeph>.</p>
	 
     <p platform="actionscript"><b>Note:</b> Methods of the Object class are dynamically created on Object's prototype. To redefine this method in a subclass of Object, do not use the <codeph>override</codeph> keyword. For example, A subclass of Object implements <codeph>function hasOwnProperty():Boolean</codeph> instead of using an override of the base class.</p>
     
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Object:AS3:isPrototypeOf"><apiName>isPrototypeOf</apiName><shortdesc>
	 Indicates whether an instance of the Object class is in the prototype chain of the object specified 
	 as the parameter.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>If the object is in the prototype chain of the object 
	 specified by the <codeph>theClass</codeph> parameter this value is <codeph>true</codeph>, otherwise <codeph>false</codeph>.
	 
	 </apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn><apiParam><apiItemName>theClass</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>The class to which the specified object may refer.  
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Indicates whether an instance of the Object class is in the prototype chain of the object specified 
	 as the parameter. This method returns <codeph>true</codeph> if the object is in the prototype chain of the 
	 object specified by the <codeph>theClass</codeph> parameter. The method returns <codeph>false</codeph> 
	 if the target object is absent from the prototype chain of the <codeph>theClass</codeph> object, 
	 and also if the <codeph>theClass</codeph> parameter is not an object.
	 
     <p platform="actionscript"><b>Note:</b> Methods of the Object class are dynamically created on Object's prototype. To redefine this method in a subclass of Object, do not use the <codeph>override</codeph> keyword. For example, A subclass of Object implements <codeph>function isPrototypeOf():Boolean</codeph> instead of using an override of the base class.</p>
     
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Object:AS3:propertyIsEnumerable"><apiName>propertyIsEnumerable</apiName><shortdesc>
	 Indicates whether the specified property exists and is enumerable.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><maelexample>The following example creates a generic object, adds a property to the object, then checks whether the object is enumerable. By way of contrast, the example also shows that a built-in property, the <code>Array.length</code> property, is not enumerable.
	 <listing>
	 var myObj:Object = new Object();
	 myObj.prop1 = "hello";
	 trace(myObj.propertyIsEnumerable("prop1")); // true
	 
	 var myArray = new Array();
	 trace(myArray.propertyIsEnumerable("length")); // false
	 </listing> 
	 
	 </maelexample></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>If the property specified by the <codeph>name</codeph> parameter is enumerable this value is <codeph>true</codeph>, otherwise <codeph>false</codeph>.
	 
	 </apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn><apiParam><apiItemName>name</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The property of the object.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Indicates whether the specified property exists and is enumerable. If <codeph>true</codeph>, then the property exists and 
	 can be enumerated in a <codeph>for..in</codeph> loop. The property must exist on the target object because this method does not 
	 check the target object's prototype chain.
	 
	 <p>Properties that you create are enumerable, but built-in properties are generally not enumerable.</p>
	 
     <p platform="actionscript"><b>Note:</b> Methods of the Object class are dynamically created on Object's prototype. To redefine this method in a subclass of Object, do not use the <codeph>override</codeph> keyword. For example, A subclass of Object implements <codeph>function propertyIsEnumerable():Boolean</codeph> instead of using an override of the base class.</p>
     
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Object:setPropertyIsEnumerable"><apiName>setPropertyIsEnumerable</apiName><shortdesc>
     Sets the availability of a dynamic property for loop operations.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>name</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The property of the object.
     </apiDesc></apiParam><apiParam><apiItemName>isEnum</apiItemName><apiOperationClassifier>Boolean</apiOperationClassifier><apiData>true</apiData><apiDesc> If set to <codeph>false</codeph>, the dynamic property does not show up in <codeph>for..in</codeph> loops, and the method <codeph>propertyIsEnumerable()</codeph> returns <codeph>false</codeph>. 
     </apiDesc></apiParam></apiOperationDef><apiDesc>
     Sets the availability of a dynamic property for loop operations. The property must exist on the target object because this method does not check the target object's prototype chain.
     </apiDesc></apiOperationDetail><related-links><link href="#Object/propertyIsEnumerable()"><linktext>propertyIsEnumerable()</linktext></link></related-links></apiOperation><apiOperation id="Object:toLocaleString"><apiName>toLocaleString</apiName><shortdesc>
	 Returns the string representation of this object, formatted according to locale-specific conventions.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>object, object.tolocalestring, tolocalestring
	 </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>A string representation of this object formatted according to local conventions.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the string representation of this object, formatted according to locale-specific conventions.
	 
	 <p>The default implementation of this method does not perform locale-specific formatting and returns the 
	 same string as <codeph>toString()</codeph>. Subclasses should provided their own locale-aware implementation when appropriate.</p>
	 
     <p platform="actionscript"><b>Note:</b> Methods of the Object class are dynamically created on Object's prototype. 
     To redefine this method in a subclass of Object, do not use the <codeph>override</codeph> keyword. For example, 
     a subclass of Object implements <codeph>function toLocaleString():String</codeph> instead of using an override of the base class.</p>
     
     </apiDesc></apiOperationDetail><related-links><link href="#Object/toString()"><linktext>Object.toString()</linktext></link></related-links></apiOperation><apiOperation id="Object:toString"><apiName>toString</apiName><shortdesc>
	 Returns the string representation of the specified object.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>object, object.tostring, tostring
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>A string representation of the object.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the string representation of the specified object.
	 
     <p platform="actionscript"><b>Note:</b> Methods of the Object class are dynamically created on Object's prototype. To redefine this method in a subclass of Object, do not use the <codeph>override</codeph> keyword. For example, a subclass of Object implements <codeph>function toString():String</codeph> instead of using an override of the base class.</p>
     
     </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Object:valueOf"><apiName>valueOf</apiName><shortdesc>
	 Returns the primitive value of the specified object.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>object, object.valueof, valueof
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>The primitive value of this object or the object itself.
	 
	 </apiDesc><apiOperationClassifier>Object</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the primitive value of the specified object. If this object
	 does not have a primitive value, the object itself is returned.
	 
     <p platform="actionscript"><b>Note:</b> Methods of the Object class are dynamically created on Object's prototype. To redefine this method in a subclass of Object, do not use the <codeph>override</codeph> keyword. For example, A subclass of Object implements <codeph>function valueOf():Object</codeph> instead of using an override of the base class.</p>
     
	 </apiDesc></apiOperationDetail><related-links><link href="#Object/toString()"><linktext>Object.toString()</linktext></link></related-links></apiOperation><apiValue id="Object:constructor"><apiName>constructor</apiName><shortdesc>
	 A reference to the class object or constructor function for a given object instance.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Object, Object.constructor, constructor
	  
	  </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueClassifier>Object</apiValueClassifier></apiValueDef><apiDesc>
	 A reference to the class object or constructor function for a given object instance. 
	 If an object is an instance of a class, the <codeph>constructor</codeph> 
	 property holds a reference to the class object. 
	 If an object is created with a constructor function, the <codeph>constructor</codeph>   
	 property holds a reference to the constructor function.
	 Do not confuse a constructor function with a constructor method of a class.
	 A constructor function is a Function object used to create objects, and is an
	 alternative to using the <codeph>class</codeph> keyword for defining classes.
	 
	 <p platform="actionscript">If you use the <codeph>class</codeph> keyword to define a class, the class's prototype object
	 is assigned a property named <codeph>constructor</codeph> that holds a reference to the class object.
	 An instance of the class inherits this property from the prototype object. For example,
	 the following code creates a new class, <codeph>A</codeph>, and a class instance named <codeph>myA</codeph>:</p>
	 <codeblock platform="actionscript" rev="3.0">
	 dynamic class A {}
	 trace(A.prototype.constructor);      // [class A]
	 trace(A.prototype.constructor == A); // true
	 var myA:A = new A();
	 trace(myA.constructor == A);         // true</codeblock>
	 
	 <p platform="actionscript">Advanced users may choose to use the <codeph>function</codeph> keyword instead of the <codeph>class</codeph>
	 keyword to define a Function object that can be used as a template for creating objects. Such a
	 function is called a constructor function because you can use it in conjunction with the <codeph>new</codeph>
	 operator to create objects. 
	 If you use the <codeph>function</codeph> keyword to create a constructor function, its prototype object is assigned
	 a property named <codeph>constructor</codeph> that holds a reference to the constructor function. 
	 If you then use the constructor function to create an object, the object inherits the  
	 <codeph>constructor</codeph> property from the constructor function's prototype object. For example,
	 the following code creates a new constructor function, <codeph>f</codeph>, and an object named <codeph>myF</codeph>:</p>
	 <codeblock platform="actionscript" rev="3.0">
	 function f() {}
	 trace(f.prototype.constructor);      // function Function() {}
	 trace(f.prototype.constructor == f); // true
	 var myF = new f();
	 trace(myF.constructor == f);         // true</codeblock>
	 
	 <p><b>Note</b>: The <codeph>constructor</codeph> property is writable, which means that user code can change
	 its value with an assignment statement. Changing the value of the <codeph>constructor</codeph> property is not 
	 recommended, but if you write code that depends on the value of the <codeph>constructor</codeph> property, you should
	 ensure that the value is not reset. The value can be changed only when the property is accessed through the prototype
	 object (for example, <codeph>className.prototype.constructor</codeph>).</p>
     <p>If you access the <codeph>constructor</codeph> property and compile in strict mode, you will get an error at compile
     time because the constructor property depends on the protoype object, which is a runtime entity.
     If you use standard mode or if the class description specifies "dynamic", the code runs without generating
     an error.</p>     
	 </apiDesc></apiValueDetail><related-links><link href="#Class"><linktext>Class</linktext></link><link href="#Function"><linktext>Function</linktext></link><link href="#Object/prototype"><linktext>prototype</linktext></link></related-links></apiValue><apiValue id="Object:prototype"><apiName>prototype</apiName><shortdesc>
	 A reference to the prototype object of a class or function object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><maelexample>The following example creates a class named Shape and a subclass of Shape named Circle.
	 <listing version="2.0">
	 // Shape class defined in external file named Shape.as
	 class Shape {
	 	function Shape() {}
	 }
	 
	 // Circle class defined in external file named Circle.as
	 class Circle extends Shape{
	 	function Circle() {}
	 }
	 </listing>
	 The Circle class can be used to create two instances of Circle:
	 <listing version="2.0">
	 var oneCircle:Circle = new Circle();
	 var twoCircle:Circle = new Circle();
	 </listing>
	 The following trace statement shows that the <code>prototype</code> property of the Circle class points to its superclass Shape. The identifier <code>Shape</code> refers to the constructor function of the Shape class.
	 <listing version="2.0">
	 trace(Circle.prototype.constructor == Shape); // true
	 </listing>
	 The following trace statement shows how you can use the <code>prototype</code> property and the <code>__proto__</code> property together to move two levels up the inheritance hierarchy (or prototype chain). The <code>Circle.prototype.__proto__</code> property contains a reference to the superclass of the Shape class.
	 <listing version="2.0">
	 trace(Circle.prototype.__proto__ == Shape.prototype); // true
	 </listing>
	 
	 
	 </maelexample></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiStatic/><apiValueClassifier>Object</apiValueClassifier></apiValueDef><apiDesc>
	 A reference to the prototype object of a class or function object. The <codeph>prototype</codeph> property 
	 is automatically created and attached to any class or function object that you create. This property is 
	 static in that it is specific to the class or function that you create. For example, if you create a  
	 class, the value of the <codeph>prototype</codeph> property is shared by all instances of the class and is
	 accessible only as a class property. Instances of your class cannot directly access 
	 the <codeph>prototype</codeph> property. 
	 
     <p>A class's prototype object is a special instance of that class that provides a mechanism for sharing state across all instances of a class. At run time, when a property is not found on a class instance, the delegate, which is the class prototype object, is checked for that property. If the prototype object does not contain the property, the process continues with the prototype object's delegate checking in consecutively higher levels in the hierarchy until 
	 <ph platform="actionscript">Flash Player or</ph> the Adobe Integrated Runtime finds the property. </p>
	 
     <p platform="actionscript"><i>Note:</i> In ActionScript 3.0, prototype inheritance is not the primary mechanism for inheritance. Class inheritance, which drives the inheritance of fixed properties in class definitions, is the primary inheritance mechanism in ActionScript 3.0.</p>
	 
	 </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="globalClassifier:SecurityError"><apiName>SecurityError</apiName><shortdesc>
 The SecurityError exception is thrown when some type of security violation 
 takes place.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Error, SecurityError
 
  
  </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/><apiBaseClassifier>Error</apiBaseClassifier></apiClassifierDef><apiDesc>
 The <codeph>SecurityError</codeph> exception is thrown when some type of security violation 
 takes place.
 <p>
 Examples of security errors:</p>
 <ul>
   <li>An unauthorized property access or method call is made across a security sandbox 
 boundary.</li>
   <li>An attempt was made to access a URL not permitted by the security sandbox.</li>
   <li>A socket connection was attempted to an unauthorized port number, e.g. a port above 
 65535.</li>
   <li>An attempt was made to access the user's camera or microphone, and the request to 
 access the device was denied by the user.</li>
 </ul>
 
 </apiDesc><example conref="examples\SecurityErrorExample.as"> The following example shows how a <codeph>SecurityError</codeph> error can 
 be generated and handled within a <codeph>try...catch</codeph> statement by attempting 
 to connect to a port number that is one larger than the maximum allowed.
<codeblock>
package {
    import flash.display.Sprite;
    import flash.net.Socket;

    public class SecurityErrorExample extends Sprite {

        public function SecurityErrorExample() {
            try {
                var host:String = "www.[yourDomain].com";
                var socket:Socket = new Socket();
                socket.connect(host, 65536);
            }
            catch(e:SecurityError) {
                trace(e);
            }
        }
    }
}
</codeblock></example></apiClassifierDetail><apiConstructor id="SecurityError:SecurityError"><apiName>SecurityError</apiName><shortdesc>
	 Creates a new SecurityError object.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>message</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiData></apiData></apiParam></apiConstructorDef><apiDesc>
	 Creates a new SecurityError object.
	  
	  </apiDesc></apiConstructorDetail></apiConstructor></apiClassifier><apiClassifier id="globalClassifier:ReferenceError"><apiName>ReferenceError</apiName><shortdesc>
 A ReferenceError exception is thrown when a reference to an undefined property is 
 attempted on a sealed (nondynamic) object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Error, ReferenceError
 </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/><apiBaseClassifier>Error</apiBaseClassifier></apiClassifierDef><apiDesc>
 A ReferenceError exception is thrown when a reference to an undefined property is 
 attempted on a sealed (nondynamic) object. References to undefined variables will 
 result in ReferenceError exceptions to inform you of potential bugs and help you troubleshoot
 application code.
 <p>However, you can refer to undefined properties of a dynamic class without causing a ReferenceError exception
 to be thrown. For more information, see the <codeph>dynamic</codeph> keyword.</p>
 
 </apiDesc><example conref="examples\ReferenceErrorExample.as"> The following example shows how a <codeph>ReferenceError</codeph> exception can 
 be generated and handled within a <codeph>try..catch</codeph> statement. 
<codeblock>
package {
    import flash.display.Sprite;

    public class ReferenceErrorExample extends Sprite {

        public function ReferenceErrorExample() {
            try {
                this["someMember"] = true;
            }
            catch(e:ReferenceError) {
                trace(e);
            }
        }
    }
}
</codeblock></example></apiClassifierDetail><related-links><link href="statements.html#dynamic"><linktext>dynamic keyword</linktext></link></related-links><apiConstructor id="ReferenceError:ReferenceError"><apiName>ReferenceError</apiName><shortdesc>
	 Creates a new ReferenceError object.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>message</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiData></apiData><apiDesc>Contains the message associated with the ReferenceError object.
	  
	  </apiDesc></apiParam></apiConstructorDef><apiDesc>
	 Creates a new ReferenceError object.
	 </apiDesc></apiConstructorDetail></apiConstructor></apiClassifier><apiClassifier id="globalClassifier:RangeError"><apiName>RangeError</apiName><shortdesc>
 A RangeError exception is thrown when a numeric value is outside the acceptable range.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Error, RangeError
  
  </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/><apiBaseClassifier>Error</apiBaseClassifier></apiClassifierDef><apiDesc>
 A RangeError exception is thrown when a numeric value is outside the acceptable range. When working with arrays,
 referring to an index position of an array item that does not exist will throw a RangeError exception. 
 Using <codeph>Number.toExponential()</codeph>, <codeph>Number.toPrecision()</codeph>, and <codeph>Number.toFixed()</codeph> methods
 will throw a RangeError exception in cases
 where the arguments are outside the acceptable range of numbers. You can extend <codeph>Number.toExponential()</codeph>,
 <codeph>Number.toPrecision()</codeph>, and <codeph>Number.toFixed()</codeph> to avoid throwing a RangeError.
 <p product="flash">Other situations that cause this exception to be thrown include the following:
 <ul>
   <li>Any Flash Player API that expects a depth number is invoked with an invalid depth 
 number.</li>
   <li>Any Flash Player API that expects a frame number is invoked with an invalid frame 
 number.</li>
   <li>Any Flash Player API that expects a layer number is invoked with an invalid layer 
 number.</li>
 </ul>
 </p>
 </apiDesc><example conref="examples\RangeErrorExample.as"> The following example shows how a <codeph>RangeError</codeph> exception can 
 be generated and handled within a <codeph>try..catch</codeph> statement. 
<codeblock>
package {
    import flash.display.Sprite;

    public class RangeErrorExample extends Sprite {

        public function RangeErrorExample() {
            var child:Sprite = new Sprite();
            try {
                addChildAt(child, 1);
            }
            catch(e:RangeError) {
                trace(e);
            }
        }
    }
}
</codeblock></example></apiClassifierDetail><related-links><link href="#Number/toExponential()"><linktext>Number.toExponential()</linktext></link><link href="#Number/toPrecision()"><linktext>Number.toPrecision()</linktext></link><link href="#Number/toFixed()"><linktext>Number.toFixed()</linktext></link></related-links><apiConstructor id="RangeError:RangeError"><apiName>RangeError</apiName><shortdesc>
	 Creates a new RangeError object.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>message</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiData></apiData><apiDesc>Contains the message associated with the RangeError object.
	  
	  </apiDesc></apiParam></apiConstructorDef><apiDesc>
	 Creates a new RangeError object.
	 </apiDesc></apiConstructorDetail><related-links><link href="#Number/toFixed()"><linktext>Number.toFixed()</linktext></link></related-links></apiConstructor></apiClassifier><apiClassifier id="globalClassifier:int"><apiName>int</apiName><shortdesc>
 The int class lets you work with the data type representing a 32-bit signed integer.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>int object, int, built-in class
  
  </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiFinal/><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
 The int class lets you work with the data type representing a 32-bit signed integer. 
 The range of values represented by the int class is -2,147,483,648 (-2^31) to 2,147,483,647 (2^31-1).
 <p>The constant properties of the int class, <codeph>MAX_VALUE</codeph> and <codeph>MIN_VALUE</codeph>, are static, which means that you don't need an object to use them, so you don't need to use the constructor. The methods, however, are not static, which means that you do need an object to use them. You can create an int object by using the int class constructor or by declaring a variable of type int and assigning the variable a literal value.</p>
 <p>The int data type is useful for loop counters and other situations where a floating point number is not needed, and is similar to the int data type in Java and C++. The default value of a variable typed as int is <codeph>0</codeph></p>
 <p>If you are working with numbers that exceed <codeph>int.MAX_VALUE</codeph>, consider using Number.  </p>
 <p>The following example calls the <codeph>toString()</codeph> method of the int class, which returns the string <codeph>1234</codeph>: </p>
 <codeblock rev="3.0">
 var myint:int = 1234;
 myint.toString();
 </codeblock>
 <p>The following example assigns the value of the <codeph>MIN_VALUE</codeph> property to a variable declared without the use of the constructor:</p>
 <pre>
 var smallest:int = int.MIN_VALUE;
 </pre> 
 
 </apiDesc><example conref="examples\IntExample.as"> The following example uses the <codeph>IntExample</codeph> class to show how 
 to work with and check the validity of int data types:
 <ol>
     <li>Two int variables <codeph>a</codeph> and <codeph>b</codeph> are declared in the constructor.</li>
     <li>The two ints are added using the method <codeph>addIntegers()</codeph>.</li>
     <li>A third int variable <codeph>c</codeph> is assigned the outcome of <codeph>parseInteger()</codeph>,
     which checks the validity of the string passed to it to ensure that it is an integer value
     in the acceptable range for int data types and returns an int equal to the integer value
     of the string if it is valid.</li>
     <li>The int variables <codeph>a</codeph> and <codeph>c</codeph> are added together using <codeph>addIntegers()</codeph>.</li>
 </ol>
<codeblock>
package {
    import flash.display.Sprite;

    public class IntExample extends Sprite {    
        public function IntExample() {
            var a:int = 512;
            var b:int = -128;
            
            trace(addIntegers(a, b)); // 384

            var c:int = parseInteger("32");
            
            trace(addIntegers(a, c)); // 544
        }
            
        public function addIntegers(a:int, b:int):int {
            return a + b;
        }
        
        public function parseInteger(str:String):int {
            var num:Number = parseInt(str);
            if(!isNaN(num) &amp;&amp; num &lt;= int.MAX_VALUE &amp;&amp; num &gt;= int.MIN_VALUE) {
                return int(num);
            }
            
            return 0;
        }
        
    }
}
</codeblock></example></apiClassifierDetail><related-links><link href="uint.html"><linktext>uint</linktext></link><link href="Number.html"><linktext>Number</linktext></link></related-links><apiConstructor id="int:int"><apiName>int</apiName><shortdesc>
	 Constructor; creates a new int object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>new number, constructor
	  
	  </keyword></asCustoms></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>num</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>The numeric value of the int object being created or a value to be converted to a number. The default value is 0 if <codeph>value</codeph> is not provided.
	 
	 </apiDesc></apiParam></apiConstructorDef><apiDesc>
	 Constructor; creates a new int object. You must use the int constructor when using <codeph>int.toString()</codeph> and <codeph>int.valueOf()</codeph>. You do not use a constructor when using the properties of an int object. The <codeph>new int</codeph> constructor is primarily used as a placeholder. An int object is not the same as the <codeph>int()</codeph> function that converts a parameter to a primitive value.
	 
 	 </apiDesc><example>The following code constructs new int objects:
	 <pre>
	 var n1:int = new int(3.4);
	 var n2:int = new int(-10);
	 </pre>
	 
	 
	 </example></apiConstructorDetail><related-links><link href="#int/toString()"><linktext>int.toString()</linktext></link><link href="#int/valueOf()"><linktext>int.valueOf()</linktext></link></related-links></apiConstructor><apiOperation id="int:AS3:toExponential"><apiName>toExponential</apiName><shortdesc>
      Returns a string representation of the number in exponential notation.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiException><apiDesc>Throws an exception if the <codeph>fractionDigits</codeph> argument is outside the range 0 to 20.
	  </apiDesc><apiItemName>RangeError</apiItemName><apiOperationClassifier>RangeError</apiOperationClassifier></apiException><apiReturn><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>fractionDigits</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiDesc>An integer between 0 and 20, inclusive, that represents the desired number of decimal places.
      </apiDesc></apiParam></apiOperationDef><apiDesc>
      Returns a string representation of the number in exponential notation. The string contains
      one digit before the decimal point and up to 20 digits after the decimal point, as
      specified by the <codeph>fractionDigits</codeph> parameter.
      </apiDesc><example conref="examples\Number.toExponential.1.as"> The following example shows how <codeph>toExponential(2)</codeph> returns a string in
 exponential notation.
<codeblock>

var num:Number = 315003;
trace(num.toExponential(2)); // 3.15e+5

</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="int:AS3:toFixed"><apiName>toFixed</apiName><shortdesc>
     Returns a string representation of the number in fixed-point notation.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiException><apiDesc>Throws an exception if the <codeph>fractionDigits</codeph> argument is outside the range 0 to 20.
	 </apiDesc><apiItemName>RangeError</apiItemName><apiOperationClassifier>RangeError</apiOperationClassifier></apiException><apiReturn><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>fractionDigits</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiDesc>An integer between 0 and 20, inclusive, that represents the desired number of decimal places.
     </apiDesc></apiParam></apiOperationDef><apiDesc>
     Returns a string representation of the number in fixed-point notation. 
     Fixed-point notation means that the string will contain a specific number of digits 
     after the decimal point, as specified in the <codeph>fractionDigits</codeph> parameter.
     The valid range for the <codeph>fractionDigits</codeph> parameter is from 0 to 20. 
     Specifying a value outside this range throws an exception.
     
     </apiDesc><example conref="examples\Number.toFixed.1.as"> The following example shows how <codeph>toFixed(3)</codeph> returns a string that rounds
 to three decimal places.
<codeblock>

var num:Number = 7.31343;
trace(num.toFixed(3)); // 7.313
</codeblock></example><example conref="examples\Number.toFixed.2.as"> The following example shows how <codeph>toFixed(2)</codeph> returns a string that adds
 trailing zeroes.
<codeblock>

var num:Number = 4;
trace(num.toFixed(2)); // 4.00
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="int:AS3:toPrecision"><apiName>toPrecision</apiName><shortdesc>
      Returns a string representation of the number either in exponential notation or in
      fixed-point notation.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiException><apiDesc>Throws an exception if the <codeph>precision</codeph> argument is outside the range 1 to 21.
	  </apiDesc><apiItemName>RangeError</apiItemName><apiOperationClassifier>RangeError</apiOperationClassifier></apiException><apiReturn><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>precision</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiDesc>An integer between 1 and 21, inclusive, that represents the desired number of digits to represent in the resulting string.
      </apiDesc></apiParam></apiOperationDef><apiDesc>
      Returns a string representation of the number either in exponential notation or in
      fixed-point notation. The string will contain the number of digits specified in the
      <codeph>precision</codeph> parameter.
      </apiDesc><example conref="examples\Number.toPrecision.1.as"> The following example shows how <codeph>toPrecision(3)</codeph> returns a string with
 only three digits. The string is in fixed-point notation because exponential notation is not required.
<codeblock>

var num:Number = 31.570;
trace(num.toPrecision(3)); // 31.6
</codeblock></example><example conref="examples\Number.toPrecision.2.as"> The following example shows how <codeph>toPrecision(3)</codeph> returns a string with
 only three digits. The string is in exponential notation because the resulting number does not
 contain enough digits for fixed-point notation.
<codeblock>

var num:Number = 4000;
trace(num.toPrecision(3)); // 4.00e+3
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="int:AS3:toString"><apiName>toString</apiName><shortdesc>
	 Returns the string representation of an int object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>number, number.tostring, tostring
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A string.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>radix</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiDesc>Specifies the numeric base (from 2 to 36) to use for the number-to-string conversion. If you do not specify the <codeph>radix</codeph> parameter, the default value is 10.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Returns the string representation of an <codeph>int</codeph> object.
	 
	 </apiDesc><example>The following example uses 2 and 8 for the <codeph>radix</codeph> parameter and returns a string that contains the corresponding representation of the number 9:
	 <pre>
	 var myint:int = new int(9);
	 trace(myint.toString(2)); // 1001
	 trace(myint.toString(8)); // 11
	 </pre>
	 <p>The following example results in a hexadecimal value.</p>
	 <pre>
	 var r:int = new int(250);
	 var g:int = new int(128);
	 var b:int = new int(114);
	 var rgb:String = "0x"+ r.toString(16)+g.toString(16)+b.toString(16);
	 trace(rgb); // 0xfa8072
	 </pre>
	 
	 </example></apiOperationDetail></apiOperation><apiOperation id="int:AS3:valueOf"><apiName>valueOf</apiName><shortdesc>
	 Returns the primitive value of the specified int object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>number, number.valueof, valueof, value of
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An int value.
	 
	 </apiDesc><apiOperationClassifier>int</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the primitive value of the specified int object.
	 
 	 </apiDesc><example>The following example results in the primative value of the <codeph>numSocks</codeph> object.
	 <pre>
	 var numSocks:int = new int(2);
	 trace(numSocks.valueOf()); // 2
	 </pre>
	 
	 </example></apiOperationDetail></apiOperation><apiValue id="int:MAX_VALUE"><apiName>MAX_VALUE</apiName><shortdesc> 
	The largest representable 32-bit signed integer, which is 2,147,483,647.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>int, int.max_value, max_value, max value
	 
	 </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>2147483647</apiData><apiValueClassifier>int</apiValueClassifier></apiValueDef><apiDesc> 
	The largest representable 32-bit signed integer, which is 2,147,483,647.
	
    </apiDesc><example>The following ActionScript <ph outputclass="flashonly">displays</ph><ph outputclass="flexonly">writes</ph> the largest and smallest representable int objects <ph outputclass="flashonly">to the Output panel</ph><ph outputclass="flexonly">to the log file</ph>:
	<pre>
	trace("int.MIN_VALUE = "+int.MIN_VALUE);
	trace("int.MAX_VALUE = "+int.MAX_VALUE);
	</pre>
	<p>This code <ph outputclass="flexonly">logs</ph><ph outputclass="flashonly">displays</ph> the following values:</p>
	<pre>
	int.MIN_VALUE = -2147483648
	int.MAX_VALUE = 2147483647
	</pre>
	
	
	</example></apiValueDetail></apiValue><apiValue id="int:MIN_VALUE"><apiName>MIN_VALUE</apiName><shortdesc>
	 The smallest representable 32-bit signed integer, which is -2,147,483,648.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>int, int.min_value, min_value, min value
      
      </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>-2147483648</apiData><apiValueClassifier>int</apiValueClassifier></apiValueDef><apiDesc>
	 The smallest representable 32-bit signed integer, which is -2,147,483,648.
	 
 	 </apiDesc><example>The following ActionScript <ph outputclass="flashonly">displays</ph><ph outputclass="flexonly">writes</ph> the largest and smallest representable int objects<ph outputclass="flashonly"> to the Output panel</ph><ph outputclass="flexonly"> to the log file</ph>:
     <pre>
     trace("int.MIN_VALUE = "+int.MIN_VALUE);
     trace("int.MAX_VALUE = "+int.MAX_VALUE);
     </pre>
     <p>This code <ph outputclass="flexonly">logs</ph><ph outputclass="flashonly">displays</ph> the following values:</p>
     <pre>
	int.MIN_VALUE = -2147483648
	int.MAX_VALUE = 2147483647
     </pre>
     
     
     </example></apiValueDetail></apiValue></apiClassifier><apiClassifier id="globalClassifier:Number"><apiName>Number</apiName><shortdesc>
 A data type representing an IEEE-754 double-precision floating-point number.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>number object, number, built-in class
  
  </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiFinal/><apiTipTexts><apiTipText>The Number class is a simple wrapper object for the <codeph>Number</codeph> 
 data type.
 
 </apiTipText></apiTipTexts><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
 A data type representing an IEEE-754 double-precision floating-point number. You can manipulate primitive numeric 
 values by using the methods and properties associated with the Number class. This class is identical to the 
 JavaScript Number class.
 <p>The properties of the Number class are static, which means you do not need an object to use them, so you 
 do not need to use the constructor.</p>
 <p>The Number data type adheres to the double-precision IEEE-754 standard. </p>
 <p>The Number data type is useful when you need to use floating-point values.
 Flash Player handles int and uint data types more efficiently than Number, but Number is 
 useful in situations where the range of values required exceeds the valid range 
 of the int and uint data types. The Number class can be used to
 represent integer values well beyond the valid range of the int and uint data types.
 The Number data type can use up to 53 bits to represent integer values, compared to
 the 32 bits available to int and uint. The default value of a variable typed as Number is <codeph>NaN</codeph> (Not a Number).</p>
 
 </apiDesc><example conref="examples\NumberExample.as"> The following example shows how a number with six digits after the decimal place 
 is truncated (with rounding) to a number with two digits after the decimal point.
<codeblock>

package {
    import flash.display.Sprite;

    public class NumberExample extends Sprite {
        public function NumberExample() {
            var num:Number = new Number(10.456345);
            var str:String = num.toFixed(2);
            trace(num); // 10.456345
            trace(str); // 10.46
        }
    }
}
</codeblock></example></apiClassifierDetail><related-links><link href="int.html"><linktext>int</linktext></link><link href="uint.html"><linktext>uint</linktext></link></related-links><apiConstructor id="Number:Number"><apiName>Number</apiName><shortdesc>
  Creates a Number object with the specified value.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>new number, constructor
   
   </keyword></asCustoms></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>num</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>The numeric value of the Number instance being created or a value 
  to be converted to a Number. The default value is 0 if <codeph>num</codeph> is 
  not specified. Using the constructor without specifying a <codeph>num</codeph> parameter is not
  the same as declaring a variable of type Number with no value assigned (such as <codeph>var myNumber:Number</codeph>), which 
  defaults to <codeph>NaN</codeph>. A number with no value assigned is undefined and the equivalent of 
  <codeph>new Number(undefined)</codeph>.
  
  </apiDesc></apiParam><apiTipTexts><apiTipText>Creates a Number with the specified value.
  
  </apiTipText></apiTipTexts></apiConstructorDef><apiDesc>
  Creates a Number object with the specified value. This constructor has the same effect
  as the <codeph>Number()</codeph> public native function that converts an object of a different type
  to a primitive numeric value.
  
  </apiDesc></apiConstructorDetail><related-links><link href="#Number/toString()"><linktext>Number.toString()</linktext></link><link href="#Number/valueOf()"><linktext>Number.valueOf()</linktext></link></related-links></apiConstructor><apiOperation id="Number:AS3:toExponential"><apiName>toExponential</apiName><shortdesc>
	  Returns a string representation of the number in exponential notation.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiException><apiDesc>Throws an exception if the <codeph>fractionDigits</codeph> argument is outside the range 0 to 20.
	  </apiDesc><apiItemName>RangeError</apiItemName><apiOperationClassifier>RangeError</apiOperationClassifier></apiException><apiReturn><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>fractionDigits</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiDesc>An integer between 0 and 20, inclusive, that represents the desired number of decimal places.
      </apiDesc></apiParam></apiOperationDef><apiDesc>
	  Returns a string representation of the number in exponential notation. The string contains
	  one digit before the decimal point and up to 20 digits after the decimal point, as
	  specified by the <codeph>fractionDigits</codeph> parameter.
	  </apiDesc><example conref="examples\Number.toExponential.1.as"> The following example shows how <codeph>toExponential(2)</codeph> returns a string in
 exponential notation.
<codeblock>

var num:Number = 315003;
trace(num.toExponential(2)); // 3.15e+5

</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Number:AS3:toFixed"><apiName>toFixed</apiName><shortdesc>
	 Returns a string representation of the number in fixed-point notation.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiException><apiDesc>Throws an exception if the <codeph>fractionDigits</codeph> argument is outside the range 0 to 20.
	 </apiDesc><apiItemName>RangeError</apiItemName><apiOperationClassifier>RangeError</apiOperationClassifier></apiException><apiReturn><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>fractionDigits</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiDesc>An integer between 0 and 20, inclusive, that represents the desired number of decimal places.
     </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Returns a string representation of the number in fixed-point notation. 
	 Fixed-point notation means that the string will contain a specific number of digits 
	 after the decimal point, as specified in the <codeph>fractionDigits</codeph> parameter.
	 The valid range for the <codeph>fractionDigits</codeph> parameter is from 0 to 20. 
	 Specifying a value outside this range throws an exception.
	 
	 </apiDesc><example conref="examples\Number.toFixed.1.as"> The following example shows how <codeph>toFixed(3)</codeph> returns a string that rounds
 to three decimal places.
<codeblock>

var num:Number = 7.31343;
trace(num.toFixed(3)); // 7.313
</codeblock></example><example conref="examples\Number.toFixed.2.as"> The following example shows how <codeph>toFixed(2)</codeph> returns a string that adds
 trailing zeroes.
<codeblock>

var num:Number = 4;
trace(num.toFixed(2)); // 4.00
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Number:AS3:toPrecision"><apiName>toPrecision</apiName><shortdesc>
	  Returns a string representation of the number either in exponential notation or in
	  fixed-point notation.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiException><apiDesc>Throws an exception if the <codeph>precision</codeph> argument is outside the range 1 to 21.
	  </apiDesc><apiItemName>RangeError</apiItemName><apiOperationClassifier>RangeError</apiOperationClassifier></apiException><apiReturn><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>precision</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiDesc>An integer between 1 and 21, inclusive, that represents the desired number of digits to represent in the resulting string.
      </apiDesc></apiParam></apiOperationDef><apiDesc>
	  Returns a string representation of the number either in exponential notation or in
	  fixed-point notation. The string will contain the number of digits specified in the
	  <codeph>precision</codeph> parameter.
	  </apiDesc><example conref="examples\Number.toPrecision.1.as"> The following example shows how <codeph>toPrecision(3)</codeph> returns a string with
 only three digits. The string is in fixed-point notation because exponential notation is not required.
<codeblock>

var num:Number = 31.570;
trace(num.toPrecision(3)); // 31.6
</codeblock></example><example conref="examples\Number.toPrecision.2.as"> The following example shows how <codeph>toPrecision(3)</codeph> returns a string with
 only three digits. The string is in exponential notation because the resulting number does not
 contain enough digits for fixed-point notation.
<codeblock>

var num:Number = 4000;
trace(num.toPrecision(3)); // 4.00e+3
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="Number:AS3:toString"><apiName>toString</apiName><shortdesc>
 Returns the string representation of the specified Number object (myNumber).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>number, number.tostring, tostring
  
  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The numeric representation of the Number object as a string.
 
 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>radix</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>10</apiData><apiDesc>Specifies the numeric base (from 2 to 36) to use for the number-to-string 
 conversion. If you do not specify the <codeph>radix</codeph> parameter, the default value 
 is 10.
 
 </apiDesc></apiParam><apiTipTexts><apiTipText>Returns the string representation of this Number using the specified 
 radix parameter as the numeric base.
 
 </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
 Returns the string representation of the specified Number object (<codeph><i>myNumber</i></codeph>).
 If the value of the Number object is a decimal number without a leading zero (such as <codeph>.4</codeph>),
 <codeph>Number.toString()</codeph> adds a leading zero (<codeph>0.4</codeph>).
 
 
 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Number:AS3:valueOf"><apiName>valueOf</apiName><shortdesc>
 Returns the primitive value type of the specified Number object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>number, number.valueof, valueof, value of
  
  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The primitive type value of the Number object.
 
 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiTipTexts><apiTipText>Returns the primitive value type of the specified Number object.
 
 </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
 Returns the primitive value type of the specified Number object.
 
 </apiDesc></apiOperationDetail></apiOperation><apiValue id="Number:MAX_VALUE"><apiName>MAX_VALUE</apiName><shortdesc>
  The largest representable number (double-precision IEEE-754).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>number, number.max_value, max_value, max value
   
   </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiValueClassifier>Number</apiValueClassifier><apiTipTexts><apiTipText>The largest representable number (double-precision IEEE-754).
  
  </apiTipText></apiTipTexts></apiValueDef><apiDesc>
  The largest representable number (double-precision IEEE-754). This number is 
  approximately 1.79e+308.
  
  </apiDesc></apiValueDetail></apiValue><apiValue id="Number:MIN_VALUE"><apiName>MIN_VALUE</apiName><shortdesc>
  The smallest representable non-negative, non-zero, number (double-precision IEEE-754).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>number, number.min_value, min_value, min value
   
   </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiValueClassifier>Number</apiValueClassifier><apiTipTexts><apiTipText>The smallest representable number (double-precision IEEE-754).
  
  </apiTipText></apiTipTexts></apiValueDef><apiDesc>
  The smallest representable non-negative, non-zero, number (double-precision IEEE-754). This number is 
  approximately 5e-324. The smallest representable number overall is actually <codeph>-Number.MAX_VALUE</codeph>.
  
  </apiDesc></apiValueDetail></apiValue><apiValue id="Number:NEGATIVE_INFINITY"><apiName>NEGATIVE_INFINITY</apiName><shortdesc>
  Specifies the IEEE-754 value representing negative infinity.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>number, number.negative_infinity, negative_infinity, negative infinity, infinity
   
   </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiValueClassifier>Number</apiValueClassifier><apiTipTexts><apiTipText>Specifies the IEEE-754 value representing negative infinity.
  
  </apiTipText></apiTipTexts></apiValueDef><apiDesc>
  Specifies the IEEE-754 value representing negative infinity. The value of this property 
  is the same as that of the constant <codeph>-Infinity</codeph>.
  <p>
  Negative infinity is a special numeric value that is returned when a mathematical 
  operation or function returns a negative value larger than can be 
  represented.
  </p>
  
  </apiDesc></apiValueDetail></apiValue><apiValue id="Number:NaN"><apiName>NaN</apiName><shortdesc>
  The IEEE-754 value representing Not a Number (NaN).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>number, number.nan, nan, not a number
   
   </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiValueClassifier>Number</apiValueClassifier><apiTipTexts><apiTipText>The IEEE-754 value representing Not a Number (NaN).
  
  </apiTipText></apiTipTexts></apiValueDef><apiDesc>
  The IEEE-754 value representing Not a Number (<codeph>NaN</codeph>).
  
  </apiDesc></apiValueDetail><related-links><link href="package.html#isNaN()"><linktext>isNaN()</linktext></link></related-links></apiValue><apiValue id="Number:POSITIVE_INFINITY"><apiName>POSITIVE_INFINITY</apiName><shortdesc>
  Specifies the IEEE-754 value representing positive infinity.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>number, number.positive_infinity, positive_infinity, positive infinity, infinity
   
   </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiValueClassifier>Number</apiValueClassifier><apiTipTexts><apiTipText>Specifies the IEEE-754 value representing positive infinity.
  
  </apiTipText></apiTipTexts></apiValueDef><apiDesc>
  Specifies the IEEE-754 value representing positive infinity. The value of this property 
  is the same as that of the constant <codeph>Infinity</codeph>.
  <p>
  Positive infinity is a special numeric value that is returned when a mathematical 
  operation or function returns a value larger than can be represented.
  </p>
  
  </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="globalClassifier:DefinitionError"><apiName>DefinitionError</apiName><shortdesc>
 The DefinitionError class represents an error that occurs when user code
 attempts to define an identifier that is already defined.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><helpid>
  
  </helpid></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/><apiTipTexts><apiTipText>An DefinitionError is thrown when code attempts to redefine a class,
 interface, or function.
 
 </apiTipText></apiTipTexts><apiBaseClassifier>Error</apiBaseClassifier></apiClassifierDef><apiDesc>
 The DefinitionError class represents an error that occurs when user code
 attempts to define an identifier that is already defined. This error commonly
 occurs in redefining classes, interfaces,  
 and functions.
 
 </apiDesc></apiClassifierDetail><apiConstructor id="DefinitionError:DefinitionError"><apiName>DefinitionError</apiName><shortdesc>
	 Creates a new DefinitionError object.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>message</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiData></apiData></apiParam></apiConstructorDef><apiDesc>
	 Creates a new DefinitionError object.
	  
	  </apiDesc></apiConstructorDetail></apiConstructor></apiClassifier><apiClassifier id="globalClassifier:Function"><apiName>Function</apiName><shortdesc>
 A function is the basic unit of code that can be invoked in ActionScript.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Function, Function object, built-in class
  
  </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/><apiTipTexts><apiTipText>The Function class is used to represent a built-in or user-defined function.
 
 </apiTipText></apiTipTexts><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
 A function is the basic unit of code that can be invoked in ActionScript.
 Both user-defined and built-in functions in ActionScript are represented by Function objects, 
 which are instances of the Function class.
 <p>Methods of a class are slightly different than Function objects. Unlike an ordinary function object, a method is tightly linked to its associated class object. Therefore, a method or property has a definition that is shared among all instances of the same class. Methods can be extracted from an instance and treated as "bound" methods (retaining the link to the original instance). For a bound method, the <codeph>this</codeph> keyword points to the original object that implemented the method. For a function, <codeph>this</codeph> points to the associated object at the time the function is invoked.</p>
 
 
 </apiDesc><example conref="examples\FunctionExample.as"> The following example uses the <codeph>FunctionExample</codeph>,
 <codeph>SimpleCollection</codeph>, <codeph>EventBroadcaster</codeph>, and <codeph>EventListener</codeph> classes
 to show various uses of functions in ActionScript.  This is accomplished with the following steps:
 <ol>
    <li>The constructor for <codeph>FunctionExample</codeph> creates a local variable named 
     <codeph>simpleColl</codeph>, which is populated with an array of integers ranging from <codeph>1</codeph> to
     <codeph>8</codeph>. </li>
    <li>The <codeph>simpleColl</codeph> object is printed using <codeph>trace()</codeph>.</li>
  <li>An EventListener object, <codeph>listener</codeph>, is added to <codeph>simpleColl</codeph>.</li>
  <li>When the <codeph>insert()</codeph> and <codeph>remove()</codeph> functions are called, the listener responds
  to their events.</li>
    <li>A second SimpleCollection object is created named <codeph>greaterThanFourColl</codeph>.</li>
    <li>The <codeph>greaterThanFourColl</codeph> object is assigned the result of <codeph>simpleColl.select()</codeph>
     with the argument <codeph>4</codeph> and an anonymous function. The SimpleCollection object's select method is an 
    internal iterator that uses the anonymous function parameter as a block.</li>
 </ol>
<codeblock>
package {
    import flash.display.Sprite;
    
    public class FunctionExample extends Sprite {
        public function FunctionExample() {
            var simpleColl:SimpleCollection;
            simpleColl = new SimpleCollection(0, 1, 2, 3, 4, 5, 6, 7, 8);
            trace(simpleColl);        // 0, 1, 2, 3, 4, 5, 6, 7, 8

            var listener:EventListener = new EventListener();
            simpleColl.addListener(listener);
            simpleColl.insert(9);        // itemInsertedHandler: 9
            simpleColl.remove(8);        // itemRemovedHandler: 8
            trace(simpleColl);        // 0, 1, 2, 3, 4, 5, 6, 7, 9

            var greaterThanFourColl:SimpleCollection;
            greaterThanFourColl = simpleColl.select(4, function(item:int, value:int){ return item &gt; value });
            trace(greaterThanFourColl);    // 5, 6, 7, 9
        }
    }
}
    
import flash.display.Sprite;
    
class EventBroadcaster {
    private var listeners:Array;

    public function EventBroadcaster() {
        listeners = new Array();
    }
        
    public function addListener(obj:Object):void {
        removeListener(obj);
        listeners.push(obj);
    }
        
    public function removeListener(obj:Object):void {
        for(var i:uint = 0; i &lt; listeners.length; i++) {
            if(listeners[i] == obj) {
                listeners.splice(i, 1);
            }
        }
    }
    
    public function broadcastEvent(evnt:String, ...args):void {
        for(var i:uint = 0; i &lt; listeners.length; i++) {
            listeners[i][evnt].apply(listeners[i], args);
        }
    }    
}
    
class SimpleCollection extends EventBroadcaster {
    private var arr:Array;
        public function SimpleCollection(... args) {
        arr = (args.length == 1 &amp;&amp; !isNaN(args[0])) ? new Array(args[0]) : args;
    }
        
    public function insert(obj:Object):void {
        remove(obj);
        arr.push(obj);
        broadcastEvent("itemInsertedHandler", obj);
    }
        
    public function remove(obj:Object):void {
        for(var i:uint = 0; i &lt; arr.length; i++) {
            if(arr[i] == obj) {
                var obj:Object = arr.splice(i, 1)[0];
                broadcastEvent("itemRemovedHandler", obj);
            }
        }
    }

    public function select(val:int, fn:Function):SimpleCollection {
        var col:SimpleCollection = new SimpleCollection();
        for(var i:uint = 0; i &lt; arr.length; i++) {
            if(fn.call(this, arr[i], val)) {
                col.insert(arr[i]);
            }
        }
        return col;
    }
        
    public function toString():String {
        var str:String = new String();
        for(var i:uint = 0; i &lt; arr.length - 1; i++) {
            str += arr[i] + ", ";
        }
        str += arr[arr.length - 1];
        return str;
    }
}

class EventListener {
    public function EventListener() {
    }
    
    public function itemInsertedHandler(obj:Object):void {
        trace("itemInsertedHandler: " + obj);
    }
    
    public function itemRemovedHandler(obj:Object):void {
        trace("itemRemovedHandler: " + obj);        
    }
}
</codeblock></example></apiClassifierDetail><apiOperation id="Function:AS3:apply"><apiName>apply</apiName><shortdesc>
  Specifies the value of thisObject to be used within any function that ActionScript calls.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Function, Function.apply, apply
  
  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>Any value that the called function specifies.
  
  
  </apiDesc><apiType value="any"/></apiReturn><apiParam><apiItemName>thisArg</apiItemName><apiType value=""/><apiData>unknown</apiData><apiDesc>The object to which the function is applied.
  
  </apiDesc></apiParam><apiParam><apiItemName>argArray</apiItemName><apiType value=""/><apiData>unknown</apiData><apiDesc>An array whose elements are passed to the function as parameters.
  
  </apiDesc></apiParam><apiTipTexts><apiTipText>Specifies the object instance on which the Function is called.
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Specifies the value of <codeph>thisObject</codeph> to be used within any function that ActionScript calls. 
  This method also specifies the parameters to be passed to any called function. Because <codeph>apply()</codeph> 
  is a method of the Function class, it is also a method of every Function object in ActionScript. 
  <p>The parameters are specified as an Array object, unlike <codeph>Function.call()</codeph>, which specifies 
  parameters as a comma-delimited list. This is often useful when the number of parameters to be passed is not
  known until the script actually executes.</p>
  <p>Returns the value that the called function specifies as the return value.</p>

  
  </apiDesc></apiOperationDetail><related-links><link href="#Function/call()"><linktext>Function.call()</linktext></link></related-links></apiOperation><apiOperation id="Function:AS3:call"><apiName>call</apiName><shortdesc>
  Invokes the function represented by a Function object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Function, Function.call, call
  
  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiType value="any"/></apiReturn><apiParam><apiItemName>thisArg</apiItemName><apiType value=""/><apiData>unknown</apiData><apiDesc>An object that specifies the value of <codeph>thisObject</codeph> within the function body.
  
  </apiDesc></apiParam><apiParam><apiItemName>args</apiItemName><apiType value="restParam"/><apiDesc>The parameter or parameters to be passed to the function. You can specify zero or more parameters.
  
  </apiDesc></apiParam><apiTipTexts><apiTipText>Invokes this Function. 
  
  </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
  Invokes the function represented by a Function object. Every function in ActionScript 
  is represented by a Function object, so all functions support this method. 
  <p>In almost all cases, the function call (<codeph>()</codeph>) operator can be used instead of this method. 
  The function call operator produces code that is concise and readable. This method is primarily useful 
  when the <codeph>thisObject</codeph> parameter of the function invocation needs to be explicitly controlled. 
  Normally, if a function is invoked as a method of an object within the body of the function, <codeph>thisObject</codeph> 
  is set to <codeph>myObject</codeph>, as shown in the following example:</p>
  <codeblock>
  myObject.myMethod(1, 2, 3);
  </codeblock>
  <p>In some situations, you might want <codeph>thisObject</codeph> to point somewhere else; 
  for example, if a function must be invoked as a method of an object, but is not actually stored as a method 
  of that object:</p>
  <codeblock>
  myObject.myMethod.call(myOtherObject, 1, 2, 3); 
  </codeblock>
  <p>You can pass the value <codeph>null</codeph> for the <codeph>thisObject</codeph> parameter to invoke a function as a 
  regular function and not as a method of an object. For example, the following function invocations are equivalent:</p>
  <codeblock>
  Math.sin(Math.PI / 4)
  Math.sin.call(null, Math.PI / 4)
  </codeblock>
  
  <p>Returns the value that the called function specifies as the return value.</p>
  
  </apiDesc></apiOperationDetail><related-links><link href="#Function/apply()"><linktext>Function.apply()</linktext></link></related-links></apiOperation></apiClassifier><apiClassifier id="globalClassifier:SyntaxError"><apiName>SyntaxError</apiName><shortdesc>
 A SyntaxError exception is thrown when a parsing error occurs, for one of the following reasons:.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Error, SyntaxError
  
  </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/><apiBaseClassifier>Error</apiBaseClassifier></apiClassifierDef><apiDesc>
 A SyntaxError exception is thrown when a parsing error occurs, for one of the following reasons:. 
 <ul>
   <li>An invalid regular expression is parsed by the RegExp class.</li>
   <li>Invalid XML content is parsed by the XML class.</li>
 </ul>
 
 </apiDesc></apiClassifierDetail><related-links><link href="#RegExp"><linktext>RegExp class</linktext></link><link href="#XML"><linktext>XML class</linktext></link></related-links><apiConstructor id="SyntaxError:SyntaxError"><apiName>SyntaxError</apiName><shortdesc>
	 Creates a new SyntaxError object.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>message</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiData></apiData><apiDesc>Contains the message associated with the SyntaxError object. 
	  
	  </apiDesc></apiParam></apiConstructorDef><apiDesc>
	 Creates a new SyntaxError object.
     </apiDesc></apiConstructorDetail></apiConstructor></apiClassifier><apiClassifier id="globalClassifier:Boolean"><apiName>Boolean</apiName><shortdesc>
A Boolean object is a data type that can have one of two values, either true or false,  
used for logical operations.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><refpath>Objects/Core/Boolean/
 
 </refpath></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiFinal/><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
A Boolean object is a data type that can have one of two values, either <codeph>true</codeph> or <codeph>false</codeph>,  
used for logical operations. Use the Boolean 
class to retrieve the primitive data type or string representation of a Boolean object. 

<p>To create a Boolean object, you can use the constructor or the global function, or assign a literal value. 
It doesn't matter which technique you use; in ActionScript 3.0, all three techniques are equivalent. (This is 
different from JavaScript, where a Boolean object is distinct from the Boolean primitive type.)</p>

  <p>The following lines of code are equivalent:</p>
<codeblock rev="3.0">
var flag:Boolean = true;
var flag:Boolean = new Boolean(true);
var flag:Boolean = Boolean(true);
</codeblock>

 </apiDesc><example conref="examples\BooleanExample.as"> The following example toggles and displays each corresponding value for the Boolean object:
<codeblock>
 package {
    import flash.display.Sprite;

    public class BooleanExample extends Sprite {
        private var flag:Boolean;

        public function BooleanExample() {
            trace(flag);    // false
            toggle();
            trace(flag);    // true
            toggle();
            trace(flag);    // false
        }
        
        private function toggle():void{
            flag = !flag;
        }
    }
}
</codeblock></example></apiClassifierDetail><apiConstructor id="Boolean:Boolean"><apiName>Boolean</apiName><shortdesc>
 Creates a Boolean object with the specified value.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>new boolean, constructor
  
  </keyword></asCustoms></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>expression</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiData>false</apiData><apiDesc>Any expression. 
 
 </apiDesc></apiParam></apiConstructorDef><apiDesc>
 Creates a Boolean object with the specified value. If you omit the <codeph>expression</codeph> 
 parameter, the Boolean object is initialized with a value of <codeph>false</codeph>. If you 
 specify a value for the <codeph>expression</codeph> parameter, the method evaluates it and returns the result 
 as a Boolean value according to the rules in the global <codeph>Boolean()</codeph> function.
 
 </apiDesc><example>The following code creates a new Boolean object, initialized to a value of <codeph>false</codeph> called <codeph>myBoolean</codeph>:
 <codeblock rev="3.0">
 var myBoolean:Boolean = new Boolean();
 </codeblock>
 
 </example></apiConstructorDetail><related-links><link href="package.html#Boolean()"><linktext>Boolean()</linktext></link></related-links></apiConstructor><apiOperation id="Boolean:AS3:toString"><apiName>toString</apiName><shortdesc>
	  Returns the string representation ("true" or 
     "false") of the Boolean object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>boolean.toString, toString
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The string <codeph>"true"</codeph> or <codeph>"false"</codeph>.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	  Returns the string representation (<codeph>"true"</codeph> or 
     <codeph>"false"</codeph>) of the Boolean object. The output is not localized, and is <codeph>"true"</codeph> or 
     <codeph>"false"</codeph> regardless of the system language.
	 
 	 </apiDesc><example>This example creates a variable of type Boolean and then uses the <codeph>toString()</codeph> method
	 to convert the value to a string for use in an array of strings:
	 <codeblock rev="3.0">
	 var myStringArray:Array = new Array("yes", "could be");
	 var myBool:Boolean = 0;
	 myBool.toString();
	 myStringArray.push(myBool);
	 trace(myStringArray); // yes,could be,false
	 </codeblock>
	 
	 
	 </example></apiOperationDetail></apiOperation><apiOperation id="Boolean:AS3:valueOf"><apiName>valueOf</apiName><shortdesc>
	 Returns true if the value of the specified Boolean 
	 object is true; false otherwise.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>boolean.valueOf, valueOf
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A Boolean value.
	 
	 </apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns <codeph>true</codeph> if the value of the specified Boolean 
	 object is true; <codeph>false</codeph> otherwise.  
	 
	 </apiDesc><example>The following example shows how this method works, and also shows that the 
	 value of a new Boolean object is <codeph>false</codeph>:
	 <codeblock rev="3.0">
	 var myBool:Boolean = new Boolean();
	 trace(myBool.valueOf());   // false
	 myBool = (6==3+3);
	 trace(myBool.valueOf());   // true  
	 </codeblock>
	 
	 
	 </example></apiOperationDetail></apiOperation></apiClassifier><apiClassifier id="globalClassifier:XMLList"><apiName>XMLList</apiName><shortdesc>
 The XMLList class contains methods for working with one or more XML elements.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>XMLList
 </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/><apiFinal/><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
 The XMLList class contains methods for working with one or more XML elements. An XMLList object
 can represent one or more XML objects or elements (including multiple nodes or attributes), so 
 you can call methods on the elements as a group or on the individual elements in the collection.
 <p>If an XMLList object has only one XML element, you can use the XML class methods on the 
 XMLList object directly. In the following example, <codeph>example.two</codeph> is an XMLList 
 object of length 1, so you can call any XML method on it.</p>
 <codeblock>
 var example2 = &lt;example&gt;&lt;two&gt;2&lt;/two&gt;&lt;/example&gt;;</codeblock>
 <p>If you attempt to use XML class methods with an XMLList object containing more than one XML 
 object, an exception is thrown; instead, iterate over the XMLList collection (using a 
 <codeph>for each..in</codeph> statement, for example) and apply the methods to each XML object in 
 the collection.</p>
 
 </apiDesc><example conref="examples\XMLListExample.as"> The following example creates an XML property named <codeph>books</codeph> and adds several
 items with <codeph>book publisher</codeph> and <codeph>name</codeph> tags to a node named <codeph>books</codeph>.  
 Then the <codeph>showBooksByPublisher()</codeph> method is called,  
 which takes the XMLList and returns each item matching the publisher, "Addison-Wesley."
<codeblock>
package {
    import flash.display.Sprite;

    public class XMLListExample extends Sprite {
        private var books:XML;

        public function XMLListExample() {
            books =    &lt;books&gt;
                        &lt;book publisher="Addison-Wesley" name="Design Patterns" /&gt;
                        &lt;book publisher="Addison-Wesley" name="The Pragmatic Programmer" /&gt;
                        &lt;book publisher="Addison-Wesley" name="Test Driven Development" /&gt;
                        &lt;book publisher="Addison-Wesley" name="Refactoring to Patterns" /&gt;
                        &lt;book publisher="O'Reilly Media" name="The Cathedral &amp; the Bazaar" /&gt;
                        &lt;book publisher="O'Reilly Media" name="Unit Test Frameworks" /&gt;
                    &lt;/books&gt;;

            showBooksByPublisher("Addison-Wesley");
        }

        private function showBooksByPublisher(name:String):void {
            var results:XMLList = books.book.(@publisher == name);
            showList(results);
        }

        private function showList(list:XMLList):void {
            var item:XML;
            for each(item in list) {
                trace("item: " + item.toXMLString());
            }
        }
    }
}
</codeblock></example></apiClassifierDetail><related-links><link href="#XML"><linktext>XML</linktext></link><link href="statements.html#for_each..in"><linktext>for each..in</linktext></link><link href="#Namespace"><linktext>Namespace</linktext></link><link href="#QName"><linktext>QName</linktext></link></related-links><apiConstructor id="XMLList:XMLList"><apiName>XMLList</apiName><shortdesc>
	Creates a new XMLList object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList 
	</keyword></asCustoms></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>Any object that can be converted to an XMLList object by using the top-level <codeph>XMLList()</codeph> function.
	
	</apiDesc></apiParam></apiConstructorDef><apiDesc>
	Creates a new XMLList object.
	
	</apiDesc></apiConstructorDetail><related-links><link href="#global/XMLList()"><linktext>top-level XMLList() function</linktext></link></related-links></apiConstructor><apiOperation id="XMLList:AS3:attribute"><apiName>attribute</apiName><shortdesc>
	Calls the attribute() method of each XML object and returns an XMLList object 
	of the results.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList, XMLList.attribute, attribute
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An XMLList object of matching XML objects or an empty XMLList object.
	
	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn><apiParam><apiItemName>attributeName</apiItemName><apiType value=""/><apiDesc>The name of the attribute that you want to include in an XMLList object.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Calls the <codeph>attribute()</codeph> method of each XML object and returns an XMLList object 
	of the results. The results match the given <codeph>attributeName</codeph> parameter. If there is no 
	match, the <codeph>attribute()</codeph> method returns an empty XMLList object.
	
	</apiDesc></apiOperationDetail><related-links><link href="#XML/attribute()"><linktext>XML.attribute()</linktext></link><link href="#XML/attributes()"><linktext>XML.attributes()</linktext></link></related-links></apiOperation><apiOperation id="XMLList:AS3:attributes"><apiName>attributes</apiName><shortdesc>
	Calls the attributes() method of each XML object and 
	returns an XMLList object of attributes for each XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList, XMLList.attributes, attributes
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An XMLList object of attributes for each XML object.
	
	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Calls the <codeph>attributes()</codeph> method of each XML object and 
	returns an XMLList object of attributes for each XML object. 
	
	</apiDesc></apiOperationDetail><related-links><link href="#XML/attribute()"><linktext>XML.attribute()</linktext></link><link href="#XML/attributes()"><linktext>XML.attributes()</linktext></link></related-links></apiOperation><apiOperation id="XMLList:AS3:child"><apiName>child</apiName><shortdesc>
	Calls the child() method of each XML object and returns an XMLList object that
	contains the results in order.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList, XMLList.child, child
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An XMLList object of child nodes that match the input parameter.
	
	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn><apiParam><apiItemName>propertyName</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>The element name or integer of the XML child.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Calls the <codeph>child()</codeph> method of each XML object and returns an XMLList object that
	contains the results in order.
	
	</apiDesc></apiOperationDetail><related-links><link href="#XML/child()"><linktext>XML.child()</linktext></link></related-links></apiOperation><apiOperation id="XMLList:AS3:children"><apiName>children</apiName><shortdesc>
	Calls the children() method of each XML object and 
	returns an XMLList object that contains the results.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList, XMLList.children, children
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An XMLList object of the children in the XML objects.
	
	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Calls the <codeph>children()</codeph> method of each XML object and 
	returns an XMLList object that contains the results.
	
	</apiDesc></apiOperationDetail><related-links><link href="#XML/children()"><linktext>XML.children()</linktext></link></related-links></apiOperation><apiOperation id="XMLList:AS3:comments"><apiName>comments</apiName><shortdesc>
	Calls the comments() method of each XML object and returns 
	an XMLList of comments.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList, XMLList.comments, comments
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An XMLList of the comments in the XML objects.
	
	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Calls the <codeph>comments()</codeph> method of each XML object and returns 
	an XMLList of comments.
	
	</apiDesc></apiOperationDetail><related-links><link href="#XML/comments()"><linktext>XML.comments()</linktext></link></related-links></apiOperation><apiOperation id="XMLList:AS3:contains"><apiName>contains</apiName><shortdesc>
	Checks whether the XMLList object contains an XML object that is equal to the given 
	value parameter.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList, XMLList.contains, contains
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>If the XMLList contains the XML object declared in the <codeph>value</codeph> parameter, 
	then <codeph>true</codeph>; otherwise <codeph>false</codeph>.
	
	</apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>XML</apiOperationClassifier><apiDesc>An XML object to compare against the current XMLList object. 
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Checks whether the XMLList object contains an XML object that is equal to the given 
	<codeph>value</codeph> parameter.
	
	</apiDesc></apiOperationDetail></apiOperation><apiOperation id="XMLList:AS3:copy"><apiName>copy</apiName><shortdesc>
	Returns a copy of the given XMLList object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList, XMLList.copy, copy
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The copy of the XMLList object.
	
	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Returns a copy of the given XMLList object. The copy is a duplicate of the entire tree of nodes.
	The copied XML object has no parent and returns <codeph>null</codeph> if you attempt to call the <codeph>parent()</codeph> method.
	
	</apiDesc></apiOperationDetail></apiOperation><apiOperation id="XMLList:AS3:descendants"><apiName>descendants</apiName><shortdesc>
	Returns all descendants (children, grandchildren, great-grandchildren, and so on) of the XML object 
	that have the given name parameter.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList, XMLList.descendants, descendants
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An XMLList object of the matching descendants (children, grandchildren, and so on) of the XML objects 
	in the original list. If there are no descendants, returns an empty XMLList object.
	
	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn><apiParam><apiItemName>name</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiData>*</apiData><apiDesc>The name of the element to match.
	
 	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Returns all descendants (children, grandchildren, great-grandchildren, and so on) of the XML object 
	that have the given <codeph>name</codeph> parameter. The <codeph>name</codeph> parameter can be a 
	QName object, a String data type, or any other data type that is then converted to a String
	data type.
	
	<p>To return all descendants, use
	the asterisk (~~) parameter. If no parameter is passed,
	the string "~~" is passed and returns all descendants of the XML object.</p>
	
	</apiDesc></apiOperationDetail><related-links><link href="#XML/descendants()"><linktext>XML.descendants()</linktext></link></related-links></apiOperation><apiOperation id="XMLList:AS3:elements"><apiName>elements</apiName><shortdesc>
	Calls the elements() method of each XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList, XMLList.elements, elements
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An XMLList object of the matching child elements of the XML objects.
	
	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn><apiParam><apiItemName>name</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiData>*</apiData><apiDesc>The name of the elements to match.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Calls the <codeph>elements()</codeph> method of each XML object. The <codeph>name</codeph> parameter is 
	passed to the <codeph>descendants()</codeph> method. If no parameter is passed, the string "~~" is passed to the 
	<codeph>descendants()</codeph> method.
	
 	</apiDesc></apiOperationDetail><related-links><link href="#XML/elements()"><linktext>XML.elements()</linktext></link></related-links></apiOperation><apiOperation id="XMLList:AS3:hasComplexContent"><apiName>hasComplexContent</apiName><shortdesc>
	Checks whether the XMLList object contains complex content.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList, XMLList.hasComplexContent, hasComplexContent
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>If the XMLList object contains complex content, then <codeph>true</codeph>; otherwise <codeph>false</codeph>.
	
	</apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Checks whether the XMLList object contains complex content. An XMLList object is 
	considered to contain complex content if it is not empty and either of the following conditions is true: 
	
	<ul>
	  <li>The XMLList object contains a single XML item with complex content.</li>
	  <li>The XMLList object contains elements.</li>
	</ul>
	
	</apiDesc></apiOperationDetail><related-links><link href="#XMLList/hasSimpleContent()"><linktext>hasSimpleContent()</linktext></link><link href="#XML/hasComplexContent()"><linktext>XML.hasComplexContent()</linktext></link><link href="#XML/hasSimpleContent()"><linktext>XML.hasSimpleContent()</linktext></link></related-links></apiOperation><apiOperation id="XMLList:AS3:hasOwnProperty"><apiName>hasOwnProperty</apiName><shortdesc>
	Checks for the property specified by p.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList, XMLList.hasOwnProperty, hasOwnProperty
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>If the parameter exists, then <codeph>true</codeph>; otherwise <codeph>false</codeph>.
	
	</apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn><apiParam><apiItemName>p</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The property to match.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Checks for the property specified by <codeph>p</codeph>. 
	
	</apiDesc></apiOperationDetail></apiOperation><apiOperation id="XMLList:AS3:hasSimpleContent"><apiName>hasSimpleContent</apiName><shortdesc>
	Checks whether the XMLList object contains simple content.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList, XMLList.hasSimpleContent, hasSimpleContent
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>If the XMLList contains simple content, then <codeph>true</codeph>; otherwise <codeph>false</codeph>.
	
	</apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Checks whether the XMLList object contains simple content. An XMLList object is 
	considered to contain simple content if one or more of the following 
	conditions is true:
	<ul>
	  <li>The XMLList object is empty</li>
	  <li>The XMLList object contains a single XML item with simple content</li>
	  <li>The XMLList object contains no elements</li>
	</ul>
	
	</apiDesc></apiOperationDetail><related-links><link href="#XMLList/hasComplexContent()"><linktext>hasComplexContent()</linktext></link><link href="#XML/hasComplexContent()"><linktext>XML.hasComplexContent()</linktext></link><link href="#XML/hasSimpleContent()"><linktext>XML.hasSimpleContent()</linktext></link></related-links></apiOperation><apiOperation id="XMLList:AS3:length"><apiName>length</apiName><shortdesc>
	Returns the number of properties in the XMLList object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList, XMLList.length, length
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The number of properties in the XMLList object. 
	
	</apiDesc><apiOperationClassifier>int</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Returns the number of properties in the XMLList object.
	
	</apiDesc></apiOperationDetail></apiOperation><apiOperation id="XMLList:AS3:normalize"><apiName>normalize</apiName><shortdesc>
	Merges adjacent text nodes and eliminates empty text nodes for each 
	of the following: all text nodes in the XMLList, all the XML objects 
	contained in the XMLList, and the descendants of all the XML objects in 
	the XMLList.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList, XMLList.normalize, normalize
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The normalized XMLList object.
	
	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Merges adjacent text nodes and eliminates empty text nodes for each 
	of the following: all text nodes in the XMLList, all the XML objects 
	contained in the XMLList, and the descendants of all the XML objects in 
	the XMLList. 
	
	</apiDesc></apiOperationDetail></apiOperation><apiOperation id="XMLList:AS3:parent"><apiName>parent</apiName><shortdesc>
	Returns the parent of the XMLList object if all items in the XMLList object have the same parent.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList, XMLList.parent, parent
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>Returns the parent XML object.
	
	</apiDesc><apiOperationClassifier>Object</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Returns the parent of the XMLList object if all items in the XMLList object have the same parent.
	If the XMLList object has no parent or different parents, the method returns <codeph>undefined</codeph>.
	
	</apiDesc></apiOperationDetail></apiOperation><apiOperation id="XMLList:AS3:processingInstructions"><apiName>processingInstructions</apiName><shortdesc>
	If a name parameter is provided, lists all the children of the XMLList object that 
	contain processing instructions with that name.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList, XMLList.processingInstructions, processingInstructions
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An XMLList object that contains the processing instructions for each XML object.
	
 	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn><apiParam><apiItemName>name</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiData>*</apiData><apiDesc>The name of the processing instructions to match.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	If a <codeph>name</codeph> parameter is provided, lists all the children of the XMLList object that 
	contain processing instructions with that name. With no parameters, the method lists all the 
	children of the XMLList object that contain any processing instructions.
	
	</apiDesc></apiOperationDetail><related-links><link href="#XML/processingInstructions()"><linktext>XML.processingInstructions()</linktext></link></related-links></apiOperation><apiOperation id="XMLList:AS3:propertyIsEnumerable"><apiName>propertyIsEnumerable</apiName><shortdesc>
	Checks whether the property p is in the set of properties that can be iterated in a for..in statement 	
	applied to the XMLList object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList, XMLList.propertyIsEnumerable, propertyIsEnumerable
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>If the property can be iterated in a <codeph>for..in</codeph> statement, then <codeph>true</codeph>; otherwise <codeph>false</codeph>.
	
	</apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn><apiParam><apiItemName>p</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The index of a property to check.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Checks whether the property <codeph>p</codeph> is in the set of properties that can be iterated in a <codeph>for..in</codeph> statement 	
	applied to the XMLList object. This is <codeph>true</codeph> only if <codeph>toNumber(p)</codeph> is greater than or equal to 0 
	and less than the length of the XMLList object. 
	
	</apiDesc></apiOperationDetail></apiOperation><apiOperation id="XMLList:AS3:text"><apiName>text</apiName><shortdesc>
	Calls the text() method of each XML 
	object and returns an XMLList object that contains the results.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList, XMLList.text, text
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An XMLList object of all XML properties of the XMLList object that represent XML text nodes.
	
 	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Calls the <codeph>text()</codeph> method of each XML 
	object and returns an XMLList object that contains the results.
	
	</apiDesc></apiOperationDetail><related-links><link href="#XML/text()"><linktext>XML.text()</linktext></link></related-links></apiOperation><apiOperation id="XMLList:AS3:toString"><apiName>toString</apiName><shortdesc>
	Returns a string representation of all the XML objects in an XMLList object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.toString, toString 
	
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The string representation of the XML object.
	
	</apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Returns a string representation of all the XML objects in an XMLList object. The rules for 
	this conversion depend on whether the XML object has simple content or complex content:
	
	<ul>
		<li>If the XML object has simple content, <codeph>toString()</codeph> returns the string contents of the 
	XML object with  the following stripped out: the start tag, attributes, namespace declarations, and 
	end tag.</li> 
	</ul>
	
	<ul>
		<li> If the XML object has complex content, <codeph>toString()</codeph> returns an XML encoded string 
	representing the entire XML object, including the start tag, attributes, namespace declarations, 
	and end tag.</li>
	</ul>
	
	<p>To return the entire XML object every time, use the <codeph>toXMLString()</codeph> method.</p>
	
	
	</apiDesc><example conref="examples\XMLToStringExample1.as"> The following example shows what the <codeph>toString()</codeph> method returns when the 
 XML object has simple content:
<codeblock>
var test:XML = &lt;type name="Joe"&gt;example&lt;/type&gt;;
trace(test.toString()); //example
</codeblock></example><example conref="examples\XMLToStringExample2.as"> The following example shows what the <codeph>toString()</codeph> method returns when the 
 XML object has complex content:
<codeblock>
var test:XML = 
&lt;type name="Joe"&gt;
    &lt;base name="Bob"&gt;&lt;/base&gt;
    example
&lt;/type&gt;;
trace(test.toString());
  // &lt;type name="Joe"&gt;
  // &lt;base name="Bob"/&gt;
  // example
  // &lt;/type&gt; 
</codeblock></example></apiOperationDetail><related-links><link href="#XMLList/hasComplexContent()"><linktext>hasComplexContent()</linktext></link><link href="#XMLList/hasSimpleContent()"><linktext>hasSimpleContent()</linktext></link><link href="#XMLList/toXMLString()"><linktext>toXMLString()</linktext></link></related-links></apiOperation><apiOperation id="XMLList:AS3:toXMLString"><apiName>toXMLString</apiName><shortdesc>
	Returns a string representation of all the XML objects in an XMLList object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.toXMLString, toXMLString
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The string representation of the XML object.
	
	</apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Returns a string representation of all the XML objects in an XMLList object. 
	Unlike the <codeph>toString()</codeph> method, the <codeph>toXMLString()</codeph> 
	method always returns the start tag, attributes,
	and end tag of the XML object, regardless of whether the XML object has simple content 
	or complex content. (The <codeph>toString()</codeph> method strips out these items for XML 
	objects that contain simple content.)
	
	
	</apiDesc></apiOperationDetail><related-links><link href="#XMLList/toString()"><linktext>toString()</linktext></link></related-links></apiOperation><apiOperation id="XMLList:AS3:valueOf"><apiName>valueOf</apiName><shortdesc>
	Returns the XMLList object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XMLList, XMLList.valueOf, valueOf
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>Returns the current XMLList object.
	
	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Returns the XMLList object. 
	
	</apiDesc></apiOperationDetail></apiOperation></apiClassifier><apiClassifier id="globalClassifier:Error"><apiName>Error</apiName><shortdesc>
 The Error class contains information about an error that occurred in a script.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Error
  
  </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/><apiTipTexts><apiTipText>An Error is thrown when an error occurs in a script.
 
 </apiTipText></apiTipTexts><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
 The Error class contains information about an error that occurred in a script. In developing ActionScript 3.0 applications,
 when you run your compiled code in the debugger version of Flash Player, a dialog box displays exceptions of type Error, 
 or of a subclass, to help you troubleshoot the code.
 You create an Error object by using the <codeph>Error</codeph> constructor function. 
 Typically, you throw a new Error object from within a <codeph>try</codeph> 
 code block that is caught by a <codeph>catch</codeph> or <codeph>finally</codeph> code block.
 <p>You can also create a subclass of the Error class and throw instances of that subclass.</p>
 
 </apiDesc><example conref="examples\ErrorExample.as"> The following example uses the <codeph>ErrorExample</codeph> class to show 
 how a custom error can be generated.  This is accomplished with the following 
 steps:
 <ol>
     <li>A local variable <codeph>nullArray</codeph> of Array type is declared, but notice 
     that a new Array object is never created.</li>
     <li>The constructor attempts to load a value into the uninitialized array by using
     the <codeph>push()</codeph> method within an error handling code segment that catches a 
     custom error by using the <codeph>CustomError</codeph> class, which extends <codeph>Error</codeph>.</li>
     <li>When the CustomError is thrown, the constructor catches it and then outputs an 
  error message by using the <codeph>trace()</codeph> statement. </li>
 </ol>
<codeblock>
package
{
    import flash.display.Sprite;
    public class ErrorExample extends Sprite 
    {
        private var nullArray:Array;
        public function ErrorExample() 
        {
            try 
            {
                nullArray.push("item");
            }
            catch(e:Error) 
            {
                throw new CustomError("nullArray is null");
            }
        }
    }
}

class CustomError extends Error 
{
    public function CustomError(message:String) 
    {
        super(message);
    }
}
</codeblock></example></apiClassifierDetail><apiConstructor id="Error:Error"><apiName>Error</apiName><shortdesc>
	 Creates a new Error object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Error, constructor
	  
	  </keyword></asCustoms></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>message</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiData></apiData><apiDesc>A string associated with the Error object; this parameter 
	 is optional. 
     </apiDesc></apiParam><apiParam><apiItemName>id</apiItemName><apiOperationClassifier>int</apiOperationClassifier><apiData>0</apiData><apiDesc>A reference number to associate with the specific error message.
	 
	 </apiDesc></apiParam><apiTipTexts><apiTipText>Creates a new Error instance with the specified error message.
	 
	 </apiTipText></apiTipTexts></apiConstructorDef><apiDesc>
	 Creates a new Error object. If <codeph>message</codeph> is specified, its value is assigned 
	 to the object's <codeph>Error.message</codeph> property.
	 
	 
	 </apiDesc><example conref="examples\Error.1.as"> The following example creates a new Error object <codeph>err</codeph> and then, using the
 <codeph>Error()</codeph> constructor, assigns the string <codeph>"New Error Message"</codeph> to 
 <codeph>err</codeph>.
<codeblock>

var err:Error = new Error();
trace(err.toString());    // Error

err = new Error("New Error Message");
trace(err.toString());    // Error: New Error Message
</codeblock></example></apiConstructorDetail><related-links><link href="statements.html#throw"><linktext>statements.html#throw</linktext></link><link href="statements.html#try..catch..finally"><linktext>statements.html#try..catch..finally</linktext></link></related-links></apiConstructor><apiOperation id="Error:getStackTrace"><apiName>getStackTrace</apiName><shortdesc>
	 Returns the call stack for an error as a string at the time of the error's construction (for the debugger version
	 of Flash Player and the AIR Debug Launcher (ADL) only; returns null if not using the debugger version
	 of Flash Player or the ADL.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Error, call stack
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>A string representation of the call stack.
	 
	 
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiTipTexts><apiTipText>Returns the call stack for an error in a readable form.
	 
	 
	 </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
	 Returns the call stack for an error as a string at the time of the error's construction (for the debugger version
	 of Flash Player and the AIR Debug Launcher (ADL) only; returns <codeph>null</codeph> if not using the debugger version
	 of Flash Player or the ADL. As shown in the following example, the first line of the return value is the 
	 string representation of the exception object, followed by the stack trace elements:
	 
	 <codeblock>
	 TypeError: null cannot be converted to an object
	     at com.xyz.OrderEntry.retrieveData(OrderEntry.as:995)
	     at com.xyz.OrderEntry.init(OrderEntry.as:200)
	     at com.xyz.OrderEntry.$construct(OrderEntry.as:148)
   	 </codeblock>
	 
	 
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Error:toString"><apiName>toString</apiName><shortdesc>
	
	Returns the string "Error" by default or the value contained in the Error.message property,
    if defined.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Error.toString, toString
	 
	 </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiIsOverride/><apiReturn><apiDesc>The error message.
	
	</apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiTipTexts><apiTipText>Returns the error message, or the word "Error" if the message is 
	undefined.
	
	</apiTipText></apiTipTexts></apiOperationDef><apiDesc>
	
	Returns the string <codeph>"Error"</codeph> by default or the value contained in the <codeph>Error.message</codeph> property,
    if defined.
	
    </apiDesc><example conref="examples\Error.toString.1.as"> The following example creates a new Error object <codeph>err</codeph> and then, using the
 <codeph>Error()</codeph> constructor, assigns the string <codeph>"New Error Message"</codeph> to 
 <codeph>err</codeph>.  Finally, the <codeph>message</codeph> property is set to <codeph>"Another New Error Message"</codeph>,
 which overwrites <codeph>"New Error Message"</codeph>.
 
<codeblock>

var err:Error = new Error();
trace(err.toString());    // Error

err = new Error("New Error Message");
trace(err.toString());    // Error: New Error Message

err.message = "Another New Error Message";
trace(err.toString());    // Error: Another New Error Message
</codeblock></example></apiOperationDetail><related-links><link href="#Error/message"><linktext>Error.message</linktext></link><link href="statements.html#throw"><linktext>statements.html#throw</linktext></link><link href="statements.html#try..catch..finally"><linktext>statements.html#try..catch..finally</linktext></link></related-links></apiOperation><apiValue id="Error:message"><apiName>message</apiName><shortdesc>
	 Contains the message associated with the Error object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Error.message, message
	  
	  </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueClassifier>String</apiValueClassifier><apiTipTexts><apiTipText>Contains the error message associated with the Error instance.
	 
	 </apiTipText></apiTipTexts></apiValueDef><apiDesc>
	 Contains the message associated with the Error object. By default, the value of this property 
	 is "<codeph>Error</codeph>". You can specify a <codeph>message</codeph> property when you create an 
	 Error object by passing the error string to the <codeph>Error</codeph> constructor function.
	 
	 
 	 </apiDesc></apiValueDetail><related-links><link href="statements.html#throw"><linktext>statements.html#throw</linktext></link><link href="statements.html#try..catch..finally"><linktext>statements.html#try..catch..finally</linktext></link></related-links></apiValue><apiValue id="Error:name"><apiName>name</apiName><shortdesc>
	  Contains the name of the Error object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Error.name, name
	  
	  </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueClassifier>String</apiValueClassifier><apiTipTexts><apiTipText>The name of the Error instance.
	 
	 </apiTipText></apiTipTexts></apiValueDef><apiDesc>
	  Contains the name of the Error object. By default, the value of this property is "<codeph>Error</codeph>".
	 
 	 </apiDesc></apiValueDetail><related-links><link href="statements.html#throw"><linktext>statements.html#throw</linktext></link><link href="statements.html#try..catch..finally"><linktext>statements.html#try..catch..finally</linktext></link></related-links></apiValue><apiValue id="Error:errorID:get"><apiName>errorID</apiName><shortdesc>
     Contains the reference number associated with the specific error message.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Error.errorID, errorID
      
      </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>int</apiValueClassifier><apiTipTexts><apiTipText>Contains the error number.
     
     
     </apiTipText></apiTipTexts></apiValueDef><apiDesc>
     Contains the reference number associated with the specific error message. For a custom Error object,
     this number is the value from the <codeph>id</codeph> parameter supplied in the constructor.
     </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="globalClassifier:TypeError"><apiName>TypeError</apiName><shortdesc>
 A TypeError exception is thrown when the actual type of an operand is different
 from the expected type.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Error, TypeError
 
  
  </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/><apiBaseClassifier>Error</apiBaseClassifier></apiClassifierDef><apiDesc>
 A TypeError exception is thrown when the actual type of an operand is different
 from the expected type. 
 <p>
 In addition, this exception is thrown when:
  <ul>
  <li>An actual parameter to a function or method could not be coerced to the formal 
 parameter type.</li>
  <li>A value is assigned to a variable and cannot be coerced to the variable's type.</li>
  <li>The right side of the <codeph>is</codeph> or <codeph>instanceof</codeph> operator is not a valid type.</li>
  <li>The <codeph>super</codeph> keyword is used illegally.</li>
  <li>A property lookup results in more than one binding, and is therefore ambiguous.</li>
  <li>A method is invoked on an incompatible object.  For example, a TypeError
 exception is thrown if a RegExp class method is "grafted" onto a generic object
 and then invoked.</li>
 </ul>
 </p>
 
 </apiDesc><example conref="examples\TypeErrorExample.as"> The following example shows how a TypeError exception can 
 be generated and handled within a <codeph>try..catch</codeph> statement. 
<codeblock>
package {
    import flash.display.DisplayObject;
    import flash.display.Sprite;

    public class TypeErrorExample extends Sprite {
        public function TypeErrorExample() {
            try {
                var child:Object = new Object();
                addChild(DisplayObject(child));
            }
            catch(e:TypeError) {
                trace(e);
            }
        }
    }
}
</codeblock></example></apiClassifierDetail><related-links><link href="operators.html#is"><linktext>is operator</linktext></link><link href="operators.html#instanceof"><linktext>instanceof operator</linktext></link><link href="statements.html#super"><linktext>super statement</linktext></link><link href="#RegExp"><linktext>RegExp class</linktext></link></related-links><apiConstructor id="TypeError:TypeError"><apiName>TypeError</apiName><shortdesc>
	 Creates a new TypeError object.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>message</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiData></apiData><apiDesc>Contains the message associated with the TypeError object. 
	  
	  </apiDesc></apiParam></apiConstructorDef><apiDesc>
	 Creates a new TypeError object.
     </apiDesc></apiConstructorDetail></apiConstructor></apiClassifier><apiClassifier id="globalClassifier:arguments"><apiName>arguments</apiName><shortdesc>
 An arguments object is used to store and access a function's arguments.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="8"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiTipTexts><apiTipText>An arguments object is used to store and access a function's arguments.
 </apiTipText></apiTipTexts><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
 An arguments object is used to store and access a function's arguments. 
 Within a function's body, you can access its arguments object by using the local arguments 
 variable.
 <p>
 The arguments are stored as array elements: the first is accessed as 
 <codeph>arguments[0]</codeph>, the second as <codeph>arguments[1]</codeph>, and so on. The
 <codeph>arguments.length</codeph> property indicates the number of arguments passed to
 the function. There may be a different number of arguments passed than 
 the function declares.
 </p>
 <p>
 Unlike previous versions of ActionScript, ActionScript 3.0 has no <codeph>arguments.caller</codeph> property.
 To get a reference to the function
 that called the current function, you must pass a reference to that function as an
 argument. An example of this technique can be found in the example for <codeph>arguments.callee</codeph>.
 </p>
 <p>ActionScript 3.0 includes a new <codeph>...(rest)</codeph> keyword that is recommended instead of the 
 arguments class.</p>
 
 </apiDesc><example conref="examples\ArgumentsExample.as"> The following example shows uses for various <codeph>arguments</codeph> properties,
 such as <codeph>callee</codeph> and <codeph>length</codeph>.
<codeblock>
package {
    import flash.display.Sprite;
    
    public class ArgumentsExample extends Sprite {
        public function ArgumentsExample() {
                println("Hello World");
        }
        
        public function println(str:String):void {
            trace(arguments.callee == this.println); // true
            trace(arguments.length);                 // 1
            trace(arguments[0]);                     // Hello World
            trace(str);                                // Hello World
        }
    }
}
</codeblock></example></apiClassifierDetail><related-links><link href="statements.html#..._(rest)_parameter"><linktext>...(rest)</linktext></link><link href="#Function"><linktext>Function</linktext></link></related-links><apiValue id="arguments:callee"><apiName>callee</apiName><shortdesc>
	 A reference to the currently executing function.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="8"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueClassifier>Function</apiValueClassifier><apiTipTexts><apiTipText>A reference to the currently executing function.
	 </apiTipText></apiTipTexts></apiValueDef><apiDesc>
	 A reference to the currently executing function.
	 
	 </apiDesc><example conref="examples\arguments.callee.1.as"> The following code shows how to get a reference to the function
 that calls the function named <codeph>secondFunction()</codeph>. The <codeph>firstFunction()</codeph> function has
 the Boolean argument of <codeph>true</codeph> 
 to demonstrate that <codeph>secondFunction()</codeph> successfully calls <codeph>firstFunction()</codeph> and
 to prevent an infinite loop of each function calling the other.
  
 <p>Because the <codeph>callSecond</codeph> parameter is <codeph>true</codeph>, <codeph>firstFunction()</codeph> 
 calls <codeph>secondFunction()</codeph> and passes a reference to itself as the only
 argument. The function <codeph>secondFunction()</codeph> receives this argument and stores it
 using a parameter named <codeph>caller</codeph>, which is of data type Function. From within <codeph>secondFunction()</codeph>, the
 <codeph>caller</codeph> parameter is then used to call the <codeph>firstFunction</codeph> function,
 but this time with the <codeph>callSecond</codeph> argument set to <codeph>false</codeph>.</p>
 <p>When execution returns to <codeph>firstFunction()</codeph>, the <codeph>trace()</codeph>
 statement is executed because <codeph>callSecond</codeph> is <codeph>false</codeph>.</p>
<codeblock>
  package {
    import flash.display.Sprite;
    
    public class ArgumentsExample extends Sprite {
        private var count:int = 1;
        
        public function ArgumentsExample() {
            firstFunction(true);
        }

        public function firstFunction(callSecond:Boolean) {
            trace(count + ": firstFunction");
            if(callSecond) {
                secondFunction(arguments.callee);
            }
            else {
                trace("CALLS STOPPED");
            }
        }

        public function secondFunction(caller:Function) {
            trace(count + ": secondFunction\n");
            count++;
            caller(false);
        }        
    }
} 
</codeblock></example></apiValueDetail></apiValue><apiValue id="arguments:length"><apiName>length</apiName><shortdesc>
	 The number of arguments passed to the function.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="8"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueClassifier>Number</apiValueClassifier><apiTipTexts><apiTipText>The number of parameters passed to the function.
	 </apiTipText></apiTipTexts></apiValueDef><apiDesc>
	 The number of arguments passed to the function. This may be more or less
	 than the function declares.
	 
	 </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="globalClassifier:String"><apiName>String</apiName><shortdesc>
 The String class is a data type that represents a string of characters.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>string, string object, built-in class
  
  </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiFinal/><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
 The String class is a data type that represents a string of characters. The String class 
 provides methods and properties that let you manipulate primitive string value types. 
 You can convert the value of any object into a String data type object using the <codeph>String()</codeph>
 function. 
 <p> 
 All the methods of the String class, except for <codeph>concat()</codeph>, 
 <codeph>fromCharCode()</codeph>, <codeph>slice()</codeph>, and <codeph>substr()</codeph>, are 
 generic, which means the methods call <codeph>toString()</codeph> before performing their 
 operations, and you can use these methods with other non-String objects. 
 </p><p>
 Because all string indexes are zero-based, the index of the last character 
 for any string <codeph>x</codeph> is <codeph>x.length - 1</codeph>.
 </p><p>
 You can call any of the methods of the String class whether you use the constructor method
 <codeph>new String()</codeph> to create a new string variable or simply assign a string literal value. 
 Unlike previous versions of ActionScript, it makes no difference whether you use the constructor,
 the global function, or simply assign a string literal value. The following lines of code are equivalent:
 </p>
 <codeblock rev="3.0">
 var str:String = new String("foo");
 var str:String = "foo";
 var str:String = String("foo");</codeblock>
 <p>When setting a string variable to <codeph>undefined</codeph>, Adobe<sup>®</sup> Flash<sup>®</sup> Player coerces <codeph>undefined</codeph> 
 to <codeph>null</codeph>. So, the statement:</p>
 <pre>
 var s:String = undefined;</pre>
 sets the value to <codeph>null</codeph> instead of <codeph>undefined</codeph>. Use the <codeph>String()</codeph>
 function if you need to use <codeph>undefined</codeph>.
 </apiDesc><example conref="examples\StringExample.as"> The following example uses the StringExample and 
 StringHelper classes to show how various methods of the String class are used.  
 This is accomplished using the following steps:
 <ol>
    <li>The constructor for StringExample declares several local String instances,
     which are initialized with various strings and a new StringHelper object.</li>
    <li>The StringHelper class has the following methods:
    <ul>
        <li><codeph>replace()</codeph>: calls the <codeph>split()</codeph> and <codeph>join()</codeph> methods of 
         String to remove a substring of the string passed in with a new one.</li>
        <li><codeph>trim()</codeph>: calls both <codeph>trimBack()</codeph> and <codeph>trimFront()</codeph> using the
         strings passed in and returns the updated string.</li>
        <li><codeph>trimFront()</codeph>:recursively removes all characters that match the <codeph>char</codeph>
         parameter, starting from the front of the string and working toward the end, until the first character in 
         the string does not match <codeph>char</codeph> and returns the updated string.</li>
        <li><codeph>trimBack()</codeph>: recursively removes all characters that match the <codeph>char</codeph>
         parameter, starting from the end of the string and working backward, until the last character in 
         the string does not match <codeph>char</codeph> and returns the updated string.</li>
        <li><codeph>stringToCharacter()</codeph>: returns the first character of the string passed to it.</li>
    </ul>
  </li>
    <li>Three strings are then produced using the declared string variables with a call to the
     <codeph>replace()</codeph> method used to produce the second string and <codeph>trim()</codeph> to produce the
     third string.</li>
 </ol>
<codeblock>
package {
    import flash.display.Sprite;

    public class StringExample extends Sprite {
        public function StringExample() {
            var companyStr:String = new String("     Company X");
            var productStr:String = "Product Z Basic     ";
            var emptyStr:String = " ";
            var strHelper:StringHelper = new StringHelper();

            var companyProductStr:String = companyStr + emptyStr + productStr;
            trace("'" + companyProductStr + "'");    // '     Company X Product Z Basic     '

            companyProductStr = strHelper.replace(companyProductStr, "Basic", "Professional");
            trace("'" + companyProductStr + "'");    // '     Company X Product Z Professional     '

            companyProductStr = strHelper.trim(companyProductStr, emptyStr);
            trace("'" + companyProductStr + "'");    // 'Company X Product Z Professional'
        }
    }
}

class StringHelper {
    public function StringHelper() {
    }

    public function replace(str:String, oldSubStr:String, newSubStr:String):String {
        return str.split(oldSubStr).join(newSubStr);
    }

    public function trim(str:String, char:String):String {
        return trimBack(trimFront(str, char), char);
    }

    public function trimFront(str:String, char:String):String {
        char = stringToCharacter(char);
        if (str.charAt(0) == char) {
            str = trimFront(str.substring(1), char);
        }
        return str;
    }

    public function trimBack(str:String, char:String):String {
        char = stringToCharacter(char);
        if (str.charAt(str.length - 1) == char) {
            str = trimBack(str.substring(0, str.length - 1), char);
        }
        return str;
    }

    public function stringToCharacter(str:String):String {
        if (str.length == 1) {
            return str;
        }
        return str.slice(0, 1);
    }
}
</codeblock></example></apiClassifierDetail><related-links><link href="package.html#String()"><linktext>String Function</linktext></link></related-links><apiConstructor id="String:String"><apiName>String</apiName><shortdesc>
  Creates a new String object initialized to the specified string.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>string, new string, new, constructor
   
   </keyword></asCustoms></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>val</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The initial value of the new String object.
  
  </apiDesc></apiParam></apiConstructorDef><apiDesc>
  Creates a new String object initialized to the specified string.
  
  <p>
  <b>Note: </b>Because string literals use less overhead than String 
  objects and are generally easier to use, you should use string literals instead of the 
  String class unless you have a good reason to use a String object rather than a string literal.
  </p>
  
  </apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="String:AS3:charAt"><apiName>charAt</apiName><shortdesc>
     Returns the character in the position specified by the index parameter.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>string, string.charat, charat, character at
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The character at the specified index. Or an empty string if the
	 specified index is outside the range of this string's indices.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>index</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>0</apiData><apiDesc>An integer specifying the position of a character in the string. The first 
	 character is indicated by <codeph>0</codeph>, and the last character is indicated by 
	 <codeph>my_str.length - 1</codeph>.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
     Returns the character in the position specified by the <codeph>index</codeph> parameter. 
	 If <codeph>index</codeph> is not a number from 0 to <codeph>string.length - 1</codeph>, an 
	 empty string is returned.
	 <p>
	 This method is similar to <codeph>String.charCodeAt()</codeph> except that the returned 
	 value is a character, not a 16-bit integer character code.
	 </p>
	 
	 </apiDesc></apiOperationDetail><related-links><link href="#String/charCodeAt()"><linktext>charCodeAt()</linktext></link></related-links></apiOperation><apiOperation id="String:AS3:charCodeAt"><apiName>charCodeAt</apiName><shortdesc>
	 Returns the numeric Unicode character code of the character at the specified  
	 index.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>string, string.charcodeat, charcodeat, character code at
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The Unicode character code of the character at the specified index. Or <codeph>
	 NaN</codeph> if the index is outside the range of this string's indices.
	 <p>Unicode values are defined in the <xref href="http://www.unicode.org/ucd/" scope="external">Unicode Character Database</xref>
	 specification. </p>		 
	 
	 </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>index</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>0</apiData><apiDesc>An integer that specifies the position of a character in the string. The 
	 first character is indicated by <codeph>0,</codeph> and the last character is indicated by 
	 <codeph>my_str.length - 1</codeph>.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Returns the numeric Unicode character code of the character at the specified  
	 <codeph>index</codeph>. If <codeph>index</codeph> is not a number from 0 to <codeph>
	 string.length - 1</codeph>, <codeph>NaN</codeph> is returned.
	 <p>
	 This method is similar to <codeph>String.charAt()</codeph> except that the returned 
	 value is a 16-bit integer character code, not the actual character.
	 </p>
	 
	 </apiDesc></apiOperationDetail><related-links><link href="#String/charAt()"><linktext>charAt()</linktext></link></related-links></apiOperation><apiOperation id="String:AS3:concat"><apiName>concat</apiName><shortdesc>
	 Appends the supplied arguments to the end of the String object, converting them to strings if
	 necessary, and returns the resulting string.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>string, string.concat, concat, concatenate
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A new string consisting of this string concatenated
	 with the specified parameters.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>args</apiItemName><apiType value="restParam"/><apiDesc>Zero or more values to be concatenated.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Appends the supplied arguments to the end of the String object, converting them to strings if
	 necessary, and returns the resulting string. The original value of the source String object 
	 remains unchanged.
	 
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="String:AS3:fromCharCode"><apiName>fromCharCode</apiName><shortdesc>
	Returns a string comprising the characters represented by the Unicode character codes
	in the parameters.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>string, string.fromcharcode, fromcharcode, from character code
	 
	 </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiStatic/><apiReturn><apiDesc>The string value of the specified Unicode character codes.
	
	</apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>charCodes</apiItemName><apiType value="restParam"/><apiDesc>A series of decimal integers that represent Unicode values.
	<p>Unicode values are defined in the <xref href="http://www.unicode.org/ucd/" scope="external">Unicode Character Database</xref>
	specification. </p>	
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Returns a string comprising the characters represented by the Unicode character codes
	in the parameters.
	
	</apiDesc></apiOperationDetail></apiOperation><apiOperation id="String:AS3:indexOf"><apiName>indexOf</apiName><shortdesc>
	 Searches the string and returns the position of the first occurrence of val 
	 found at or after startIndex within the calling string.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>string, string.indexof, indexof, index
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The index of the first occurrence of the specified substring or <codeph>-1</codeph>.
	 
	 </apiDesc><apiOperationClassifier>int</apiOperationClassifier></apiReturn><apiParam><apiItemName>val</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The substring for which to search.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>startIndex</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>0</apiData><apiDesc>An optional integer specifying the starting index of the search.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Searches the string and returns the position of the first occurrence of <codeph>val</codeph> 
	 found at or after <codeph>startIndex</codeph> within the calling string. This index is zero-based, 
	 meaning that the first character in a string is considered to be at index 0--not index 1. If 
	 <codeph>val</codeph> is not found, the method returns -1.
	 
	 </apiDesc></apiOperationDetail><related-links><link href="#String/lastIndexOf()"><linktext>lastIndexOf()</linktext></link></related-links></apiOperation><apiOperation id="String:AS3:lastIndexOf"><apiName>lastIndexOf</apiName><shortdesc>
	 Searches the string from right to left and returns the index of the last occurrence 
	 of val found before startIndex.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>string, string.lastindexof, lastindexof, last index of
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The position of the last occurrence of the specified substring or -1 if not found.
	 
	 </apiDesc><apiOperationClassifier>int</apiOperationClassifier></apiReturn><apiParam><apiItemName>val</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The string for which to search.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>startIndex</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>0x7FFFFFFF</apiData><apiDesc>An optional integer specifying the starting index from which to 
	 search for <codeph>val</codeph>. The default is the maximum value allowed for an index. 
     If <codeph>startIndex</codeph> is not specified, the search starts at the last item in the string.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Searches the string from right to left and returns the index of the last occurrence 
	 of <codeph>val</codeph> found before <codeph>startIndex</codeph>. The index is zero-based, 
	 meaning that the first character is at index 0, and the last is at <codeph>string.length
	 - 1</codeph>. If <codeph>val</codeph> is not found, the method returns <codeph>-1</codeph>.
	 
	 </apiDesc></apiOperationDetail><related-links><link href="#String/indexOf()"><linktext>indexOf()</linktext></link></related-links></apiOperation><apiOperation id="String:AS3:localeCompare"><apiName>localeCompare</apiName><shortdesc>
	 Compares the sort order of two or more strings and returns the result of the comparison as an integer.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The value 0 if the strings are equal. Otherwise, a negative integer if the original
	 string precedes the string argument and a positive integer if the string argument precedes
	 the original string. In both cases the absolute value of the number represents the difference
	 between the two strings.
	  
	  </apiDesc><apiOperationClassifier>int</apiOperationClassifier></apiReturn><apiParam><apiItemName>other</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>A string value to compare.
     </apiDesc></apiParam><apiParam><apiItemName>values</apiItemName><apiType value="restParam"/><apiDesc>Optional set of more strings to compare.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Compares the sort order of two or more strings and returns the result of the comparison as an integer. While this
     method is intended to handle the comparison in a locale-specific way, the ActionScript 3.0 implementation
     does not produce a different result from other string comparisons such as the equality (<codeph>==</codeph>) or 
     inequality (<codeph>!=</codeph>) operators.
	 If the strings are equivalent, the return value is 0.
	 If the original string value precedes the string value specified by <codeph>other</codeph>, 
	 the return value is a negative integer, the absolute value of which represents
	 the number of characters that separates the two string values.
	 If the original string value comes after <codeph>other</codeph>,
	 the return value is a positive integer, the absolute value of which represents
	 the number of characters that separates the two string values.
	 
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="String:AS3:match"><apiName>match</apiName><shortdesc>
	Matches the specifed pattern against the 
	string.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><oldexample><pre><code>
		 var myPattern:RegExp = /sh./g;  
			// The dot (.) matches any character.
	 var str:String = "She sells seashells by the seashore.";
	 trace(str.match(myPattern));  
	
	 	// Output: she,sho
	
		 myPattern = /sh./gi;  
			// This time, make it case insensitive (with the i flag).
	 str = "She sells seashells by the seashore.";
	 trace(str.match(myPattern));  
	
	 	// Output: She,she,sho	
	
		 myPattern = RegExp = new RegExp("sh(.)", "gi")  
			// Note the grouping parentheses.
	 str = "She sells seashells by the seashore.";
	 trace(str.match(myPattern));  
	
		// Output: She,e,she,e,sho,o
		 	// Note that the result array is 
			// [[She,e],[she,e],[sho,o]] 
	</code></pre>
	
	</oldexample></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An array of strings consisting of all substrings in 
	the string that match the specified <codeph>pattern</codeph>.
	
	<p>If <codeph>pattern</codeph> is a regular expression, in order to return an array with 
	more than one matching substring, the <codeph>g</codeph> (global) flag must be set
	in the regular expression: </p>
	
	<ul>
	
		<li>If the <codeph>g</codeph> (global) flag is <i>not</i> set,
	the return array will contain no more than one match, and the <codeph>lastIndex</codeph>
	property of the regular expression remains unchanged.</li> 
	
		<li>If the <codeph>g</codeph> (global) flag <i>is</i> set, the method starts the search at
	the beginning of the string (index position 0). If a matching substring is an empty string (which
	can occur with a regular expression such as <codeph>/x~~/</codeph>), the method adds that
	empty string to the array of matches, and then continues searching at the next index position. 
	The <codeph>lastIndex</codeph> property of the regular expression is set to 0 after the 
	method completes. </li>
	
	</ul>
	
	<p>If no match is found, the method returns <codeph>null</codeph>. If you pass
	no value (or an undefined value) as the <codeph>pattern</codeph> parameter, 
	the method returns <codeph>null</codeph>.</p>
	
	
	</apiDesc><apiOperationClassifier>Array</apiOperationClassifier></apiReturn><apiParam><apiItemName>pattern</apiItemName><apiType value=""/><apiDesc>The pattern to match, which can be any type of object, but it is typically 
	either a string or a regular expression. If the <codeph>pattern</codeph> is not a regular expression
	or a string, then the method converts it to a string before executing. 
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Matches the specifed <codeph>pattern</codeph> against the 
	string.
	
	</apiDesc></apiOperationDetail><related-links><link href="#RegExp"><linktext>RegExp</linktext></link></related-links></apiOperation><apiOperation id="String:AS3:replace"><apiName>replace</apiName><shortdesc>
	Matches the specifed pattern against the string and returns a new string
	in which the first match of pattern is replaced with the content specified by repl.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The resulting string. Note that the source string remains unchanged.
	
	</apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>pattern</apiItemName><apiType value=""/><apiDesc>The pattern to match, which can be any type of object, but it is typically 
	either a string or a regular expression. If you specify a <codeph>pattern</codeph> parameter
	that is any object other than a string or a regular expression, the <codeph>toString()</codeph> method is 
	applied to the parameter and the <codeph>replace()</codeph> method executes using the resulting string 
	as the <codeph>pattern</codeph>. 
	
	</apiDesc></apiParam><apiParam><apiItemName>repl</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>Typically, the string that is inserted in place of the matching content. However, you can 
	also specify a function as this parameter. If you specify a function, the string returned  
	by the function is inserted in place of the matching content.
	
	<p>When you specify a string as the <codeph>repl</codeph> parameter and specify a regular expression 
	as the <codeph>pattern</codeph> parameter, you can use the following special <i>$ replacement codes</i>  
	in the <codeph>repl</codeph> string:</p>
	
	<adobetable class="innertable">
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	<tgroup cols="2"><thead><row><entry NOWRAP="true">$ Code
		</entry><entry>Replacement Text
		</entry></row></thead><tbody><row>
	
		<entry><codeph>$$</codeph>
		</entry>
	
		<entry><codeph>$</codeph>
		</entry>
	
	</row><row>
	
		<entry><codeph>$&amp;</codeph>
		</entry>
	
		<entry>The matched substring.
		</entry>
	
	</row><row>
	
		<entry><codeph>$`</codeph>	
		</entry>
	
		<entry>The portion of the string that precedes the matched substring. 
		Note that this code uses the straight left single quote character (`), 
		not the straight single quote character (') or the left curly single quote 
      character ().
		</entry>
	
	</row><row>
	
		<entry><codeph>$'</codeph>
		</entry>
	
		<entry>The portion of string that follows the matched substring. 
      Note that this code uses the straight single quote character (').
		</entry>
	
	</row><row>
	
		<entry><codeph>$</codeph><i>n</i>
		</entry>
	
		<entry>The <i>n</i>th captured parenthetical group match, where <i>n</i> is a single 
	digit 1-9 and <codeph>$</codeph><i>n</i> is not followed by a decimal digit. 
		</entry>
	
	</row><row>
	
		<entry><codeph>$</codeph><i>nn</i>
		</entry>
	
		<entry>The <i>nn</i>th captured parenthetical group match, where <i>nn</i> is a two-digit 
		decimal number (01-99). If the <i>nn</i>th capture is undefined, the replacement text 
		is an empty string. 
		</entry>
	
	</row></tbody></tgroup></adobetable>
	
	<p>For example, the following shows the use of the <codeph>$2</codeph> and <codeph>$1</codeph> 
	replacement codes, which represent the first and second capturing group matched:</p>
	
	<codeblock>var str:String = "flip-flop";
	var pattern:RegExp = /(\w+)-(\w+)/g;
	trace(str.replace(pattern, "$2-$1")); // flop-flip</codeblock>
	
	<p>When you specify a function as the <codeph>repl</codeph>, the <codeph>replace()</codeph> method
	passes the following parameters to the function:
	</p>
	
	<ul>
	
		<li>
		The matching portion of the string.
		</li>
	
		<li>
		Any captured parenthetical group matches are provided as the next arguments. The number of arguments passed
		this way will vary depending on the number of parenthetical matches. You can determine the
		number of parenthetical matches by checking <codeph>arguments.length - 3</codeph> within the function
		code.
		</li>
	
		<li>
		The index position in the string where the match begins.
		</li>
	
		<li>
		The complete string.
		</li>
	
	</ul>
	
	<p>For example, consider the following:</p>
	
	<codeblock>
	var str1:String = "abc12 def34";
	var pattern:RegExp = /([a-z]+)([0-9]+)/;
	var str2:String = str1.replace(pattern, replFN);
	trace (str2);   // 12abc 34def
	
	function replFN():String {
		return arguments[2] + arguments[1];
	}</codeblock>
	
	
	<p>The call to the <codeph>replace()</codeph> method uses a function as the <codeph>repl</codeph>
	parameter. The regular expression (<codeph>/([a-z]([0-9]/g</codeph>) is matched twice. The 
	first time, the pattern matches the substring <codeph>"abc12"</codeph>, and the following list 
	of arguments is passed to the function:
	</p>
	
	<codeblock>
	{"abc12", "abc", "12", 0, "abc12 def34"}</codeblock>
	
	
	<p>The second time, the pattern matches the substring <codeph>"def23"</codeph>, and the 
	following list of arguments is passed to the function:
	</p>
	
	<codeblock>
	{"def34", "def", "34", 6, "abc123 def34"}</codeblock>
	
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Matches the specifed <codeph>pattern</codeph> against the string and returns a new string
	in which the first match of <codeph>pattern</codeph> is replaced with the content specified by <codeph>repl</codeph>. 
	The <codeph>pattern</codeph> parameter can be a string or a regular expression. The <codeph>repl</codeph> parameter
	can be a string or a function; if it is a function, the string returned  
	by the function is inserted in place of the match. The original string is not modified.
	
	<p>In the following example, only the first instance of "sh" (case-sensitive)
	is replaced: </p>
	
	<codeblock>
	var myPattern:RegExp = /sh/;  
	var str:String = "She sells seashells by the seashore.";
	trace(str.replace(myPattern, "sch"));  
	   // She sells seaschells by the seashore.</codeblock>
	
	<p>In the following example, all instances of "sh" (case-sensitive)
	are replaced because the <codeph>g</codeph> (global) flag is set in the regular expression: </p>
	
	<codeblock>
	var myPattern:RegExp = /sh/g;  
	var str:String = "She sells seashells by the seashore.";
	trace(str.replace(myPattern, "sch"));  
	   // She sells seaschells by the seaschore.</codeblock>
	
	<p>In the following example, all instance of "sh" 
	are replaced because the <codeph>g</codeph> (global) flag is set in the regular expression 
	and the matches are <i>not</i> case-sensitive because the <codeph>i</codeph> (ignoreCase) flag is set:</p>
	
	<codeblock>
	var myPattern:RegExp = /sh/gi;  
	var str:String = "She sells seashells by the seashore.";
	trace(str.replace(myPattern, "sch"));  
	   // sche sells seaschells by the seaschore.</codeblock>
	
	</apiDesc></apiOperationDetail><related-links><link href="#RegExp"><linktext>RegExp</linktext></link></related-links></apiOperation><apiOperation id="String:AS3:search"><apiName>search</apiName><shortdesc>
	Searches for the specifed pattern and returns the index of 
	the first matching substring.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><oldexample><pre><code>
	 var str:String = "She sells seashells by the seashore.";
		 var myPattern:RegExp = /sh/;  
			// This time, make it case insensitive (with the i flag).
	 trace(str.match(myPattern));  
	
		// Output: 13
		// (The substring match starts at character position 13.)
	
		 var myPattern:RegExp = /sh/i;
	 trace(str.match(myPattern));  
	
		// Output: 0
		// (The substring match starts at character position 0 
			//   -- the first character of the source string.)
	</code></pre>
	
	</oldexample></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The index of the first matching substring, or <codeph>-1</codeph> if 
	there is no match. Note that the string is zero-indexed; the first character of 
	the string is at index 0, the last is at <codeph>string.length - 1</codeph>. 
	
	</apiDesc><apiOperationClassifier>int</apiOperationClassifier></apiReturn><apiParam><apiItemName>pattern</apiItemName><apiType value=""/><apiDesc>The pattern to match, which can be any type of object but is typically 
	either a string or a regular expression.. If the <codeph>pattern</codeph> is not a regular expression
	or a string, then the method converts it to a string before executing. 
	Note that if you specify a regular expression, the method ignores the global flag ("g") of the 
	regular expression, and it ignores the <codeph>lastIndex</codeph> property of the regular
	expression (and leaves it unmodified). If you pass an undefined value (or no value), 
	the method returns <codeph>-1</codeph>.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Searches for the specifed <codeph>pattern</codeph> and returns the index of 
	the first matching substring. If there is no matching substring, the method returns 
	<codeph>-1</codeph>.
	
	</apiDesc></apiOperationDetail><related-links><link href="#RegExp"><linktext>RegExp</linktext></link></related-links></apiOperation><apiOperation id="String:AS3:slice"><apiName>slice</apiName><shortdesc>
	 Returns a string that includes the startIndex character 
	 and all characters up to, but not including, the endIndex character.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>string, string.slice, slice
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A substring based on the specified indices.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>startIndex</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>0</apiData><apiDesc>The zero-based index of the starting point for the slice. If 
	 <codeph>startIndex</codeph> is a negative number, the slice is created from right-to-left, where 
	 -1 is the last character.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>endIndex</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>0x7fffffff</apiData><apiDesc>An integer that is one greater than the index of the ending point for 
	 the slice. The character indexed by the <codeph>endIndex</codeph> parameter is not included in the extracted 
	 string.  
	 If <codeph>endIndex</codeph> is a negative number, the ending point is determined by 
	 counting back from the end of the string, where -1 is the last character.
	 The default is the maximum value allowed for an index. If this parameter is omitted, <codeph>String.length</codeph> is used.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Returns a string that includes the <codeph>startIndex</codeph> character 
	 and all characters up to, but not including, the <codeph>endIndex</codeph> character. The original String object is not modified. 
	 If the <codeph>endIndex</codeph> parameter is not specified, then the end of the 
	 substring is the end of the string. If the character indexed by <codeph>startIndex</codeph> is the same as or to the right of the 
	 character indexed by <codeph>endIndex</codeph>, the method returns an empty string.
	 
	 
	 </apiDesc></apiOperationDetail><related-links><link href="#String/substr()"><linktext>substr()</linktext></link><link href="#String/substring()"><linktext>substring()</linktext></link></related-links></apiOperation><apiOperation id="String:AS3:split"><apiName>split</apiName><shortdesc>
	 Splits a String object into an array of substrings 
	 by dividing it wherever the specified delimiter parameter 
	 occurs.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>string, string.split, split
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An array of substrings.
	 
	 
	 
	 </apiDesc><apiOperationClassifier>Array</apiOperationClassifier></apiReturn><apiParam><apiItemName>delimiter</apiItemName><apiType value=""/><apiDesc>The pattern that specifies where to split this string. This can be any type of 
	 object but is typically either a string or a regular expression. If the <codeph>delimiter</codeph> 
	 is not a regular expression or string, then the method converts it to a string before executing. 
	 
	 </apiDesc></apiParam><apiParam><apiItemName>limit</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>0x7fffffff</apiData><apiDesc>The maximum number of items to place into the array. 
	 The default is the maximum value allowed. 
	 
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Splits a String object into an array of substrings 
	 by dividing it wherever the specified <codeph>delimiter</codeph> parameter 
	 occurs. 
	 
	 <p>If the <codeph>delimiter</codeph> parameter is a regular expression, only 
	 the first match at a given position of the string is considered, 
	 even if backtracking could find a nonempty substring match at that
	 position. For example:</p>
	 
	 <codeblock rev="3.0">
	 var str:String = "ab";
	 var results:Array = str.split(/a~~?/); // results == ["","b"]
	 
	 results = str.split(/a~~/); // results == ["","b"].)</codeblock>
	 
	 
	 <p>If the <codeph>delimiter</codeph> parameter is a regular expression 
	 containing grouping parentheses, then each time the 
	 <codeph>delimiter</codeph> is matched, the results (including any 
	 undefined results) of the grouping parentheses are spliced into the
	 output array. For example</p>
	 
	 <codeblock rev="3.0">
	 var str:String = "Thi5 is a tricky-66 example.";
	 var re:RegExp = /(\d+)/;
	 var results:Array = str.split(re);
	     // results == ["Thi","5"," is a tricky-","66"," example."]</codeblock>
	 
	 
	 <p>If the <codeph>limit</codeph> parameter is specified, then 
	 the returned array will have no more than the specified 
	 number of elements.</p>
     <p>If the <codeph>delimiter</codeph> is an empty string, an empty 
     regular expression, or a regular expression that can match an empty 
     string, each single character in the string 
     is output as an element in the array.</p>
     
     <p>If the <codeph>delimiter</codeph> parameter is undefined, the entire 
     string is placed into the first element of the returned 
     array. </p>     
	 
	 </apiDesc></apiOperationDetail><related-links><link href="#Array/join()"><linktext>Array.join()</linktext></link><link href="#RegExp"><linktext>RegExp</linktext></link></related-links></apiOperation><apiOperation id="String:AS3:substr"><apiName>substr</apiName><shortdesc>
	 Returns a substring consisting of the characters that start at the specified 
	 startIndex and with a length specified by len.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>string, string.substr, substr, substring
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A substring based on the specified parameters.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>startIndex</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>0</apiData><apiDesc>An integer that specified the index of the first character to be 
	 used to create the substring. If <codeph>startIndex</codeph> is a negative number, the 
	 starting index is determined from the end of the string, where <codeph>-1</codeph> is the 
	 last character.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>len</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>0x7fffffff</apiData><apiDesc>The number of characters in the substring being created. 
	 The default value is the maximum value allowed. If <codeph>len</codeph> 
	 is not specified, the substring includes all the characters from <codeph>startIndex</codeph>
	 to the end of the string.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Returns a substring consisting of the characters that start at the specified <codeph>
	 startIndex</codeph> and with a length specified by <codeph>len</codeph>. The original
	 string is unmodified.
	 
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="String:AS3:substring"><apiName>substring</apiName><shortdesc>
	 Returns a string consisting of the character specified by startIndex 
	 and all characters up to endIndex - 1.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>string, string.substring, substring
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A substring based on the specified parameters.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>startIndex</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>0</apiData><apiDesc>An integer specifying the index of the first character used to create 
	 the substring. Valid values for <codeph>startIndex</codeph> are <codeph>0</codeph> through 
	 <codeph>String.length</codeph>. If <codeph>startIndex</codeph> is a negative value, <codeph>0
	 </codeph> is used.
	 
	 </apiDesc></apiParam><apiParam><apiItemName>endIndex</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiData>0x7fffffff</apiData><apiDesc>An integer that is one greater than the index of the last character in the
	 extracted substring. Valid values for <codeph>endIndex</codeph> are <codeph>0</codeph> through 
	 <codeph>String.length</codeph>. The character at <codeph>endIndex</codeph> is not included in 
	 the substring. The default is the maximum value allowed for an index. 
	 If this parameter is omitted, <codeph>String.length</codeph> is used. If 
	 this parameter is a negative value, <codeph>0</codeph> is used.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Returns a string consisting of the character specified by <codeph>startIndex</codeph> 
	 and all characters up to <codeph>endIndex - 1</codeph>. If <codeph>endIndex</codeph> is not 
	 specified, <codeph>String.length</codeph> is used. If the value of <codeph>startIndex</codeph> 
	 equals the value of <codeph>endIndex</codeph>, the method returns an empty string.
	 If the value of <codeph>startIndex</codeph> is greater than the value of <codeph>
	 endIndex</codeph>, the parameters are automatically swapped before the function 
	 executes. The original string is unmodified.
	 
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="String:AS3:toLocaleLowerCase"><apiName>toLocaleLowerCase</apiName><shortdesc>
	 Returns a copy of this string, with all uppercase characters converted
     to lowercase.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="AIR" version="1.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A copy of this string with all uppercase characters converted
	 to lowercase.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns a copy of this string, with all uppercase characters converted
     to lowercase. The original string is unmodified. While this
     method is intended to handle the conversion in a locale-specific way, the ActionScript 3.0 implementation
     does not produce a different result from the <codeph>toLowerCase()</codeph> method.
	 
	 </apiDesc></apiOperationDetail><related-links><link href="#String/toLowerCase()"><linktext>toLowerCase()</linktext></link></related-links></apiOperation><apiOperation id="String:AS3:toLocaleUpperCase"><apiName>toLocaleUpperCase</apiName><shortdesc>
	 Returns a copy of this string, with all lowercase characters converted 
     to uppercase.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A copy of this string with all lowercase characters converted
	 to uppercase.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns a copy of this string, with all lowercase characters converted 
     to uppercase. The original string is unmodified. While this
     method is intended to handle the conversion in a locale-specific way, the ActionScript 3.0 implementation
     does not produce a different result from the <codeph>toUpperCase()</codeph> method.
	 
	 </apiDesc></apiOperationDetail><related-links><link href="#String/toUpperCase()"><linktext>toUpperCase()</linktext></link></related-links></apiOperation><apiOperation id="String:AS3:toLowerCase"><apiName>toLowerCase</apiName><shortdesc>
	 Returns a copy of this string, with all uppercase characters converted
	 to lowercase.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>string, string.tolowercase, tolowercase, to lowercase
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A copy of this string with all uppercase characters converted
	 to lowercase.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns a copy of this string, with all uppercase characters converted
	 to lowercase. The original string is unmodified.
	 
	 <p>This method converts all characters (not simply A-Z) for which Unicode lowercase
	 equivalents exist:</p>
	 
	 <codeblock>
	 var str:String = " JOSÉ BARÇA";
	 trace(str.toLowerCase()); // josé barça</codeblock>
	 
	 <p>These case mappings are defined in the <xref href="http://www.unicode.org/ucd/" scope="external">Unicode Character Database</xref>
	 specification. </p>
	 
	 </apiDesc></apiOperationDetail><related-links><link href="#String/toUpperCase()"><linktext>toUpperCase()</linktext></link></related-links></apiOperation><apiOperation id="String:AS3:toUpperCase"><apiName>toUpperCase</apiName><shortdesc>
	 Returns a copy of this string, with all lowercase characters converted 
	 to uppercase.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>string, string.touppercase, touppercase, to uppercase
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A copy of this string with all lowercase characters converted
	 to uppercase.
	 
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns a copy of this string, with all lowercase characters converted 
	 to uppercase. The original string is unmodified.
	 
	 <p>This method converts all characters (not simply a-z) for which Unicode uppercase
	 equivalents exist:</p>
	 
	 <codeblock>
	 var str:String = "José Barça";
	 trace(str.toUpperCase()); // JOSÉ BARÇA</codeblock>
	 
	 <p>These case mappings are defined in the <xref href="http://www.unicode.org/ucd/" scope="external">Unicode Character Database</xref>
	 specification. </p>
	 
	 </apiDesc></apiOperationDetail><related-links><link href="#String/toLowerCase()"><linktext>toLowerCase()</linktext></link></related-links></apiOperation><apiOperation id="String:AS3:valueOf"><apiName>valueOf</apiName><shortdesc>
	 Returns the primitive value of a String instance.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><oldexample>The following example creates a new instance of the String class
	 and then shows that the <code>valueOf</code> method returns 
	 the <i>primitive</i> value, rather than a reference to the new instance.
	 
	 <listing version="2.0">
	 var str:String = new String("Hello World");
	 var value:String = str.valueOf();
	 trace(str instanceof String); // true
	 trace(value instanceof String); // false
	 trace(str === value); // false</listing>
	 
	 
	 </oldexample></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The value of the string.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the primitive value of a String instance. This method is designed to
	 convert a String object into a primitive string value. Because Flash Player 
	 automatically calls <codeph>valueOf()</codeph> when necessary, 
	 you rarely need to explicitly call this method.
	 
	 </apiDesc></apiOperationDetail></apiOperation><apiValue id="String:length:get"><apiName>length</apiName><shortdesc>
	 An integer specifying the number of characters in the specified String object.</shortdesc><prolog><asMetadata><apiVersion><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>string, string.length, length
	  
	  </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="read"/><apiValueClassifier>int</apiValueClassifier></apiValueDef><apiDesc>
	 An integer specifying the number of characters in the specified String object.
	 <p>
	 Because all string indexes are zero-based, the index of the last character for any 
	 string <codeph>x</codeph> is <codeph>x.length - 1</codeph>.
	 </p>
	 
	 </apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="globalClassifier:Class"><apiName>Class</apiName><shortdesc>
 A Class object is created for each class definition in a program.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Class
 </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
 A Class object is created for each class definition in a program. Every Class object is an instance
 of the Class class. The Class object contains the static properties and methods of the class. The
 class object creates instances of the class when invoked using the <codeph>new</codeph> operator.
 
 <p>Some methods, such as <codeph>flash.net.getClassByAlias()</codeph>, return an object of type Class. 
 Other methods may have a parameter of type Class, such as <codeph>flash.net.registerClassAlias()</codeph>. </p>
 <p>The class name is the reference to the Class object, as this example shows:</p>
 <pre> 
 class Foo {
 }
 </pre> 
 <p>The <codeph>class Foo{}</codeph> statement is the class definition that creates the Class object Foo. Additionally,
 the statement <codeph>new Foo()</codeph> will create a new instance of class Foo, and the result will be of type Foo.</p>
 <p>Use the <codeph>class</codeph> statement to declare your classes. Class objects are useful for advanced 
 techniques, such as assigning classes to an existing instance object at runtime, as shown in the "Examples" 
 section below.</p>
 <p>Any static properties and methods of a class live on the class's Class object. Class, itself, declares 
 <codeph>prototype</codeph>.</p>
 
 <p>Generally, you do not need to declare or create variables of type Class manually. However, in the following 
 code, a class is assigned as a public Class property <codeph>circleClass</codeph>, and you can refer to this Class property
 as a property of the main Library class:</p>
 <codeblock>
 package {
  import flash.display.Sprite;
  public class Library extends Sprite {
      
      public var circleClass:Class = Circle;
      public function Library() {
      }
  }
 }
  
 import flash.display.Shape;
 class Circle extends Shape {
  public function Circle(color:uint = 0xFFCC00, radius:Number = 10) {
      graphics.beginFill(color);
      graphics.drawCircle(radius, radius, radius);
  }
 }
 </codeblock>
 
 <p>Another SWF file can load the resulting Library.swf file and then instantiate objects of type Circle. The
 following example shows one way to get access to a child SWF file's assets. (Other techniques include using
 <codeph>flash.utils.getDefnitionByName()</codeph> or importing stub definitions of the child SWF file.)</p>
 
 <codeblock>
 package {
  import flash.display.Sprite;
  import flash.display.Shape;
  import flash.display.Loader;
  import flash.net.URLRequest;
  import flash.events.Event;
  public class LibaryLoader extends Sprite {
      public function LibaryLoader() {
          var ldr:Loader = new Loader();
          var urlReq:URLRequest = new URLRequest("Library.swf");
          ldr.load(urlReq);
          ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded);
      }
      private function loaded(event:Event):void {
          var library:Object = event.target.content;
          var circle:Shape = new library.circleClass();
          addChild(circle);
      }
  }
 }
 </codeblock>
 <p>In ActionScript 3.0, you can create embedded classes for external assets (such as images, sounds, or fonts) that are 
 compiled into SWF files. In earlier versions of ActionScript, you associated those assets using a linkage ID with the 
 <codeph>MovieClip.attachMovie()</codeph> method. In ActionScript 3.0, each embedded asset is represented by a unique embedded 
 asset class. Therefore, you can use the <codeph>new</codeph> operator to instantiate the asset's associated class and call 
 methods and properties on that asset.</p>
 <p product="flex">For example, if you are using an MXML compiler to generate SWF files, you would create an embedded
 class as follows:</p>
 <codeblock product="flex">
     [Embed(source="bratwurst.jpg")]
     public var imgClass:Class;
 </codeblock>
 <p product="flex">And, to instantiate it, you write the following:</p>
 <codeblock product="flex">
     var myImg:Bitmap = new imgClass();
 </codeblock>
 
 </apiDesc><example conref="examples\Class.1.as"> The following example shows how to use Class objects to defer until runtime 
 the decision about which class to instantiate using the following steps:
 <ol>
     <li>Declare two classes as <codeph>ClassA</codeph> and <codeph>ClassB</codeph>. </li>
     <li>Declare a variable of type Class named <codeph>classToConstruct</codeph> and one of type
     Boolean <codeph>chooseClassA</codeph>, which is set to <codeph>true</codeph> in this case, 
  but your code could use a custom test expression to set the value of that variable. </li>
 </ol>
<codeblock>
package {
    import flash.display.Sprite;
    
    public class ClassExample extends Sprite {
        public function ClassExample() {
            var classToConstruct:Class;            
            var classInstance:Object;

            classToConstruct = ClassA;
            classInstance = new classToConstruct();
            trace(classInstance);    // [object ClassA]

            classToConstruct = ClassB;
            classInstance = new classToConstruct();
            trace(classInstance);    // [object ClassB]
        }
    }
}

class ClassA {
}
    
class ClassB {
}
</codeblock></example></apiClassifierDetail><related-links><link href="#Object/prototype"><linktext>Object.prototype</linktext></link><link href="operators.html#new"><linktext>new operator</linktext></link></related-links></apiClassifier><apiClassifier id="globalClassifier:Namespace"><apiName>Namespace</apiName><shortdesc>

The Namespace class contains methods and properties for defining and working with namespaces.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>Namespace
 
 </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiFinal/><apiTipTexts><apiTipText>The Namespace class contains methods and properties for defining and 
working with namespaces of XML objects.

</apiTipText></apiTipTexts><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>

The Namespace class contains methods and properties for defining and working with namespaces. 
There are three scenarios for using namespaces:

<ul>
<li> <b>Namespaces of XML objects</b> Namespaces associate a namespace prefix with a Uniform Resource Identifier (URI) 
that identifies the namespace. The prefix is a string used to reference the namespace within an 
XML object. If the prefix is undefined, when the XML is converted to a string, a prefix is 
automatically generated.
</li>

<li> <b>Namespace to differentiate methods</b> Namespaces can differentiate methods with the same name to perform different tasks. 
If two methods have the same name but separate namespaces, they can perform different tasks.
</li>

<li> <b>Namespaces for access control</b> 
Namespaces can be used to control access to a group of
properties and methods in a class. If you place the
properties and methods into a private
namespace, they are
inaccessible to any code that does not have access to
that namespace. You can grant access to the group of
properties and methods by passing the namespace to
other classes, methods or functions.
</li>
</ul>

<p>This class shows two forms of the constructor method because each form accepts 
different parameters.</p>

<p>This class (along with the XML, XMLList, and QName classes) implements 
powerful XML-handling standards defined in ECMAScript for XML 
(E4X) specification (ECMA-357 edition 2).</p>

</apiDesc><example conref="examples\NamespaceExample.as"> The following example shows how to work with namespaces defined in XML objects.
 This is accomplished with the following steps:
 <ol>
    <li>The example defines three Namespace objects, each with a unique URI that defines a namespace.</li>
    <li>The example defines an XML variable named <codeph>myXML</codeph> and assigns it to the return value of 
     <codeph>getRSS()</codeph>.  The <codeph>getRSS()</codeph> method defines an XML object that contains several namespaces
     and returns that XML object.</li>
    <li>The example declares and evaluates an Array variable by calling the <codeph>parseRSS()</codeph> method with
     <codeph>myXML</codeph> passed to it.  In <codeph>parseRSS()</codeph>, the default XML namespace is defined as
     <codeph>rss</codeph> and the example defines an XMLList variable by assigning the list of <codeph>item</codeph>
     objects in <codeph>myXML</codeph>.  An array is created and populated with various nodes within
     <codeph>myXML.item</codeph>. The array is then returned.</li>
    <li>The elements in the array are printed using a <codeph>for</codeph> loop and three calls to
     <codeph>trace()</codeph>.</li>
 </ol>
<codeblock>
package {
    import flash.display.Sprite;

    public class NamespaceExample extends Sprite {
        private var rss:Namespace = new Namespace("http://purl.org/rss/1.0/");
        private var rdf:Namespace = new Namespace("http://www.w3.org/1999/02/22-rdf-syntax-ns#");
        private var dc:Namespace  = new Namespace("http://purl.org/dc/elements/1.1/");

        public function NamespaceExample() {
            var myXML:XML = getRSS();
            var rssItems:Array = parseRSS(myXML);
            
            var len:uint = rssItems.length;
            for (var i:uint; i &lt; len; i++) {
                trace(rssItems[i].title);
                trace(rssItems[i].creator);
                trace(rssItems[i].date);
                // Adobe Flash Developer Center
                // Adobe
                // 2005-08-08
                // Flex Developer Center
                // Adobe
                // 2005-10-16                
            }
        }
        
        private function parseRSS(rssXML:XML):Array {
            default xml namespace = rss;

            var items:XMLList = rssXML.item;

            var arr:Array = new Array();            
            var len:uint = items.length();
            for (var i:uint; i &lt; len; i++) {
                arr.push({title:items[i].title, creator:items[i].dc::creator, date:items[i].dc::date});
            }
            
            return arr;
        }

        private function getRSS():XML {
            var myXML:XML =  &lt;rdf:RDF
              xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
              xmlns="http://purl.org/rss/1.0/"
              xmlns:dc="http://purl.org/dc/elements/1.1/"
            &gt;
              &lt;channel rdf:about="http://www.xml.com/cs/xml/query/q/19"&gt;
                &lt;title&gt;Test RSS&lt;/title&gt;
                &lt;link&gt;http://www.adobe.com/&lt;/link&gt;
                &lt;description&gt;This is a test RSS document.&lt;/description&gt;
                &lt;language&gt;en-us&lt;/language&gt;
                &lt;items&gt;
                  &lt;rdf:Seq&gt;
                &lt;rdf:li rdf:resource="http://www.adobe.com/devnet/flash/"/&gt;
                &lt;rdf:li rdf:resource="http://www.adobe.com/devnet/flex/"/&gt;
                  &lt;/rdf:Seq&gt;
                &lt;/items&gt;
              &lt;/channel&gt;
              &lt;item rdf:about="http://www.adobe.com/devnet/flash/"&gt;
                &lt;title&gt;Adobe Flash Developer Center&lt;/title&gt;
                &lt;link&gt;http://www.adobe.com/devnet/flash/&lt;/link&gt;
                &lt;description&gt;Welcome to the Flash Developer Center&lt;/description&gt;
                &lt;dc:creator&gt;Adobe&lt;/dc:creator&gt;
                &lt;dc:date&gt;2005-08-08&lt;/dc:date&gt;    
              &lt;/item&gt;
              &lt;item rdf:about="http://www.adobe.com/devnet/flex/"&gt;
                &lt;title&gt;Flex Developer Center&lt;/title&gt;
                &lt;link&gt;http://www.adobe.com/devnet/flex/&lt;/link&gt;
                &lt;description&gt;Welcome to the Flex Developer Center&lt;/description&gt;
                &lt;dc:creator&gt;Adobe&lt;/dc:creator&gt;
                &lt;dc:date&gt;2005-10-16&lt;/dc:date&gt;    
              &lt;/item&gt;
            &lt;/rdf:RDF&gt;;
            
            return myXML;
        }
    }
}
</codeblock></example><example conref="examples\Namespace_2_Example.as"> The following example shows how namespaces can be used to differentiate methods that have
 the same name but perform different tasks. In this example, three methods named <codeph>hello()</codeph>
 reside in separate namespaces; each returns a different string when called.
<codeblock>
package {

    import flash.display.Sprite;

    public class Namespace_2_Example extends Sprite {    
        public function Namespace_2_Example() {
            var vocab:MultilingualVocabulary = new MultilingualVocabulary();

            trace(vocab.hello());    // hello
            
            var languages:Array = vocab.getLanguages();
            
            for (var i:uint; i &lt; languages.length; i++) {
                var ns:Namespace = languages[i];
                if (ns != null) {
                    trace(ns.toString() + ": " + vocab.ns::hello());
                    // hello
                    // MultilingualVocabulary:Hawaiian: aloha
                    // MultilingualVocabulary:French: bon jour
                }
            }
        }
    }    
}

class MultilingualVocabulary {
    public namespace French;
    public namespace Hawaiian;
    private var languages:Array;

    public function MultilingualVocabulary() {
        languages = new Array(Hawaiian, French);
    }
        
    public function hello():String { 
        return "hello";
    }

    Hawaiian function hello():String {
        return "aloha";
    }

    French function hello():String { 
        return "bon jour";
    }
        
    public function getLanguages():Array {
        return languages;
    }
}
</codeblock></example><example conref="examples\Namespace_3_Example.as"> The following example uses namespace names to select an appropriate
 variable value. It shows how you can store a namespace value in a variable and use
 that variable to refer to objects within that namespace.
 <p>The example defines namespaces and colors that correspond to mouse 
 states for a rectangular button. Each time the button is drawn, the example applies 
 the appropriate color (out is red; over is yellow; down is white) by referencing the <codeph>bgcolor</codeph>
 variable for the corresponding namespace (<codeph>out</codeph>, <codeph>over</codeph>, <codeph>down</codeph>). </p>
<codeblock>
package {
    import flash.display.Sprite;
  
    public class Namespace_3_Example extends Sprite {     
        public function Namespace_3_Example() {
            addChild(new StateButton("Press Me."));
        }
    }
}

import flash.display.Sprite;
import flash.text.TextField;
import flash.events.Event;
import flash.events.MouseEvent;

class StateButton extends Sprite{
    private namespace out;
    private namespace over;
    private namespace down;
    private var label:TextField;
    private var labelTxt:String;
    private var ns:Namespace;
    out var bgColor:Number = 0xFF0000;
    over var bgColor:Number = 0xFFFF00;
    down var bgColor:Number = 0xFFFFFF;
      
    public function StateButton(str:String) {
        buttonMode = true;
        labelTxt = str;
        ns = out;
        draw();
        addLabel();
        addListeners();
    }

    private function addLabel():void {
        label = new TextField();
        label.text = labelTxt;
        label.width = 50;
        label.height = 20;
        label.mouseEnabled = false;
        addChild(label);
    }
      
    private function addListeners():void {
        addEventListener(MouseEvent.MOUSE_UP, mouseOverHandler);
        addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
        addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
        addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    }
 
    private function mouseOutHandler(e:Event):void {
        ns = out;
        draw();
    }
 
    private function mouseOverHandler(e:Event):void {
        ns = over;
        draw();
    }
 
    private function mouseDownHandler(e:Event):void {
        ns = down;
        draw();
    }
 
    private function draw():void {
        this.graphics.clear();
        this.graphics.beginFill(ns::bgColor);
        this.graphics.drawRect(0, 0, 60, 20);
    }
} 
</codeblock></example></apiClassifierDetail><related-links><link href="#XML"><linktext>XML</linktext></link><link href="#XMLList"><linktext>XMLList</linktext></link><link href="#QName"><linktext>QName</linktext></link><link href="http://www.ecma-international.org/publications/standards/Ecma-357.htm"><linktext>ECMAScript for XML (E4X) specification (ECMA-357 edition 2)</linktext></link></related-links><apiConstructor id="Namespace:Namespace_0"><apiName>Namespace</apiName><shortdesc> 
	Creates a Namespace object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><helpid>
	</helpid></asCustoms></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>uriValue</apiItemName><apiType value=""/><apiDesc>The Uniform Resource Identifier (URI) of the namespace.
	
	
	</apiDesc></apiParam><apiTipTexts><apiTipText>Creates a Namespace object, given the uriValue.
	
	</apiTipText></apiTipTexts></apiConstructorDef><apiDesc> 
	Creates a Namespace object.
	The values assigned to the <codeph>uri</codeph> and <codeph>prefix</codeph> properties 
	of the new Namespace object depend on the type of value passed for the <codeph>uriValue</codeph> parameter:
	<ul>
	  <li>If no value is passed, the <codeph>prefix</codeph> and <codeph>uri</codeph> properties are set to an empty string.</li>
	  <li>If the value is a Namespace object, a copy of the object is created.</li>
	  <li>If the value is a QName object, the <codeph>uri</codeph> property is set to the <codeph>uri</codeph> property of the QName object.</li>
	</ul>
    <p><b>Note:</b> This class shows two constructor entries because each form accepts 
    different parameters. The constructor behaves differently depending on the type and number of 
    parameters passed, as detailed in each entry. ActionSript 3.0 does not support method or constructor overloading.</p>
    
	</apiDesc></apiConstructorDetail></apiConstructor><apiConstructor id="Namespace:Namespace_1"><apiName>Namespace</apiName><shortdesc> 
	Creates a Namespace object according to the values of the prefixValue and uriValue parameters.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><helpid>
	</helpid></asCustoms></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>prefixValue</apiItemName><apiType value=""/><apiDesc>The prefix to use for the namespace.   
	
	</apiDesc></apiParam><apiParam><apiItemName>uriValue</apiItemName><apiType value=""/><apiDesc>The Uniform Resource Identifier (URI) of the namespace.
	
	
	</apiDesc></apiParam><apiTipTexts><apiTipText>Creates a Namespace object, given the prefixValue and uriValue.
	
	</apiTipText></apiTipTexts></apiConstructorDef><apiDesc> 
	Creates a Namespace object according to the values of the <codeph>prefixValue</codeph> and <codeph>uriValue</codeph> parameters.
	This constructor requires both parameters.
	<p>The value of the <codeph>prefixValue</codeph> parameter is assigned to the <codeph>prefix</codeph>
	property as follows:</p>
	<ul>
	  <li>If <codeph>undefined</codeph> is passed, <codeph>prefix</codeph> is set to <codeph>undefined</codeph>.</li>
	  <li>If the value is a valid XML name, as determined by the <codeph>isXMLName()</codeph> function, it is converted to a string and assigned to the <codeph>prefix</codeph> property.</li>
	  <li>If the value is not a valid XML name, the <codeph>prefix</codeph> property is set to <codeph>undefined</codeph>.</li>
	</ul>
	
	<p>The value of the <codeph>uriValue</codeph> parameter is assigned to the <codeph>uri</codeph>
	property as follows:</p>
	<ul>
	  <li>If a QName object is passed, the <codeph>uri</codeph> property is set to the value of the QName object's <codeph>uri</codeph> property.</li>
	  <li> Otherwise, the <codeph>uriValue</codeph> parameter is converted to a string and assigned to the <codeph>uri</codeph> property.</li>
	</ul>
    <p><b>Note:</b> This class shows two constructor method entries because each form accepts 
    different parameters. The constructor behaves differently depending on the type and number of 
    arguments passed, as detailed in each entry. ActionSript 3.0 does not support method or constructor overloading.</p>
    
	</apiDesc></apiConstructorDetail></apiConstructor><apiOperation id="Namespace:AS3:toString"><apiName>toString</apiName><shortdesc>
	Equivalent to the Namespace.uri property.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>Namespace, Namespace.toString, toString
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The Uniform Resource Identifier (URI) of the namespace, as a string.
	
	
	</apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiTipTexts><apiTipText>Equivalent to the Namespace.uri property. 
	
	</apiTipText></apiTipTexts></apiOperationDef><apiDesc>
	Equivalent to the <codeph>Namespace.uri</codeph> property.
	
	</apiDesc></apiOperationDetail></apiOperation><apiOperation id="Namespace:AS3:valueOf"><apiName>valueOf</apiName><shortdesc>
    Returns the URI value of the specified object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>Namespace, Namespace.toString, toString
    </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The Uniform Resource Identifier (URI) of the namespace, as a string.
    
    
    </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiTipTexts><apiTipText>Equivalent to the Namespace.uri property. 
    
    </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
    Returns the URI value of the specified object. 
    
    </apiDesc></apiOperationDetail></apiOperation><apiValue id="Namespace:prefix:get"><apiName>prefix</apiName><shortdesc>
	The prefix of the namespace.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>Namespace, Namespace.prefix, prefix
	</keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>String</apiValueClassifier><apiTipTexts><apiTipText>The prefix of the namespace.
	
	</apiTipText></apiTipTexts></apiValueDef><apiDesc>
	The prefix of the namespace.
	
	</apiDesc></apiValueDetail></apiValue><apiValue id="Namespace:uri:get"><apiName>uri</apiName><shortdesc>
	The Uniform Resource Identifier (URI) of the namespace.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>Namespace, Namespace.uri, uri
	</keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>String</apiValueClassifier><apiTipTexts><apiTipText>The Uniform Resource Identifier (URI) of the namespace.
	
	</apiTipText></apiTipTexts></apiValueDef><apiDesc>
	The Uniform Resource Identifier (URI) of the namespace.
	
	</apiDesc></apiValueDetail></apiValue></apiClassifier><apiClassifier id="globalClassifier:XML"><apiName>XML</apiName><shortdesc>
	The XML class contains methods and properties for working with XML objects.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>XML
 
 </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/><apiFinal/><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
	The XML class contains methods and properties for working with XML objects. The XML class
	(along with the XMLList, Namespace, and QName classes) implements the 
	powerful XML-handling standards defined in ECMAScript for XML 
    (E4X) specification (ECMA-357 edition 2).
	
	<p>Use the <codeph>toXMLString()</codeph> method to return a string representation of the XML object
	regardless of whether the XML object has simple content or complex content.</p>
	
	<p><b>Note</b>: The XML class (along with related classes) from ActionScript 2.0 has been
 	renamed XMLDocument and moved into the flash.xml package. 
	It is included in ActionScript 3.0 for backward compatibility.</p> 
	
	
    </apiDesc><example conref="examples\XMLExample.as"> The following example first creates an XML variable and adds nodes to it. 
 Then XML properties are used to find and print XML nodes.  Notice that the "at" 
 (<codeph>@</codeph>) symbol is used in several of the <codeph>trace()</codeph> calls to locate information
 by attribute name.
<codeblock>
package {
    import flash.display.Sprite;

    public class XmlExample extends Sprite {        
        public function XmlExample() {
            var employees:XML =
                &lt;employees&gt;
                    &lt;employee ssn="123-123-1234"&gt;
                        &lt;name first="John" last="Doe"/&gt;
                        &lt;address&gt;
                            &lt;street&gt;11 Main St.&lt;/street&gt;
                            &lt;city&gt;San Francisco&lt;/city&gt;
                            &lt;state&gt;CA&lt;/state&gt;
                            &lt;zip&gt;98765&lt;/zip&gt;
                        &lt;/address&gt;
                    &lt;/employee&gt;
                    &lt;employee ssn="789-789-7890"&gt;
                        &lt;name first="Mary" last="Roe"/&gt;
                        &lt;address&gt;
                            &lt;street&gt;99 Broad St.&lt;/street&gt;
                            &lt;city&gt;Newton&lt;/city&gt;
                            &lt;state&gt;MA&lt;/state&gt;
                            &lt;zip&gt;01234&lt;/zip&gt;
                        &lt;/address&gt;
                    &lt;/employee&gt;
                &lt;/employees&gt;;

            trace(employees.employee[0].address.zip);   // 98765

            trace(employees.employee[1].@ssn);          // 789-789-7890

            trace(employees.employee.name);             // &lt;name first="John" last="Doe"/&gt;
                                                        // &lt;name first="Mary" last="Roe"/&gt;

            trace(employees..zip[0]);                   // 98765

            trace(employees..@ssn[1]);                  // 789-789-7890

            trace(employees..name);                     // &lt;name first="John" last="Doe"/&gt;
                                                        // &lt;name first="Mary" last="Roe"/&gt;

            trace(employees.employee[0].address.*);     // &lt;street&gt;11 Main St.&lt;/street&gt;    
                                                        // &lt;city&gt;San Francisco&lt;/city&gt;
                                                        // &lt;state&gt;CA&lt;/state&gt;
                                                        // &lt;zip&gt;98765&lt;/zip&gt;
            var node:String = "zip";
            trace(employees.employee[0].address[node]); // 98765
            
            var attribute:String = "ssn";
            trace(employees.employee[1].@[attribute]);  // 789-789-7890
            
            for each (var num:XML in employees..@ssn) {
                trace(num);                             // 123-123-1234
            }                                           // 789-789-7890
            
            var ssnToFind:String = "789-789-7890";
            trace(employees.employee.(@ssn == ssnToFind).toXMLString());
                                                        // &lt;employee ssn="789-789-7890"&gt;
                                                        // &lt;name first="Mary" last="Roe"/&gt;
                                                        // &lt;address&gt;
                                                        // &lt;street&gt;99 Broad St.&lt;/street&gt;
                                                        // &lt;city&gt;Newton&lt;/city&gt;
                                                        // &lt;state&gt;MA&lt;/state&gt;
                                                        // &lt;zip&gt;01234&lt;/zip&gt;
                                                        // &lt;/address&gt;
                                                        // &lt;/employee&gt;
        }
    }
}
</codeblock></example></apiClassifierDetail><related-links><link href="#Namespace"><linktext>Namespace</linktext></link><link href="#QName"><linktext>QName</linktext></link><link href="#XMLList"><linktext>XMLList</linktext></link><link href="#XML/toXMLString()"><linktext>XML.toXMLString()</linktext></link><link href="http://www.ecma-international.org/publications/standards/Ecma-357.htm"><linktext>ECMAScript for XML (E4X) specification (ECMA-357 edition 2)</linktext></link></related-links><apiConstructor id="XML:XML"><apiName>XML</apiName><shortdesc> 
	Creates a new XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML
	</keyword></asCustoms></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>Any object that can be converted to XML with the top-level 
	<codeph>XML()</codeph> function.
	
	</apiDesc></apiParam></apiConstructorDef><apiDesc> 
	Creates a new XML object. You must use the constructor to create an 
	XML object before you call any of the methods of the XML class. 
	
	<p>Use the <codeph>toXMLString()</codeph> method to return a string representation of the XML object
	regardless of whether the XML object has simple content or complex content.</p>
	
	</apiDesc></apiConstructorDetail><related-links><link href="package.html#XML()"><linktext>top-level XML() function</linktext></link><link href="#XML/toXMLString()"><linktext>XML.toXMLString()</linktext></link></related-links></apiConstructor><apiOperation id="XML:AS3:addNamespace"><apiName>addNamespace</apiName><shortdesc>
	Adds a namespace to the set of in-scope namespaces for the XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.addNamespace, addNamespace
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The new XML object, with the namespace added.
	
	</apiDesc><apiOperationClassifier>XML</apiOperationClassifier></apiReturn><apiParam><apiItemName>ns</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>The namespace to add to the XML object.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Adds a namespace to the set of in-scope namespaces for the XML object. If the namespace already 
	exists in the in-scope namespaces for the XML object (with a prefix matching that of the given 
	parameter), then the prefix of the existing namespace is set to <codeph>undefined</codeph>. If the input parameter 
	is a Namespace object, it's used directly. If it's a QName object, the input parameter's
	URI is used to create a new namespace; otherwise, it's converted to a String and a namespace is created from 
	the String.
	
	</apiDesc><example conref="examples\XML.addNamespace.1.as"> This example uses a namespace defined in one XML object and applies it
 to another XML object:
<codeblock>
var xml1:XML = &lt;ns:foo xmlns:ns="www.example.com/ns" /&gt;;
var nsNamespace:Namespace = xml1.namespace();

var xml2:XML = &lt;bar /&gt;;
xml2.addNamespace(nsNamespace);
trace(xml2.toXMLString()); // &lt;bar xmlns:ns="www.example.com/ns"/&gt;
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:appendChild"><apiName>appendChild</apiName><shortdesc>
	Appends the given child to the end of the XML object's properties.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.appendChild, appendChild
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The resulting XML object.
	
	</apiDesc><apiOperationClassifier>XML</apiOperationClassifier></apiReturn><apiParam><apiItemName>child</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>The XML object to append.
    
    </apiDesc></apiParam></apiOperationDef><apiDesc>
	Appends the given child to the end of the XML object's properties.
	The <codeph>appendChild()</codeph> method takes an XML object, an XMLList object, or 
	any other data type that is then converted to a String. 
    
    <p>Use the <codeph>delete</codeph> (XML) operator to remove XML nodes.</p>
	
	</apiDesc><example conref="examples\XML.appendChild.1.as"> This example appends a new element to the end of the child list of an XML object:
<codeblock>
var xml:XML = 
        &lt;body&gt;
            &lt;p&gt;hello&lt;/p&gt;
        &lt;/body&gt;;
        
xml.appendChild(&lt;p&gt;world&lt;/p&gt;);    
trace(xml.p[0].toXMLString()); // &lt;p&gt;hello&lt;/p&gt;
trace(xml.p[1].toXMLString()); // &lt;p&gt;world&lt;/p&gt;
</codeblock></example></apiOperationDetail><related-links><link href="operators.html#delete_(XML)"><linktext>delete (XML) operator</linktext></link></related-links></apiOperation><apiOperation id="XML:AS3:attribute"><apiName>attribute</apiName><shortdesc>
	Returns the XML value of the attribute that has the name matching the attributeName
	parameter.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.attribute, attribute
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An XMLList object or an empty XMLList object. Returns an empty XMLList object
	when an attribute value has not been defined.
	
	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn><apiParam><apiItemName>attributeName</apiItemName><apiType value=""/><apiDesc>The name of the attribute.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Returns the XML value of the attribute that has the name matching the <codeph>attributeName</codeph>
	parameter. Attributes are found within XML elements. 
	In the following example, the element has an attribute named "<codeph>gender</codeph>" 
	with the value "<codeph>boy</codeph>": <codeph>&lt;first gender="boy"&gt;John&lt;/first&gt;</codeph>.
	
	<p>The <codeph>attributeName</codeph> parameter can be any data type; however, 
	String is the most common data type to use. When passing any object other than a QName object, 
	the <codeph>attributeName</codeph> parameter uses the <codeph>toString()</codeph> method
	to convert the parameter to a string. </p>
	
	<p>If you need a qualified name reference, you can pass in a QName object. A QName object
	defines a namespace and the local name, which you can use to define the qualified name of an 
	attribute. Therefore calling <codeph>attribute(qname)</codeph> is not the same as calling
	<codeph>attribute(qname.toString())</codeph>.</p>
	
	</apiDesc><example conref="examples\XMLAttributeExample1.as"> This example shows a QName object passed into the <codeph>attribute()</codeph> method. The
 <codeph>localName</codeph> property is <codeph>attr</codeph> and the <codeph>namespace</codeph> property
 is <codeph>ns</codeph>.
<codeblock>
 var xml:XML = &lt;ns:node xmlns:ns = "http://uri" ns:attr = '7' /&gt;       
 var qn:QName = new QName("http://uri", "attr");
 trace (xml.attribute(qn)); // 7
</codeblock></example><example conref="examples\XMLAttributeExample2.as"> To return an attribute with a name that matches an ActionScript reserved word, 
 use the <codeph>attribute()</codeph> method instead of the attribute identifier (@) 
 operator, as in the following example:
<codeblock>
 var xml:XML = &lt;example class="first" /&gt;
 trace(xml.attribute("class"));
 
</codeblock></example></apiOperationDetail><related-links><link href="#XML/attributes()"><linktext>XML.attributes()</linktext></link><link href="#QName"><linktext>QName</linktext></link><link href="#Namespace"><linktext>Namespace</linktext></link><link href="#XML/elements()"><linktext>XML.elements()</linktext></link><link href="operators.html#attribute_identifier"><linktext>attribute identifier (&amp;#064;) operator</linktext></link></related-links></apiOperation><apiOperation id="XML:AS3:attributes"><apiName>attributes</apiName><shortdesc>
	Returns a list of attribute values for the given XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.attributes, attributes
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The list of attribute values.
	
	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Returns a list of attribute values for the given XML object. Use the <codeph>name()</codeph> 
	method with the <codeph>attributes()</codeph> method to return the name of an attribute.
	Use of <codeph>xml.attributes()</codeph> is equivalent to <codeph>xml.@*</codeph>.
	
	</apiDesc><example conref="examples\XMLAttributesExample1.as"> The following example returns the name of the attribute:

<codeblock>
var xml:XML=&lt;example id='123' color='blue'/&gt;
trace(xml.attributes()[1].name()); //color
</codeblock></example><example conref="examples\XMLAttributesExample2.as"> This example returns the names of all the attributes:
<codeblock>
 
var xml:XML = &lt;example id='123' color='blue'/&gt;
var attNamesList:XMLList = xml.@*;

trace (attNamesList is XMLList); // true
trace (attNamesList.length()); // 2

for (var i:int = 0; i &lt; attNamesList.length(); i++)
{ 
    trace (typeof (attNamesList[i])); // xml
    trace (attNamesList[i].nodeKind()); // attribute
    trace (attNamesList[i].name()); // id and color
} 
</codeblock></example></apiOperationDetail><related-links><link href="#XML/attribute()"><linktext>XML.attribute()</linktext></link><link href="#XML/name()"><linktext>XML.name()</linktext></link><link href="operators.html#attribute_identifier"><linktext>&amp;#064; operator</linktext></link></related-links></apiOperation><apiOperation id="XML:AS3:child"><apiName>child</apiName><shortdesc>
	Lists the children of an XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.child, child
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An XMLList object of child nodes that match the input parameter. 
	
	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn><apiParam><apiItemName>propertyName</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>The element name or integer of the XML child. 
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Lists the children of an XML object. An XML child is an XML element, text node, comment, 
	or processing instruction. 
	
	<p>Use the <codeph>propertyName</codeph> parameter to list the 
	contents of a specific XML child. For example, to return the contents of a child named 
	<codeph>&lt;first&gt;</codeph>, use <codeph>child.name("first")</codeph>. You can generate the same result 
	by using the child's index number. The index number identifies the child's position in the 
	list of other XML children. For example, <codeph>name.child(0)</codeph> returns the first child 
	in a list. </p>
	
	<p>Use an asterisk (~~) to output all the children in an XML document. 
	For example, <codeph>doc.child("~~")</codeph>.</p>  
	
	<p>Use the <codeph>length()</codeph> method with the asterisk (~~) parameter of the 
	<codeph>child()</codeph> method to output the total number of children. For example, 
	<codeph>numChildren = doc.child("~~").length()</codeph>.</p>
	
	</apiDesc><example conref="examples\XML.child.1.as"> This example shows the use of the <codeph>child()</codeph> method to identify child
 elements with a specified name:
<codeblock>
var xml:XML = 
        &lt;foo&gt;
            &lt;bar&gt;text1&lt;/bar&gt;
            &lt;bar&gt;text2&lt;/bar&gt;
        &lt;/foo&gt;;
trace(xml.child("bar").length());  // 2
trace(xml.child("bar")[0].toXMLString()); // &lt;bar&gt;text1&lt;/bar&gt;
trace(xml.child("bar")[1].toXMLString()); // &lt;bar&gt;text2&lt;/bar&gt;
</codeblock></example></apiOperationDetail><related-links><link href="#XML/elements()"><linktext>XML.elements()</linktext></link><link href="#XMLList"><linktext>XMLList class</linktext></link><link href="#XML/length()"><linktext>XML.length()</linktext></link></related-links></apiOperation><apiOperation id="XML:AS3:childIndex"><apiName>childIndex</apiName><shortdesc>
	Identifies the zero-indexed position of this XML object within the context of its parent.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.childindex, childindex
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The position of the object. Returns -1 as well as positive integers.
	
	</apiDesc><apiOperationClassifier>int</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Identifies the zero-indexed position of this XML object within the context of its parent.
	
	</apiDesc><example conref="examples\XML.childIndex.1.as"> This example shows the use of the <codeph>childIndex()</codeph> method:
<codeblock>
var xml:XML = 
            &lt;foo&gt;
                &lt;bar /&gt;
                text
                &lt;bob /&gt;
            &lt;/foo&gt;;
trace(xml.bar.childIndex()); // 0
trace(xml.bob.childIndex()); // 2
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:children"><apiName>children</apiName><shortdesc>
	Lists the children of the XML object in the sequence in which they appear.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.children, children
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An XMLList object of the XML object's children.
	
	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Lists the children of the XML object in the sequence in which they appear. An XML child 
	is an XML element, text node, comment, or processing instruction. 
	
	</apiDesc><example conref="examples\XML.children.1.as"> This example shows the use of the <codeph>children()</codeph> method:
<codeblock>
XML.ignoreComments = false;
XML.ignoreProcessingInstructions = false;
var xml:XML = 
        &lt;foo id="22"&gt;
            &lt;bar&gt;44&lt;/bar&gt;
            text
            &lt;!-- comment --&gt;
            &lt;?instruction ?&gt;
        &lt;/foo&gt;;
trace(xml.children().length()); // 4
trace(xml.children()[0].toXMLString()); // &lt;bar&gt;44&lt;/bar&gt;
trace(xml.children()[1].toXMLString()); // text
trace(xml.children()[2].toXMLString()); // &lt;!-- comment --&gt;
trace(xml.children()[3].toXMLString()); // &lt;?instruction ?&gt;
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:comments"><apiName>comments</apiName><shortdesc>
	Lists the properties of the XML object that contain XML comments.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.comments, comments
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An XMLList object of the properties that contain comments.
	
	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Lists the properties of the XML object that contain XML comments.
	
	</apiDesc><example conref="examples\XML.comments.1.as"> This example shows the use of the <codeph>comments()</codeph> method:
<codeblock>
XML.ignoreComments = false;
var xml:XML = 
        &lt;foo&gt;
            &lt;!-- example --&gt;
            &lt;!-- example2 --&gt;
        &lt;/foo&gt;;
trace(xml.comments().length()); // 2
trace(xml.comments()[1].toXMLString()); // &lt;!-- example2 --&gt;
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:contains"><apiName>contains</apiName><shortdesc>
	Compares the XML object against the given value parameter.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.contains, contains
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>If the XML object matches the <codeph>value</codeph> parameter, then <codeph>true</codeph>; otherwise <codeph>false</codeph>.
	
	</apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>XML</apiOperationClassifier><apiDesc>A value to compare against the current XML object.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Compares the XML object against the given <codeph>value</codeph> parameter. 
	
	</apiDesc><example conref="examples\XML.contains.1.as"> This example shows the use of the <codeph>contains()</codeph> method:
<codeblock>
var xml:XML = 
        &lt;order&gt;
            &lt;item&gt;Rice&lt;/item&gt;
            &lt;item&gt;Kung Pao Shrimp&lt;/item&gt;
        &lt;/order&gt;;
trace(xml.item[0].contains(&lt;item&gt;Rice&lt;/item&gt;)); // true
trace(xml.item[1].contains(&lt;item&gt;Kung Pao Shrimp&lt;/item&gt;)); // true
trace(xml.item[1].contains(&lt;item&gt;MSG&lt;/item&gt;)); // false
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:copy"><apiName>copy</apiName><shortdesc>
	Returns a copy of the given XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.copy, copy
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The copy of the object.
	
	</apiDesc><apiOperationClassifier>XML</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Returns a copy of the given XML object. The copy is a duplicate of the entire tree of nodes. 
	The copied XML object has no parent and returns <codeph>null</codeph> if you attempt to call the 
	<codeph>parent()</codeph> method.
    
	</apiDesc><example conref="examples\XML.copy.1.as"> This example shows that the <codeph>copy()</codeph> method creates a new instance of an XML object. 
 When you modify the copy, the original remains unchanged:
<codeblock>
var xml1:XML = &lt;foo /&gt;;
var xml2:XML = xml1.copy();
xml2.appendChild(&lt;bar /&gt;);
trace(xml1.bar.length()); // 0
trace(xml2.bar.length()); // 1
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:defaultSettings"><apiName>defaultSettings</apiName><shortdesc>
	Returns an object with the following properties set to the default values: ignoreComments, 
	ignoreProcessingInstructions, ignoreWhitespace, prettyIndent, and 
	prettyPrinting.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.defaultSettings, defaultSettings
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiStatic/><apiReturn><apiDesc>An object with properties set to the default settings.
	
	</apiDesc><apiOperationClassifier>Object</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Returns an object with the following properties set to the default values: <codeph>ignoreComments</codeph>, 
	<codeph>ignoreProcessingInstructions</codeph>, <codeph>ignoreWhitespace</codeph>, <codeph>prettyIndent</codeph>, and 
	<codeph>prettyPrinting</codeph>. The default values are as follows:
	
	<ul>
	   <li><codeph>ignoreComments = true</codeph></li>
	   <li><codeph>ignoreProcessingInstructions = true</codeph></li>
	   <li><codeph>ignoreWhitespace = true</codeph></li>
	 <li><codeph>prettyIndent = 2</codeph></li>
	   <li><codeph>prettyPrinting = true</codeph></li>
	</ul>
	
	<p><b>Note:</b> You do not apply this method to an instance of the XML class; you apply it to 
	<codeph>XML</codeph>, as in the following code: <codeph>var df:Object = XML.defaultSettings()</codeph>. </p>
	
	</apiDesc><example conref="examples\XML.defaultSettings.1.as"> The following example shows: how to apply some custom settings (for including comments and processing
 instructions) prior to setting an XML object; how to then revert back to the default settings before setting another XML
 object; and then how to set the custom settings again (for setting any more XML objects):
<codeblock>
XML.ignoreComments = false;
XML.ignoreProcessingInstructions = false;
var customSettings:Object = XML.settings();

var xml1:XML = 
        &lt;foo&gt;
            &lt;!-- comment --&gt;
            &lt;?instruction ?&gt;
        &lt;/foo&gt;;
trace(xml1.toXMLString());
//    &lt;foo&gt;
//        &lt;!-- comment --&gt;
//         &lt;?instruction ?&gt;
//    &lt;/foo&gt;

XML.setSettings(XML.defaultSettings());
var xml2:XML = 
        &lt;foo&gt;
            &lt;!-- comment --&gt;
            &lt;?instruction ?&gt;
        &lt;/foo&gt;;
trace(xml2.toXMLString());
</codeblock></example></apiOperationDetail><related-links><link href="#XML/ignoreComments"><linktext>XML.ignoreComments</linktext></link><link href="#XML/ignoreProcessingInstructions"><linktext>XML.ignoreProcessingInstructions</linktext></link><link href="#XML/ignoreWhitespace"><linktext>XML.ignoreWhitespace</linktext></link><link href="#XML/prettyIndent"><linktext>XML.prettyIndent</linktext></link><link href="#XML/prettyPrinting"><linktext>XML.prettyPrinting</linktext></link><link href="#XML/setSettings()"><linktext>XML.setSettings()</linktext></link><link href="#XML/settings()"><linktext>XML.settings()</linktext></link></related-links></apiOperation><apiOperation id="XML:AS3:descendants"><apiName>descendants</apiName><shortdesc>
	Returns all descendants (children, grandchildren, great-grandchildren, and so on) of the 
	XML object that have the given name parameter.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.descendants, descendants
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An XMLList object of matching descendants. If there are no descendants, returns an 
	empty XMLList object.
	
	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn><apiParam><apiItemName>name</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiData>*</apiData><apiDesc>The name of the element to match.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Returns all descendants (children, grandchildren, great-grandchildren, and so on) of the 
	XML object that have the given <codeph>name</codeph> parameter. The <codeph>name</codeph> parameter
	is optional. The <codeph>name</codeph> parameter can be a QName object, a String data type
	or any other data type that is then converted to a String data type.
	
	<p>To return all descendants, use the "~~" parameter. If no parameter is passed,
	the string "~~" is passed and returns all descendants of the XML object.</p>
	
	</apiDesc><example conref="examples\XMLDescendantsExample1.as"> To return descendants with names that match ActionScript reserved words, use the 
 <codeph>descendants()</codeph> method instead of the descendant (..) operator, as in the 
 following example: 
<codeblock>
var xml:XML = 
  &lt;enrollees&gt;
    &lt;student id="239"&gt;
        &lt;class name="Algebra" /&gt;
        &lt;class name="Spanish 2"/&gt;
    &lt;/student&gt;
    &lt;student id="206"&gt;
        &lt;class name="Trigonometry" /&gt;
        &lt;class name="Spanish 2" /&gt;
    &lt;/student&gt;
  &lt;/enrollees&gt;
trace(xml.descendants("class")); 
</codeblock></example><example conref="examples\XML.descendants.1.as"> The following example shows that the <codeph>descendants()</codeph> method returns an XMLList object
 that contains <i>all</i> descendant objects, including children, grandchildren, and so on:
<codeblock>
XML.ignoreComments = false;
var xml:XML = 
        &lt;body&gt;
            &lt;!-- comment --&gt;
            text1
            &lt;a&gt;
                &lt;b&gt;text2&lt;/b&gt;
            &lt;/a&gt;
        &lt;/body&gt;;
trace(xml.descendants("*").length()); // 5
trace(xml.descendants("*")[0]); // // &lt;!-- comment --&gt;
trace(xml.descendants("*")[1].toXMLString()); // text1
trace(xml.descendants("a").toXMLString()); // &lt;a&gt;&lt;b&gt;text2&lt;/b&gt;&lt;/a&gt;
trace(xml.descendants("b").toXMLString()); // &lt;b&gt;text2&lt;/b&gt;
</codeblock></example></apiOperationDetail><related-links><link href="operators.html#descendant_accessor"><linktext>descendant accessor (..) operator</linktext></link></related-links></apiOperation><apiOperation id="XML:AS3:elements"><apiName>elements</apiName><shortdesc>
	 Lists the elements of an XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.elements, elements
	 </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An XMLList object of the element's content. The element's content falls between the start and 
	 end tags. If you use the asterisk (~~) to call all elements, both the 
	 element's tags and content are returned.
	 
	 </apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn><apiParam><apiItemName>name</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiData>*</apiData><apiDesc>The name of the element. An element's name is surrounded by angle brackets. 
	 For example, "<codeph>first</codeph>" is the <codeph>name</codeph> in this example: 
	 <codeph>&lt;first&gt;&lt;/first&gt;</codeph>. 
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Lists the elements of an XML object. An element consists of a start and an end tag; 
	 for example <codeph>&lt;first&gt;&lt;/first&gt;</codeph>. The <codeph>name</codeph> parameter 
	 is optional. The <codeph>name</codeph> parameter can be a QName object, a String data type,
	 or any other data type that is then converted to a String data type. Use the <codeph>name</codeph> parameter to list a specific element. For example, 
	 the element "<codeph>first</codeph>" returns "<codeph>John</codeph>" in this example: 
	 <codeph>&lt;first&gt;John&lt;/first&gt;</codeph>. 
	 
	 <p>To list all elements, use the asterisk (~~) as the 
	 parameter. The asterisk is also the default parameter. </p>
	 
	 <p>Use the <codeph>length()</codeph> method with the asterisk parameter to output the total 
	 number of elements. For example, <codeph>numElement = addressbook.elements("~~").length()</codeph>.</p>
	 
	 </apiDesc><example conref="examples\XML.elements.1.as"> The following example shows that the <codeph>elements()</codeph> method returns a 
 list of elements only
 — not comments, text properties, or processing instructions:
<codeblock>
var xml:XML = 
        &lt;foo&gt;
            &lt;!-- comment --&gt;
            &lt;?instruction ?&gt;
            text
            &lt;a&gt;1&lt;/a&gt;
            &lt;b&gt;2&lt;/b&gt;
        &lt;/foo&gt;;
trace(xml.elements("*").length()); // 2
trace(xml.elements("*")[0].toXMLString()); // &lt;a&gt;1&lt;/a&gt;
trace(xml.elements("b").length()); // 1
trace(xml.elements("b")[0].toXMLString()); // &lt;b&gt;2&lt;/b&gt;
</codeblock></example><example conref="examples\XMLElementsExample1.as"> To return elements with names that match ActionScript reserved words, 
 use the <codeph>elements()</codeph> method instead of the XML dot (.) operator, 
 as in the following example:
<codeblock>
var xml:XML =
 &lt;student id="206"&gt;
    &lt;class name="Trigonometry" /&gt;
    &lt;class name="Spanish 2" /&gt;
 &lt;/student&gt;
trace(xml.elements("class")); 
</codeblock></example></apiOperationDetail><related-links><link href="#XML/child()"><linktext>XML.child()</linktext></link><link href="#XMLList"><linktext>XMLList class</linktext></link><link href="#XML/length()"><linktext>XML.length()</linktext></link><link href="#XML/attribute()"><linktext>XML.attribute()</linktext></link><link href="operators.html#dot_(XML)"><linktext>XML dot (.) operator</linktext></link></related-links></apiOperation><apiOperation id="XML:AS3:hasComplexContent"><apiName>hasComplexContent</apiName><shortdesc>
	Checks to see whether the XML object contains complex content.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.hasComplexContent, hasComplexContent
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>If the XML object contains complex content, <codeph>true</codeph>; otherwise <codeph>false</codeph>.
	
	</apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Checks to see whether the XML object contains complex content. An XML object contains complex content if  
	it has child elements. XML objects that representing attributes, comments, processing instructions, 
	and text nodes do not have complex content. However, an object that <i>contains</i> these can 
	still be considered to contain complex content (if the object has child elements).
	
	</apiDesc><example conref="examples\XML.hasComplexContent.1.as"> The following example shows an XML object with one property named <codeph>a</codeph> that has
 simple content and one property named <codeph>a</codeph> that has complex content:
<codeblock>
var xml:XML = 
        &lt;foo&gt;
            &lt;a&gt;
                text
            &lt;/a&gt;
            &lt;a&gt;
                &lt;b/&gt;
            &lt;/a&gt;
        &lt;/foo&gt;;
trace(xml.a[0].hasComplexContent()); // false
trace(xml.a[1].hasComplexContent()); // true

trace(xml.a[0].hasSimpleContent()); // true
trace(xml.a[1].hasSimpleContent()); // false
</codeblock></example></apiOperationDetail><related-links><link href="#XML/hasSimpleContent()"><linktext>XML.hasSimpleContent()</linktext></link></related-links></apiOperation><apiOperation id="XML:AS3:hasOwnProperty"><apiName>hasOwnProperty</apiName><shortdesc>
	Checks to see whether the object has the property specified by the p parameter.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.hasOwnProperty, hasOwnProperty
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>If the property exists, <codeph>true</codeph>; otherwise <codeph>false</codeph>.
	
	</apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn><apiParam><apiItemName>p</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The property to match.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Checks to see whether the object has the property specified by the <codeph>p</codeph> parameter. 
	
	</apiDesc><example conref="examples\XML.hasOwnProperty.1.as"> The following example uses the <codeph>hasOwnProperty()</codeph> method to ensure
 that a property (<codeph>b</codeph>) exists prior to evaluating an expression (<codeph>b == "11"</codeph>) that uses the
 property:
<codeblock>
var xml:XML = 
        &lt;foo&gt;
            &lt;a /&gt;
            &lt;a&gt;
                &lt;b&gt;10&lt;/b&gt;
            &lt;/a&gt;
            &lt;a&gt;
                &lt;b&gt;11&lt;/b&gt;
            &lt;/a&gt;
        &lt;/foo&gt;;
trace(xml.a.(hasOwnProperty("b") &amp;&amp; b == "11")); 
</codeblock> If the last line in this example were the following, Flash Player would throw an exception since 
 the first element named <codeph>a</codeph> does not have a property named <codeph>b</codeph>:
 <p>
 <pre>trace(xml.a.(b == "11"));</pre>
 </p>
</example><example conref="examples\XML.hasOwnProperty.2.as"> The following example uses the <codeph>hasOwnProperty()</codeph> method to ensure
 that a property (<codeph>item</codeph>) exists prior to evaluating an expression 
 (<codeph>item.contains("toothbrush")</codeph>) that uses the
 property:
<codeblock>
var xml:XML = 
        &lt;orders&gt;
            &lt;order id='1'&gt;
                &lt;item&gt;toothbrush&lt;/item&gt;
                &lt;item&gt;toothpaste&lt;/item&gt;
            &lt;/order&gt;
            &lt;order&gt;
                &lt;returnItem&gt;shoe polish&lt;/returnItem&gt;
            &lt;/order&gt;
        &lt;/orders&gt;;
trace(xml.order.(hasOwnProperty("item") &amp;&amp; item.contains("toothbrush"))); 
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:hasSimpleContent"><apiName>hasSimpleContent</apiName><shortdesc>
	Checks to see whether the XML object contains simple content.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.hasSimpleContent, hasSimpleContent
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>If the XML object contains simple content, <codeph>true</codeph>; otherwise <codeph>false</codeph>.
	
	 </apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Checks to see whether the XML object contains simple content. An XML object contains simple content 
	if it represents a text node, an attribute node, or an XML element that has no child elements. 
	XML objects that represent comments and processing instructions do <i>not</i> contain simple 
	content.
	
	</apiDesc><example conref="examples\XML.hasComplexContent.1.as"> The following example shows an XML object with one property named <codeph>a</codeph> that has
 simple content and one property named <codeph>a</codeph> that has complex content:
<codeblock>
var xml:XML = 
        &lt;foo&gt;
            &lt;a&gt;
                text
            &lt;/a&gt;
            &lt;a&gt;
                &lt;b/&gt;
            &lt;/a&gt;
        &lt;/foo&gt;;
trace(xml.a[0].hasComplexContent()); // false
trace(xml.a[1].hasComplexContent()); // true

trace(xml.a[0].hasSimpleContent()); // true
trace(xml.a[1].hasSimpleContent()); // false
</codeblock></example></apiOperationDetail><related-links><link href="#XML/hasComplexContent()"><linktext>XML.hasComplexContent()</linktext></link></related-links></apiOperation><apiOperation id="XML:AS3:inScopeNamespaces"><apiName>inScopeNamespaces</apiName><shortdesc>
	Lists the namespaces for the XML object, based on the object's parent.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.inScopeNamespaces, inScopeNamespaces
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An array of Namespace objects. 
	
	</apiDesc><apiOperationClassifier>Array</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Lists the namespaces for the XML object, based on the object's parent. 
	
	</apiDesc></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:insertChildAfter"><apiName>insertChildAfter</apiName><shortdesc>
	Inserts the given child2 parameter after the child1 parameter in this XML object and returns the 
	resulting object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.insertChildAfter, insertChildAfter
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The resulting XML object or <codeph>undefined</codeph>.
	
	</apiDesc><apiType value="any"/></apiReturn><apiParam><apiItemName>child1</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>The object in the source object that you insert before <codeph>child2</codeph>.
	</apiDesc></apiParam><apiParam><apiItemName>child2</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>The object to insert.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Inserts the given <codeph>child2</codeph> parameter after the <codeph>child1</codeph> parameter in this XML object and returns the 
	resulting object. If the <codeph>child1</codeph> parameter is <codeph>null</codeph>, the method
	inserts the contents of <codeph>child2</codeph> <i>before</i> all children of the XML object 
	(in other words, after <i>none</i>). If <codeph>child1</codeph> is provided, but it does not 
	exist in the XML object, the XML object is not modified and <codeph>undefined</codeph> is 
	returned.
	
	<p>If you call this method on an XML child that is not an element (text, attributes, comments, pi, and so on) 
	<codeph>undefined</codeph> is returned.</p>
    
    <p>Use the <codeph>delete</codeph> (XML) operator to remove XML nodes.</p>
	
	</apiDesc><example conref="examples\XML.insertChildAfter.1.as"> The following example appends an element to the end of the child elements of an XML object:
<codeblock>
var xml:XML = 
        &lt;menu&gt;
            &lt;item&gt;burger&lt;/item&gt;
            &lt;item&gt;soda&lt;/item&gt;
        &lt;/menu&gt;;
xml.insertChildAfter(xml.item[0], &lt;saleItem&gt;fries&lt;/saleItem&gt;);
trace(xml);
</codeblock> The <codeph>trace()</codeph> output is the following:
 <pre><codeph> &lt;menu&gt;
     &lt;item&gt;burger&lt;/item&gt;
     &lt;saleItem&gt;fries&lt;/saleItem&gt;
     &lt;item&gt;soda&lt;/item&gt;
 &lt;/menu&gt;</codeph></pre>
</example></apiOperationDetail><related-links><link href="#XML/insertChildBefore()"><linktext>XML.insertChildBefore()</linktext></link><link href="operators.html#delete_(XML)"><linktext>delete (XML) operator</linktext></link></related-links></apiOperation><apiOperation id="XML:AS3:insertChildBefore"><apiName>insertChildBefore</apiName><shortdesc>
	Inserts the given child2 parameter before the child1 parameter 
	in this XML object and returns the resulting object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.insertChildBefore, insertChildBefore
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The resulting XML object or <codeph>undefined</codeph>.
	
	</apiDesc><apiType value="any"/></apiReturn><apiParam><apiItemName>child1</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>The object in the source object that you insert after <codeph>child2</codeph>.
	</apiDesc></apiParam><apiParam><apiItemName>child2</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>The object to insert.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Inserts the given <codeph>child2</codeph> parameter before the <codeph>child1</codeph> parameter 
	in this XML object and returns the resulting object. If the <codeph>child1</codeph> parameter 
	is <codeph>null</codeph>, the method inserts the contents of    
	<codeph>child2</codeph> <i>after</i> all children of the XML object (in other words, before 
	<i>none</i>). If <codeph>child1</codeph> is provided, but it does not exist in the XML object, 
	the XML object is not modified and <codeph>undefined</codeph> is returned.
	
	<p>If you call this method on an XML child that is not an element (text, attributes, 
	comments, pi, and so on) <codeph>undefined</codeph> is returned.</p>
    
    <p>Use the <codeph>delete</codeph> (XML) operator to remove XML nodes.</p>
	
	</apiDesc><example conref="examples\XML.insertChildBefore.1.as"> The following example appends an element to the end of the child elements of an XML object:
<codeblock>
var xml:XML = 
        &lt;menu&gt;
            &lt;item&gt;burger&lt;/item&gt;
            &lt;item&gt;soda&lt;/item&gt;
        &lt;/menu&gt;;
xml.insertChildBefore(xml.item[0], &lt;saleItem&gt;fries&lt;/saleItem&gt;);
trace(xml);
</codeblock> The <codeph>trace()</codeph> output is the following:
 <pre>
 &lt;menu&gt;
     &lt;saleItem&gt;fries&lt;/saleItem&gt;
     &lt;item&gt;burger&lt;/item&gt;
     &lt;item&gt;soda&lt;/item&gt;
 &lt;/menu&gt;</pre>
</example></apiOperationDetail><related-links><link href="#XML/insertChildAfter()"><linktext>XML.insertChildAfter()</linktext></link><link href="operators.html#delete_(XML)"><linktext>delete (XML) operator</linktext></link></related-links></apiOperation><apiOperation id="XML:AS3:length"><apiName>length</apiName><shortdesc>
	For XML objects, this method always returns the integer 1.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.length, length
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>Always returns <codeph>1</codeph> for any XML object.
	
	</apiDesc><apiOperationClassifier>int</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	For XML objects, this method always returns the integer <codeph>1</codeph>. 
	The <codeph>length()</codeph> method of the XMLList class returns a value of <codeph>1</codeph> for 
	an XMLList object that contains only one value.
	
	</apiDesc></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:localName"><apiName>localName</apiName><shortdesc>
	Gives the local name portion of the qualified name of the XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.localName, localName
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The local name as either a String or <codeph>null</codeph>.
	
	</apiDesc><apiOperationClassifier>Object</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Gives the local name portion of the qualified name of the XML object.
	
	</apiDesc><example conref="examples\XML.localName.1.as"> The following example illustrates the use of the <codeph>localName()</codeph> method:
<codeblock>
var xml:XML = 
        &lt;soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
            soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"&gt;

                        &lt;soap:Body xmlns:wx = "http://example.com/weather"&gt;
                &lt;wx:forecast&gt;
                    &lt;wx:city&gt;Quito&lt;/wx:city&gt;
                &lt;/wx:forecast&gt;
            &lt;/soap:Body&gt;
        &lt;/soap:Envelope&gt;;
        
trace(xml.localName()); // Envelope
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:name"><apiName>name</apiName><shortdesc>
	Gives the qualified name for the XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.name, name
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The qualified name is either a QName or <codeph>null</codeph>.
	
	</apiDesc><apiOperationClassifier>Object</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Gives the qualified name for the XML object. 
	
	</apiDesc><example conref="examples\XML.name.1.as"> The following example illustrates the use of the <codeph>name()</codeph> method to get the qualified
 name of an XML object:
<codeblock>
var xml:XML = 
        &lt;soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
            soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"&gt;

                        &lt;soap:Body xmlns:wx = "http://example.com/weather"&gt;
                &lt;wx:forecast&gt;
                    &lt;wx:city&gt;Quito&lt;/wx:city&gt;
                &lt;/wx:forecast&gt;
            &lt;/soap:Body&gt;
        &lt;/soap:Envelope&gt;;
        
trace(xml.name().localName); // Envelope
trace(xml.name().uri); // "http://www.w3.org/2001/12/soap-envelope"
</codeblock></example><example conref="examples\XML.name.2.as"> The following example illustrates the use of the <codeph>name()</codeph> method called on an XML property,
 on a text element, and on an attribute:
<codeblock>
var xml:XML = 
        &lt;foo x="15" y="22"&gt;
            text
        &lt;/foo&gt;;
        
trace(xml.name().localName); // foo
trace(xml.name().uri == ""); // true
trace(xml.children()[0]); // text
trace(xml.children()[0].name()); // null
trace(xml.attributes()[0]); // 15
trace(xml.attributes()[0].name()); // x
</codeblock></example></apiOperationDetail><related-links><link href="#XML/attributes()"><linktext>XML.attributes()</linktext></link><link href="operators.html#attribute_identifier"><linktext>attribute identifier</linktext></link></related-links></apiOperation><apiOperation id="XML:AS3:namespace"><apiName>namespace</apiName><shortdesc>
	If no parameter is provided, gives the namespace associated with the qualified name of 
	this XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.namespace, namespace
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>Returns <codeph>null</codeph>, <codeph>undefined</codeph>, or a namespace.
	
	</apiDesc><apiType value="any"/></apiReturn><apiParam><apiItemName>prefix</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiData>null</apiData><apiDesc>The prefix you want to match.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	If no parameter is provided, gives the namespace associated with the qualified name of 
	this XML object. If a <codeph>prefix</codeph> parameter is specified, the method returns the namespace 
	that matches the <codeph>prefix</codeph> parameter and that is in scope for the XML object. If there is no 
	such namespace, the method returns <codeph>undefined</codeph>.
	
	</apiDesc><example conref="examples\XML.namespace.1.as"> The following example uses the <codeph>namespace()</codeph> method 
 to get the namespace of an XML object and assign it to a Namespace object named <codeph>soap</codeph>
 which is then used in identifying a property of the <codeph>xml</codeph> object 
 (<codeph>xml.soap::Body[0]</codeph>):
<codeblock>
var xml:XML = 
        &lt;soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
            soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"&gt;

                        &lt;soap:Body xmlns:wx = "http://example.com/weather"&gt;
                &lt;wx:forecast&gt;
                    &lt;wx:city&gt;Quito&lt;/wx:city&gt;
                &lt;/wx:forecast&gt;
            &lt;/soap:Body&gt;
        &lt;/soap:Envelope&gt;;
        
var soap:Namespace = xml.namespace();
trace(soap.prefix); // soap
trace(soap.uri); // http://www.w3.org/2001/12/soap-envelope

var body:XML = xml.soap::Body[0];
trace(body.namespace().prefix); // soap
trace(xml.namespace().uri); // http://www.w3.org/2001/12/soap-envelope
trace(body.namespace("wx").uri); // "http://example.com/weather"
</codeblock></example><example conref="examples\XML.namespace.2.as"> The following example uses the <codeph>namespace()</codeph> method to get the 
 default namespace for a node, as well as the namespace for a specific prefix (<codeph>"dc"</codeph>):
<codeblock>
var xml:XML = 
        &lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
            xmlns:dc="http://purl.org/dc/elements/1.1/" 
            xmlns="http://purl.org/rss/1.0/"&gt;
                &lt;!-- ... --&gt;
        &lt;/rdf:RDF&gt;;
                    
trace(xml.namespace()); // http://www.w3.org/1999/02/22-rdf-syntax-ns#
trace(xml.namespace("dc")); // http://purl.org/dc/elements/1.1/
trace(xml.namespace("foo")); // undefined
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:namespaceDeclarations"><apiName>namespaceDeclarations</apiName><shortdesc>
	Lists namespace declarations associated with the XML object in the context of its parent.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.namespaceDeclarations, namespaceDeclarations
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>An array of Namespace objects.
	
	</apiDesc><apiOperationClassifier>Array</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Lists namespace declarations associated with the XML object in the context of its parent. 
	
	</apiDesc><example conref="examples\XML.namespaceDeclarations.1.as"> The following example outputs the namespace declarations of an
 XML object:
<codeblock>
var xml:XML = 
        &lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
            xmlns:dc="http://purl.org/dc/elements/1.1/" 
            xmlns="http://purl.org/rss/1.0/"&gt;

            &lt;!-- ... --&gt;
            
        &lt;/rdf:RDF&gt;;
                    
for (var i:uint = 0; i &lt; xml.namespaceDeclarations().length; i++) {
    var ns:Namespace = xml.namespaceDeclarations()[i]; 
    var prefix:String = ns.prefix;
    if (prefix == "") {
        prefix = "(default)";
    }
    trace(prefix + ":" , ns.uri);
}
</codeblock> The <codeph>trace()</codeph> output is the following:
 <pre><codeph>rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
 dc: http://purl.org/dc/elements/1.1/
 (default): http://purl.org/rss/1.0/</codeph></pre>
</example></apiOperationDetail><related-links><link href="#XML/namespace()"><linktext>XML.namespace()</linktext></link></related-links></apiOperation><apiOperation id="XML:AS3:nodeKind"><apiName>nodeKind</apiName><shortdesc>
	Specifies the type of node: text, comment, processing-instruction,  
	attribute, or element.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.nodeKind, nodeKind
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The node type used.
	
	</apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Specifies the type of node: text, comment, processing-instruction,  
	attribute, or element. 
	
	</apiDesc><example conref="examples\XMLNodeKindExample1.as"> This example traces all five node types:
<codeblock>
XML.ignoreComments = false;
XML.ignoreProcessingInstructions = false;

var xml:XML = 
    &lt;example id="10"&gt;
        &lt;!-- this is a comment --&gt;
        &lt;?test this is a pi ?&gt;
        and some text
    &lt;/example&gt;;

trace(xml.nodeKind()); // element
trace(xml.children()[0].nodeKind()); // comment
trace(xml.children()[1].nodeKind()); // processing-instruction
trace(xml.children()[2].nodeKind()); // text
trace(xml.@id[0].nodeKind()); // attribute
</codeblock></example></apiOperationDetail><related-links><link href="operators.html#attribute_identifier"><linktext>attribute identifier</linktext></link></related-links></apiOperation><apiOperation id="XML:AS3:normalize"><apiName>normalize</apiName><shortdesc>
	For the XML object and all descendant XML objects, merges adjacent text nodes and 
	eliminates empty text nodes.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.normalize, normalize
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The resulting normalized XML object.
	
	</apiDesc><apiOperationClassifier>XML</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	For the XML object and all descendant XML objects, merges adjacent text nodes and 
	eliminates empty text nodes.
	
	</apiDesc><example conref="examples\XML.normalize.1.as"> The following example shows the effect of calling the <codeph>normalize()</codeph> method:
<codeblock>
var xml:XML = &lt;body&gt;&lt;/body&gt;;
xml.appendChild("hello");
xml.appendChild(" world");
trace(xml.children().length()); // 2
xml.normalize();
trace(xml.children().length()); // 1
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:parent"><apiName>parent</apiName><shortdesc>
	Returns the parent of the XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.parent, parent
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>Either an XML reference of the parent node, or <codeph>undefined</codeph>
	if the XML object has no parent.
	
	</apiDesc><apiType value="any"/></apiReturn></apiOperationDef><apiDesc>
	Returns the parent of the XML object. If the XML object has no parent, the method returns 
	<codeph>undefined</codeph>.
	
	</apiDesc><example conref="examples\XML.parent.1.as"> The following example uses the <codeph>parent()</codeph> method to identify the parent element
 of a specific element in an XML structure:
<codeblock>
var xml:XML = 
    &lt;body&gt;
        &lt;p id="p1"&gt;Hello&lt;/p&gt;
        &lt;p id="p2"&gt;Test:
            &lt;ul&gt;
                &lt;li&gt;1&lt;/li&gt;
                &lt;li&gt;2&lt;/li&gt;
            &lt;/ul&gt;
        &lt;/p&gt;
    &lt;/body&gt;;
var node:XML = xml.p.ul.(li.contains("1"))[0]; // == &lt;ul&gt; ... &lt;/ul&gt;
trace(node.parent().@id); // p2
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:prependChild"><apiName>prependChild</apiName><shortdesc>
	Inserts a copy of the provided child object into the XML element before any existing XML 
	properties for that element.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.prependChild, prependChild
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The resulting XML object.
    
    </apiDesc><apiOperationClassifier>XML</apiOperationClassifier></apiReturn><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>The object to insert.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Inserts a copy of the provided <codeph>child</codeph> object into the XML element before any existing XML 
	properties for that element.
    
    <p>Use the <codeph>delete</codeph> (XML) operator to remove XML nodes.</p> 
	
	</apiDesc><example conref="examples\XML.prependChild.1.as"> The following example uses the <codeph>prependChild()</codeph> method to add an element to the 
 begining of a child list of an XML object:
<codeblock>
var xml:XML = 
        &lt;body&gt;
            &lt;p&gt;hello&lt;/p&gt;
        &lt;/body&gt;;
        
xml.prependChild(&lt;p&gt;world&lt;/p&gt;);    
trace(xml.p[0].toXMLString()); // &lt;p&gt;world&lt;/p&gt;
trace(xml.p[1].toXMLString()); // &lt;p&gt;hello&lt;/p&gt;
</codeblock></example></apiOperationDetail><related-links><link href="operators.html#delete_(XML)"><linktext>delete (XML) operator</linktext></link></related-links></apiOperation><apiOperation id="XML:AS3:processingInstructions"><apiName>processingInstructions</apiName><shortdesc>
	If a name parameter is provided, lists all the children of the XML object 
	that contain processing instructions with that name.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.processingInstructions, processingInstructions
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A list of matching child objects.
	
	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn><apiParam><apiItemName>name</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiData>*</apiData><apiDesc>The name of the processing instructions to match.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	If a <codeph>name</codeph> parameter is provided, lists all the children of the XML object 
	that contain processing instructions with that <codeph>name</codeph>. With no parameters, the method 
	lists all the children of the XML object that contain any processing instructions.
	
	</apiDesc><example conref="examples\XML.processingInstructions.1.as"> The following example uses the <codeph>processingInstructions()</codeph> method to get an
 array of processing instructions for an XML object:
<codeblock>
XML.ignoreProcessingInstructions = false;
var xml:XML =
    &lt;body&gt;
            foo
            &lt;?xml-stylesheet href="headlines.css" type="text/css" ?&gt;
            &lt;?instructionX ?&gt;
            
    &lt;/body&gt;;

trace(xml.processingInstructions().length()); // 2
trace(xml.processingInstructions()[0].name()); // xml-stylesheet
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:propertyIsEnumerable"><apiName>propertyIsEnumerable</apiName><shortdesc>
	Checks whether the property p is in the set of properties that can be iterated in a 
	for..in statement applied to the XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.propertyIsEnumerable, propertyIsEnumerable
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>If the property can be iterated in a <codeph>for..in</codeph> statement, <codeph>true</codeph>; 
	otherwise, <codeph>false</codeph>.
	
	</apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn><apiParam><apiItemName>p</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The property that you want to check.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Checks whether the property <codeph>p</codeph> is in the set of properties that can be iterated in a 
	<codeph>for..in</codeph> statement applied to the XML object. Returns <codeph>true</codeph> only 
	if <codeph>toString(p) == "0"</codeph>. 
	
	</apiDesc><example conref="examples\XML.propertyIsEnumerable.1.as"> The following example shows that, for an XML object, the 
 <codeph>propertyNameIsEnumerable()</codeph> method returns a value of 
 <codeph>true</codeph> only for the value <codeph>0</codeph>; whereas for an 
 XMLList object, the return value is <codeph>true</codeph> for each valid index 
 value for the XMLList object:
<codeblock>
var xml:XML = 
        &lt;body&gt;
             &lt;p&gt;Hello&lt;/p&gt;
               &lt;p&gt;World&lt;/p&gt;
        &lt;/body&gt;;

trace(xml.propertyIsEnumerable(0)); // true
trace(xml.propertyIsEnumerable(1)); // false

for (var propertyName:String in xml) {
    trace(xml[propertyName]);
}

var list:XMLList = xml.p;
trace(list.propertyIsEnumerable(0)); // true
trace(list.propertyIsEnumerable(1)); // true
trace(list.propertyIsEnumerable(2)); // false

for (var propertyName:String in list) { 
    trace(list[propertyName]);
}
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:removeNamespace"><apiName>removeNamespace</apiName><shortdesc>
	Removes the given namespace for this object and all descendants.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.removeNamespace, removeNamespace
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A copy of the resulting XML object.
	
	</apiDesc><apiOperationClassifier>XML</apiOperationClassifier></apiReturn><apiParam><apiItemName>ns</apiItemName><apiOperationClassifier>Namespace</apiOperationClassifier><apiDesc>The namespace to remove.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Removes the given namespace for this object and all descendants. The <codeph>removeNamespaces()</codeph> 
	method does not remove a namespace if it is referenced by the object's qualified name or the 
	qualified name of the object's attributes.
	
	</apiDesc><example conref="examples\XML.removeNamespace.1.as"> The following example shows how to remove a namespace declaration
 from an XML object:
<codeblock>
var xml:XML = 
    &lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
        xmlns:dc="http://purl.org/dc/elements/1.1/" 
        xmlns="http://purl.org/rss/1.0/"&gt;
    
        &lt;!-- ... --&gt;
        
    &lt;/rdf:RDF&gt;;

trace(xml.namespaceDeclarations().length); // 3
trace(xml.namespaceDeclarations()[0] is String); // 
var dc:Namespace = xml.namespace("dc");
xml.removeNamespace(dc);
trace(xml.namespaceDeclarations().length); // 2
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:replace"><apiName>replace</apiName><shortdesc>
	Replaces the properties specified by the propertyName parameter 
	with the given value parameter.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.replace, replace
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The resulting XML object, with the matching properties replaced.
	
	</apiDesc><apiOperationClassifier>XML</apiOperationClassifier></apiReturn><apiParam><apiItemName>propertyName</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>Can be a 
	numeric value, an unqualified name for a set of XML elements, a qualified name for a set of 
	XML elements, or the asterisk wildcard ("*"). 
	Use an unqualified name to identify XML elements in the default namespace. 
	
	</apiDesc></apiParam><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>XML</apiOperationClassifier><apiDesc>The replacement value. This can be an XML object, an XMLList object, or any value 
	that can be converted with <codeph>toString()</codeph>. 
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Replaces the properties specified by the <codeph>propertyName</codeph> parameter 
	with the given <codeph>value</codeph> parameter. 
	If no properties match <codeph>propertyName</codeph>, the XML object is left unmodified.
	
	</apiDesc><example conref="examples\XML.replace.1.as"> The following example illustrates calling the <codeph>replace()</codeph> method
 with an integer as the first parameter:
<codeblock>
var xml:XML = 
    &lt;body&gt;
        &lt;p&gt;Hello&lt;/p&gt;
        &lt;p&gt;World&lt;/p&gt;
        &lt;hr/&gt;
    &lt;/body&gt;;

xml.replace(1, &lt;p&gt;Bob&lt;/p&gt;);
trace(xml);
</codeblock> This results in the following <codeph>trace()</codeph> output:
 <pre><codeph>
 &lt;body&gt;
     &lt;p&gt;Hello&lt;/p&gt;
     &lt;p&gt;Bob&lt;/p&gt;
     &lt;hr/&gt;
 &lt;/body&gt;
 </codeph></pre>
</example><example conref="examples\XML.replace.2.as"> The following example calls <codeph>replace()</codeph> method
 with a string as the first parameter:
<codeblock>
var xml:XML = 
    &lt;body&gt;
        &lt;p&gt;Hello&lt;/p&gt;
        &lt;p&gt;World&lt;/p&gt;
        &lt;hr/&gt;
    &lt;/body&gt;;

xml.replace("p", &lt;p&gt;Hi&lt;/p&gt;); 
trace(xml);
</codeblock> This results in the following <codeph>trace()</codeph> output:
 
 <pre><codeph>
 &lt;body&gt;
     &lt;p&gt;Hi&lt;/p&gt;
     &lt;hr/&gt;
 &lt;/body&gt;;
 </codeph></pre>
</example><example conref="examples\XML.replace.3.as"> The following example illustrates calling the <codeph>replace()</codeph> method
 with a QName as the first parameter:
<codeblock>
var xml:XML = 
    &lt;ns:body xmlns:ns = "myNS"&gt;
        &lt;ns:p&gt;Hello&lt;/ns:p&gt;
        &lt;ns:p&gt;World&lt;/ns:p&gt;
        &lt;hr/&gt;
    &lt;/ns:body&gt;;

var qname:QName = new QName("myNS", "p");
xml.replace(qname, &lt;p&gt;Bob&lt;/p&gt;);
trace(xml);

</codeblock> This results in the following <codeph>trace()</codeph> output:
 
 <pre><codeph>
 &lt;ns:body xmlns:ns = "myNS"&gt;
     &lt;p&gt;Bob&lt;/p&gt;
     &lt;hr/&gt;
 &lt;/ns:body&gt;
 </codeph></pre>
</example><example conref="examples\XML.replace.4.as"> The following example illustrates calling the <codeph>replace()</codeph> method
 with the string <codeph>"*"</codeph> as the first parameter:
<codeblock>
var xml:XML = 
    &lt;body&gt;
        &lt;p&gt;Hello&lt;/p&gt;
        &lt;p&gt;World&lt;/p&gt;
        &lt;hr/&gt;
    &lt;/body&gt;;

xml.replace("*", &lt;img src = "hello.jpg"/&gt;);
trace(xml);
</codeblock> This results in the following <codeph>trace()</codeph> output:
 
 <pre><codeph>
 &lt;body&gt;
     &lt;img src="hello.jpg"/&gt;
 &lt;/body&gt;
 </codeph></pre>
</example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:setChildren"><apiName>setChildren</apiName><shortdesc>
	Replaces the child properties of the XML object with the specified set of XML properties, 
	provided in the value parameter.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.setChildren, setChildren
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The resulting XML object. 
	
	</apiDesc><apiOperationClassifier>XML</apiOperationClassifier></apiReturn><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>The replacement XML properties. Can be a single XML object or an XMLList object. 
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Replaces the child properties of the XML object with the specified set of XML properties, 
	provided in the <codeph>value</codeph> parameter.
	
	</apiDesc><example conref="examples\XML.setChildren.1.as"> The following example illustrates calling the <codeph>setChildren()</codeph> method, first
 using an XML object as the parameter, and then using an XMLList object as the parameter:
<codeblock>
var xml:XML = 
    &lt;body&gt;
        &lt;p&gt;Hello&lt;/p&gt;
        &lt;p&gt;World&lt;/p&gt;
    &lt;/body&gt;;

var list:XMLList = xml.p;

xml.setChildren(&lt;p&gt;hello&lt;/p&gt;);
trace(xml);

//    &lt;body&gt;
//        &lt;p&gt;hello&lt;/p&gt;
//    &lt;/body&gt;

xml.setChildren(list);
trace(xml);

//    &lt;body&gt;
//        &lt;p&gt;Hello&lt;/p&gt;
//        &lt;p&gt;World&lt;/p&gt;
//    &lt;/body&gt;
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:setLocalName"><apiName>setLocalName</apiName><shortdesc>
	Changes the local name of the XML object to the given name parameter.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.setLocalName, setLocalName
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>name</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The replacement name for the local name.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Changes the local name of the XML object to the given <codeph>name</codeph> parameter. 
	
	</apiDesc><example conref="examples\XML.setLocalName.1.as"> The following example uses the <codeph>setLocalName()</codeph> method
 to change the local name of an XML element:
<codeblock>
var xml:XML = 
    &lt;ns:item xmlns:ns="http://example.com"&gt;
        toothbrush
    &lt;/ns:item&gt;;
    
xml.setLocalName("orderItem");
trace(xml.toXMLString()); // &lt;ns:orderItem xmlns:ns="http://example.com"&gt;toothbrush&lt;/ns:orderItem&gt;
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:setName"><apiName>setName</apiName><shortdesc>
	Sets the name of the XML object to the given qualified name or attribute name.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.setName, setName
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>name</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The new name for the object.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Sets the name of the XML object to the given qualified name or attribute name. 
	
	</apiDesc><example conref="examples\XML.setName.1.as"> The following example uses the <codeph>setName()</codeph> method
 to change the name of an XML element:
<codeblock>
var xml:XML = 
    &lt;item&gt;
        toothbrush
    &lt;/item&gt;;
    
xml.setName("orderItem");
trace(xml.toXMLString()); // &lt;orderItem&gt;toothbrush&lt;/orderItem&gt;
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:setNamespace"><apiName>setNamespace</apiName><shortdesc>
	Sets the namespace associated with the XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.setNamespace, setNamespace
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>ns</apiItemName><apiOperationClassifier>Namespace</apiOperationClassifier><apiDesc>The new namespace.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Sets the namespace associated with the XML object.
	
	</apiDesc><example conref="examples\XML.setNamespace.1.as"> The following example uses the <codeph>soap</codeph> namespace defined in one XML object 
 and applies it to the namespace of another XML object (<codeph>xml2</codeph>):
<codeblock>
var xml1:XML = 
        &lt;soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
            soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"&gt;
            &lt;!-- ... --&gt;
        &lt;/soap:Envelope&gt;;
var ns:Namespace = xml1.namespace("soap");

var xml2:XML = 
    &lt;Envelope&gt;
        &lt;Body/&gt;
    &lt;/Envelope&gt;;
    
xml2.setNamespace(ns);

trace(xml2);
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:setSettings"><apiName>setSettings</apiName><shortdesc>
	Sets values for the following XML properties: ignoreComments, 
	ignoreProcessingInstructions, ignoreWhitespace,
	prettyIndent, and prettyPrinting.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.setSettings, setSettings
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiStatic/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>rest</apiItemName><apiType value="restParam"/><apiDesc>An object with each of the following properties: 
	
	<ul>
	   <li><codeph>ignoreComments</codeph></li>
	   <li><codeph>ignoreProcessingInstructions</codeph></li>
	   <li><codeph>ignoreWhitespace</codeph></li>
	   <li><codeph>prettyIndent</codeph></li>
	   <li><codeph>prettyPrinting</codeph></li>
	</ul>
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Sets values for the following XML properties: <codeph>ignoreComments</codeph>, 
	<codeph>ignoreProcessingInstructions</codeph>, <codeph>ignoreWhitespace</codeph>,
	<codeph>prettyIndent</codeph>, and <codeph>prettyPrinting</codeph>.
	
	The following are the default settings, which are applied if no <codeph>setObj</codeph> parameter
	is provided:
	
	<ul>
	   <li><codeph>XML.ignoreComments = true</codeph></li>
	   <li><codeph>XML.ignoreProcessingInstructions = true</codeph></li>
	   <li><codeph>XML.ignoreWhitespace = true</codeph></li>
	   <li><codeph>XML.prettyIndent = 2</codeph></li>
	   <li><codeph>XML.prettyPrinting = true</codeph></li>
	</ul>
	
	<p><b>Note</b>: You do not apply this method to an instance of the XML class; you apply it to 
	<codeph>XML</codeph>, as in the following code: <codeph>XML.setSettings()</codeph>.</p>
	
	</apiDesc><example conref="examples\XML.defaultSettings.1.as"> The following example shows: how to apply some custom settings (for including comments and processing
 instructions) prior to setting an XML object; how to then revert back to the default settings before setting another XML
 object; and then how to set the custom settings again (for setting any more XML objects):
<codeblock>
XML.ignoreComments = false;
XML.ignoreProcessingInstructions = false;
var customSettings:Object = XML.settings();

var xml1:XML = 
        &lt;foo&gt;
            &lt;!-- comment --&gt;
            &lt;?instruction ?&gt;
        &lt;/foo&gt;;
trace(xml1.toXMLString());
//    &lt;foo&gt;
//        &lt;!-- comment --&gt;
//         &lt;?instruction ?&gt;
//    &lt;/foo&gt;

XML.setSettings(XML.defaultSettings());
var xml2:XML = 
        &lt;foo&gt;
            &lt;!-- comment --&gt;
            &lt;?instruction ?&gt;
        &lt;/foo&gt;;
trace(xml2.toXMLString());
</codeblock></example></apiOperationDetail><related-links><link href="#XML/ignoreComments"><linktext>ignoreComments</linktext></link><link href="#XML/ignoreProcessingInstructions"><linktext>ignoreProcessingInstructions</linktext></link><link href="#XML/ignoreWhitespace"><linktext>ignoreWhitespace</linktext></link><link href="#XML/prettyIndent"><linktext>prettyIndent</linktext></link><link href="#XML/prettyPrinting"><linktext>prettyPrinting</linktext></link><link href="#XML/defaultSettings()"><linktext>defaultSettings()</linktext></link><link href="#XML/settings()"><linktext>settings()</linktext></link></related-links></apiOperation><apiOperation id="XML:AS3:settings"><apiName>settings</apiName><shortdesc>
	Retrieves the following properties: ignoreComments, 
	ignoreProcessingInstructions, ignoreWhitespace, 
	prettyIndent, and prettyPrinting.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.settings, settings
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiStatic/><apiReturn><apiDesc>An object with the following XML properties:
	<ul>
	   <li><codeph>ignoreComments</codeph></li>
	   <li><codeph>ignoreProcessingInstructions</codeph></li>
	   <li><codeph>ignoreWhitespace</codeph></li>
	   <li><codeph>prettyIndent</codeph></li>
	   <li><codeph>prettyPrinting</codeph></li>
	</ul>
	
	</apiDesc><apiOperationClassifier>Object</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Retrieves the following properties: <codeph>ignoreComments</codeph>, 
	<codeph>ignoreProcessingInstructions</codeph>, <codeph>ignoreWhitespace</codeph>, 
	<codeph>prettyIndent</codeph>, and <codeph>prettyPrinting</codeph>.
	
	</apiDesc><example conref="examples\XML.defaultSettings.1.as"> The following example shows: how to apply some custom settings (for including comments and processing
 instructions) prior to setting an XML object; how to then revert back to the default settings before setting another XML
 object; and then how to set the custom settings again (for setting any more XML objects):
<codeblock>
XML.ignoreComments = false;
XML.ignoreProcessingInstructions = false;
var customSettings:Object = XML.settings();

var xml1:XML = 
        &lt;foo&gt;
            &lt;!-- comment --&gt;
            &lt;?instruction ?&gt;
        &lt;/foo&gt;;
trace(xml1.toXMLString());
//    &lt;foo&gt;
//        &lt;!-- comment --&gt;
//         &lt;?instruction ?&gt;
//    &lt;/foo&gt;

XML.setSettings(XML.defaultSettings());
var xml2:XML = 
        &lt;foo&gt;
            &lt;!-- comment --&gt;
            &lt;?instruction ?&gt;
        &lt;/foo&gt;;
trace(xml2.toXMLString());
</codeblock></example></apiOperationDetail><related-links><link href="#XML/ignoreComments"><linktext>XML.ignoreComments</linktext></link><link href="#XML/ignoreProcessingInstructions"><linktext>XML.ignoreProcessingInstructions</linktext></link><link href="#XML/ignoreWhitespace"><linktext>XML.ignoreWhitespace</linktext></link><link href="#XML/prettyIndent"><linktext>XML.prettyIndent</linktext></link><link href="#XML/prettyPrinting"><linktext>XML.prettyPrinting</linktext></link><link href="#XML/defaultSettings()"><linktext>XML.defaultSettings()</linktext></link><link href="#XML/setSettings()"><linktext>XML.setSettings()</linktext></link></related-links></apiOperation><apiOperation id="XML:AS3:text"><apiName>text</apiName><shortdesc>
	Returns an XMLList object of all XML properties of the XML object that represent XML text nodes.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.text, text
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The list of properties.
	
	</apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Returns an XMLList object of all XML properties of the XML object that represent XML text nodes.
	
	</apiDesc><example conref="examples\XML.text.1.as"> The following example uses the <codeph>text()</codeph> method to get the text nodes of 
 an XML object:
<codeblock>
var xml:XML =
        &lt;body&gt;
            text1
            &lt;hr/&gt;
            text2
        &lt;/body&gt;;
trace(xml.text()[0]); // text1
trace(xml.text()[1]); // text2
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="XML:AS3:toString"><apiName>toString</apiName><shortdesc>
	Returns a string representation of the XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.toString, toString 
	
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The string representation of the XML object.
	
	</apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Returns a string representation of the XML object. The rules for this conversion depend on whether  
	the XML object has simple content or complex content:
	
	<ul>
		<li>If the XML object has simple content, <codeph>toString()</codeph> returns the String contents of the 
	XML object with  the following stripped out: the start tag, attributes, namespace declarations, and 
	end tag.</li> 
	</ul>
	
	<ul>
		<li> If the XML object has complex content, <codeph>toString()</codeph> returns an XML encoded String 
	representing the entire XML object, including the start tag, attributes, namespace declarations, 
	and end tag.</li>
	</ul>
	
	<p>To return the entire XML object every time, use <codeph>toXMLString()</codeph>.</p>
	
	
	</apiDesc><example conref="examples\XMLToStringExample1.as"> The following example shows what the <codeph>toString()</codeph> method returns when the 
 XML object has simple content:
<codeblock>
var test:XML = &lt;type name="Joe"&gt;example&lt;/type&gt;;
trace(test.toString()); //example
</codeblock></example><example conref="examples\XMLToStringExample2.as"> The following example shows what the <codeph>toString()</codeph> method returns when the 
 XML object has complex content:
<codeblock>
var test:XML = 
&lt;type name="Joe"&gt;
    &lt;base name="Bob"&gt;&lt;/base&gt;
    example
&lt;/type&gt;;
trace(test.toString());
  // &lt;type name="Joe"&gt;
  // &lt;base name="Bob"/&gt;
  // example
  // &lt;/type&gt; 
</codeblock></example></apiOperationDetail><related-links><link href="#XML/hasSimpleContent()"><linktext>XML.hasSimpleContent()</linktext></link><link href="#XML/hasComplexContent()"><linktext>XML.hasComplexContent()</linktext></link><link href="#XML/toXMLString()"><linktext>XML.toXMLString()</linktext></link></related-links></apiOperation><apiOperation id="XML:AS3:toXMLString"><apiName>toXMLString</apiName><shortdesc>
	Returns a string representation of the XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.toXMLString, toXMLString
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The string representation of the XML object.
	
	</apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Returns a string representation of the XML object. Unlike the <codeph>toString()</codeph> method,
	the <codeph>toXMLString()</codeph> method always returns the start tag, attributes,
	and end tag of the XML object, regardless of whether the XML object has simple content or complex 
	content. (The <codeph>toString()</codeph> method strips out these items for XML objects that contain 
	simple content.)
	
	</apiDesc><example conref="examples\XML.toXMLString.1.as"> The following example shows the difference between using the <codeph>toString()</codeph> method 
 (which is applied to all parameters of a <codeph>trace()</codeph> method, by default) and using the
 <codeph>toXMLString()</codeph> method:
<codeblock>
var xml:XML =
        &lt;p&gt;hello&lt;/p&gt;;
trace(xml); // hello
trace(xml.toXMLString()); // &lt;p&gt;hello&lt;/p&gt;
</codeblock></example></apiOperationDetail><related-links><link href="#XML/toString()"><linktext>XML.toString()</linktext></link></related-links></apiOperation><apiOperation id="XML:AS3:valueOf"><apiName>valueOf</apiName><shortdesc>
	Returns the XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.valueOf, valueOf
	</keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The primitive value of an XML instance.
	
	</apiDesc><apiOperationClassifier>XML</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	Returns the XML object. 
	
	</apiDesc><example conref="examples\XML.valueOf.1.as"> The following example shows that the value returned by the <codeph>valueOf()</codeph> method
 is the same as the source XML object:
<codeblock>
var xml:XML = &lt;p&gt;hello&lt;/p&gt;;
trace(xml.valueOf() === xml); // true
</codeblock></example></apiOperationDetail></apiOperation><apiValue id="XML:ignoreComments:get"><apiName>ignoreComments</apiName><shortdesc>
	Determines whether XML comments are ignored 
	when XML objects parse the source XML data.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.ignoreComments, ignoreComments
	</keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiStatic/><apiValueAccess value="readwrite"/><apiValueClassifier>Boolean</apiValueClassifier></apiValueDef><apiDesc>
	Determines whether XML comments are ignored 
	when XML objects parse the source XML data. By default, the comments are ignored 
	(<codeph>true</codeph>). To include XML comments, set this property to <codeph>false</codeph>. 
	The <codeph>ignoreComments</codeph> property is used only during the XML parsing, not during 
	the call to any method such as <codeph>myXMLObject.child(~~).toXMLString()</codeph>. 
	If the source XML includes comment nodes, they are kept or discarded during the XML parsing. 
	
	</apiDesc><example conref="examples\XML.ignoreComments.1.as"> This example shows the effect of setting <codeph>XML.ignoreComments</codeph>
 to <codeph>false</codeph> and to <codeph>true</codeph>:
<codeblock>
XML.ignoreComments = false;
var xml1:XML = 
        &lt;foo&gt;
            &lt;!-- comment --&gt;
        &lt;/foo&gt;;
trace(xml1.toXMLString()); // &lt;foo&gt;&lt;!-- comment --&gt;&lt;/foo&gt;

XML.ignoreComments = true;
var xml2:XML = 
        &lt;foo&gt;
            &lt;!-- example --&gt;
        &lt;/foo&gt;;
trace(xml2.toXMLString()); // &lt;foo/&gt;
</codeblock></example></apiValueDetail><related-links><link href="#XML/child()"><linktext>XML.child()</linktext></link><link href="#XML/toXMLString()"><linktext>XML.toXMLString()</linktext></link></related-links></apiValue><apiValue id="XML:ignoreProcessingInstructions:get"><apiName>ignoreProcessingInstructions</apiName><shortdesc>
	Determines whether XML 
	processing instructions are ignored when XML objects parse the source XML data.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.ignoreProcessingInstructions, ignoreProcessingInstructions
	</keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiStatic/><apiValueAccess value="readwrite"/><apiValueClassifier>Boolean</apiValueClassifier></apiValueDef><apiDesc>
	Determines whether XML 
	processing instructions are ignored when XML objects parse the source XML data. 
	By default, the processing instructions are ignored (<codeph>true</codeph>). To include XML 
	processing instructions, set this property to <codeph>false</codeph>. The 
	<codeph>ignoreProcessingInstructions</codeph> property is used only during the XML parsing, 
	not during the call to any method such as <codeph>myXMLObject.child(~~).toXMLString()</codeph>.
	If the source XML includes processing instructions nodes, they are kept or discarded during 
	the XML parsing.
	
	</apiDesc><example conref="examples\XML.ignoreProcessingInstructions.1.as"> This example shows the effect of setting <codeph>XML.ignoreProcessingInstructions</codeph>
 to <codeph>false</codeph> and to <codeph>true</codeph>:
<codeblock>
XML.ignoreProcessingInstructions = false;
var xml1:XML = 
        &lt;foo&gt;
            &lt;?exampleInstruction ?&gt;
        &lt;/foo&gt;;
trace(xml1.toXMLString()); // &lt;foo&gt;&lt;?exampleInstruction ?&gt;&lt;/foo&gt;

XML.ignoreProcessingInstructions = true;
var xml2:XML = 
        &lt;foo&gt;
            &lt;?exampleInstruction ?&gt;
        &lt;/foo&gt;;
trace(xml2.toXMLString()); // &lt;foo/&gt;
</codeblock></example></apiValueDetail><related-links><link href="#XML/child()"><linktext>XML.child()</linktext></link><link href="#XML/toXMLString()"><linktext>XML.toXMLString()</linktext></link></related-links></apiValue><apiValue id="XML:ignoreWhitespace:get"><apiName>ignoreWhitespace</apiName><shortdesc>
	Determines whether white space characters
	at the beginning and end of text nodes are ignored during parsing.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.ignoreWhitespace, ignoreWhitespace
	</keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiStatic/><apiValueAccess value="readwrite"/><apiValueClassifier>Boolean</apiValueClassifier></apiValueDef><apiDesc>
	Determines whether white space characters
	at the beginning and end of text nodes are ignored during parsing. By default, 
	white space is ignored (<codeph>true</codeph>). If a text node is 100% white space and the 
	<codeph>ignoreWhitespace</codeph> property is set to <codeph>true</codeph>, then the node is not created.  
	To show white space in a text node, set the <codeph>ignoreWhitespace</codeph> property to 
	<codeph>false</codeph>. 
	
	</apiDesc><example conref="examples\XML.ignoreWhitespace.1.as"> This example shows the effect of setting <codeph>XML.ignoreWhitespace</codeph>
 to <codeph>false</codeph> and to <codeph>true</codeph>:
<codeblock>
XML.ignoreWhitespace = false;
var xml1:XML = &lt;foo&gt;    &lt;/foo&gt;;
trace(xml1.children().length()); // 1

XML.ignoreWhitespace = true;
var xml2:XML = &lt;foo&gt;    &lt;/foo&gt;;
trace(xml2.children().length()); // 0
</codeblock></example></apiValueDetail></apiValue><apiValue id="XML:prettyIndent:get"><apiName>prettyIndent</apiName><shortdesc>
	Determines the amount of indentation applied by 
	the toString() and toXMLString() methods when 
	the XML.prettyPrinting property is set to true.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.prettyIndent, prettyIndent
	</keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiStatic/><apiValueAccess value="readwrite"/><apiValueClassifier>int</apiValueClassifier></apiValueDef><apiDesc>
	Determines the amount of indentation applied by 
	the <codeph>toString()</codeph> and <codeph>toXMLString()</codeph> methods when 
	the <codeph>XML.prettyPrinting</codeph> property is set to <codeph>true</codeph>. 
	Indentation is applied with the space character, not the tab character.
	
	The default value is <codeph>2</codeph>.
	
	</apiDesc><example conref="examples\XML.prettyIndent.1.as"> This example shows the effect of setting the <codeph>XML.prettyIndent</codeph>
 static property:
<codeblock>
var xml:XML = &lt;foo&gt;&lt;bar/&gt;&lt;/foo&gt;;
XML.prettyIndent = 0;
trace(xml.toXMLString());

XML.prettyIndent = 1;
trace(xml.toXMLString());

XML.prettyIndent = 2;
trace(xml.toXMLString());
</codeblock></example></apiValueDetail><related-links><link href="#XML/prettyPrinting"><linktext>prettyPrinting</linktext></link><link href="#XML/toString()"><linktext>toString()</linktext></link><link href="#XML/toXMLString()"><linktext>toXMLString()</linktext></link></related-links></apiValue><apiValue id="XML:prettyPrinting:get"><apiName>prettyPrinting</apiName><shortdesc>
	Determines whether the toString() 
	and toXMLString() methods normalize white space characters between some tags.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/></apiVersion></asMetadata><asCustoms><keyword>XML, XML.prettyPrinting, prettyPrinting
	</keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiStatic/><apiValueAccess value="readwrite"/><apiValueClassifier>Boolean</apiValueClassifier></apiValueDef><apiDesc>
	Determines whether the <codeph>toString()</codeph> 
	and <codeph>toXMLString()</codeph> methods normalize white space characters between some tags. 
	The default value is <codeph>true</codeph>.
	
	</apiDesc><example conref="examples\XML.prettyPrinting.1.as"> This example shows the effect of setting <codeph>XML.prettyPrinting</codeph>
 static property:
<codeblock>
var xml:XML = &lt;foo&gt;&lt;bar/&gt;&lt;/foo&gt;;
XML.prettyPrinting = false;
trace(xml.toXMLString());

XML.prettyPrinting = true;
trace(xml.toXMLString());
</codeblock></example></apiValueDetail><related-links><link href="#XML/prettyIndent"><linktext>prettyIndent</linktext></link><link href="#XML/toString()"><linktext>toString()</linktext></link><link href="#XML/toXMLString()"><linktext>toXMLString()</linktext></link></related-links></apiValue></apiClassifier><apiOperation id="globalOperation:Array"><apiName>Array</apiName><shortdesc>
	 Creates a new array.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>An array of length zero or more.
	 </apiDesc><apiOperationClassifier>Array</apiOperationClassifier></apiReturn><apiParam><apiItemName>args</apiItemName><apiType value="restParam"/><apiDesc>You can pass no arguments for an empty array, a single integer argument for an array of a specific length, or a series of comma-separated values of various types for an array populated with those values.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Creates a new array. The array can be of length zero or more, or an array populated by a list of 
	 specified elements, possibly of different data types. The number and data type of
	 the arguments you use determine the contents of the returned array.
	 <ul>
	   <li>Calling <codeph>Array()</codeph> with no arguments returns an empty array.</li>
	   <li>Calling <codeph>Array()</codeph> with a single integer argument returns an array of the specified length, but whose elements have undefined values.</li>
	   <li>Calling <codeph>Array()</codeph> with a list of specific values returns an array with elements that contain each of the specified values.</li>
	 </ul>
	 Using the <codeph>Array()</codeph> function is similar to creating an array with the Array class constructor.
	 <p>Use the <codeph>as</codeph> operator for explicit type conversion, or type casting, 
	 when the argument is not a primitive value. For more information, see the Example
	 section of this entry. </p>
	 </apiDesc><example conref="examples\Array.func.4.as"> The following example demonstrates the behavior of the <codeph>Array()</codeph>
 function when an argument is not a primitive value. A common use case of casting to an array
 is the conversion of an Object instance that stores its values in array format. 
 If <codeph>Array()</codeph> is called with an argument of type <codeph>Object</codeph>,
 or any other non-primitive data type, a reference to the object is stored in an element
 of the new array. In other words, if the only argument passed is an object, 
 a reference to that object becomes the first element of the new array.
<codeblock>
var obj:Object = [ "a", "b", "c" ];
      
var newArray:Array = Array( obj );

trace(newArray == obj);    // false
trace(newArray[0] == obj); // true
trace(newArray[0][0])      // a
trace(newArray[0][1])      // b
trace(newArray[0][2])      // c
</codeblock></example><example conref="examples\Array.func.5.as"> To cast <codeph>obj</codeph> to an array, use the <codeph>as</codeph> operator, which returns an array reference
 if <codeph>obj</codeph> is a valid array and <codeph>null</codeph> otherwise:
<codeblock>
var obj:Object = [ "a", "b", "c" ];
      
var newArray:Array = obj as Array;

trace(newArray == obj); // true
trace(newArray[0]);     // a
trace(newArray[1]);     // b
trace(newArray[2]);     // c
</codeblock></example></apiOperationDetail><related-links><link href="#Array"><linktext>Array class</linktext></link><link href="operators.html#as"><linktext>as operator</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:Boolean"><apiName>Boolean</apiName><shortdesc>
	 Converts the expression parameter to a Boolean value and returns the value.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>The result of the conversion to Boolean.
     </apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn><apiParam><apiItemName>expression</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>An expression or object to convert to Boolean.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Converts the <codeph>expression</codeph> parameter to a Boolean value and returns the value. 
	 <p>The return value depends on the data type and value of the argument, as described in the following table:</p>
	 
	 <adobetable class="innertable">
	   
	   
	   
	   
	   
	   
	   
	   
	   
	   
	 <tgroup cols="3"><thead><row><entry>Input Value</entry><entry>Example</entry><entry>Return Value</entry></row></thead><tbody><row>
	     <entry><codeph>0</codeph></entry>
	     <entry><codeph>Boolean(0)</codeph></entry>
	     <entry><codeph>false</codeph></entry>
	   </row><row>
	     <entry><codeph>NaN</codeph></entry>
	     <entry><codeph>Boolean(NaN)</codeph></entry>
	     <entry><codeph>false</codeph></entry>
	   </row><row>
	     <entry>Number (not <codeph>0</codeph> or <codeph>NaN</codeph>)</entry>
	     <entry><codeph>Boolean(4)</codeph></entry>
	     <entry><codeph>true</codeph></entry>
	   </row><row>
	     <entry>Empty string</entry>
	     <entry><codeph>Boolean("")</codeph></entry>
	     <entry><codeph>false</codeph></entry>
	   </row><row>
	     <entry>Non-empty string</entry>
	     <entry><codeph>Boolean("6")</codeph></entry>
	     <entry><codeph>true</codeph></entry>
	   </row><row>
	     <entry><codeph>null</codeph></entry>
	     <entry><codeph>Boolean(null)</codeph></entry>
	     <entry><codeph>false</codeph></entry>
	   </row><row>
	     <entry><codeph>undefined</codeph></entry>
	     <entry><codeph>Boolean(undefined)</codeph></entry>
	     <entry><codeph>false</codeph></entry>
	   </row><row>
	     <entry>Instance of Object class</entry>
	     <entry><codeph>Boolean(new Object())</codeph></entry>
	     <entry><codeph>true</codeph></entry>
	   </row><row>
	     <entry>No argument</entry>
	     <entry><codeph>Boolean()</codeph></entry>
	     <entry><codeph>false</codeph></entry>
	   </row></tbody></tgroup></adobetable>
	 <p>Unlike previous versions of ActionScript, the <codeph>Boolean()</codeph> function returns the same results as does the Boolean class constructor.</p>
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="globalOperation:Number"><apiName>Number</apiName><shortdesc>
	 Converts a given value to a Number value.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>The converted number value
     </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>expression</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>A value to be converted to a number.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Converts a given value to a Number value. The following table shows the result of various input types:
	 
	 <adobetable class="innertable">
	   
	   
	   
	   
	   
	   
	   
	   
	   
	 <tgroup cols="3"><thead><row><entry>Input Type/Value</entry><entry>Example</entry><entry>Return Value</entry></row></thead><tbody><row>
	     <entry><codeph>undefined</codeph></entry>
	     <entry><codeph>Number(undefined)</codeph></entry>
	     <entry><codeph>NaN</codeph></entry>
	   </row><row>
	     <entry><codeph>null</codeph></entry>
	     <entry><codeph>Number(null)</codeph></entry>
	     <entry><codeph>0</codeph></entry>
	   </row><row>
	     <entry><codeph>true</codeph></entry>
	     <entry><codeph>Number(true)</codeph></entry>
	     <entry><codeph>1</codeph></entry>
	   </row><row>
	     <entry><codeph>false</codeph></entry>
	     <entry><codeph>Number(false)</codeph></entry>
	     <entry><codeph>0</codeph></entry>
	   </row><row>
	     <entry><codeph>NaN</codeph></entry>
	     <entry><codeph>Number(NaN)</codeph></entry>
	     <entry><codeph>NaN</codeph></entry>
	   </row><row>
	     <entry>Empty string</entry>
	     <entry><codeph>Number("")</codeph></entry>
	     <entry><codeph>0</codeph></entry>
	   </row><row>
	     <entry>String that converts to Number</entry>
	     <entry><codeph>Number("5")</codeph></entry>
	     <entry>The number (e.g. <codeph>5</codeph>)</entry>
	   </row><row>
	     <entry>String that does not convert to Number</entry>
	     <entry><codeph>Number("5a")</codeph></entry>
	     <entry><codeph>NaN</codeph></entry>
	   </row></tbody></tgroup></adobetable>
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="globalOperation:Object"><apiName>Object</apiName><shortdesc>
	 Every value in ActionScript 3.0 is an object, which means that calling Object() on a value returns that value.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>The value specified by the <codeph>value</codeph> parameter.
     </apiDesc><apiOperationClassifier>Object</apiOperationClassifier></apiReturn><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>An object or a number, string, or Boolean value to convert.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Every value in ActionScript 3.0 is an object, which means that calling <codeph>Object()</codeph> on a value returns that value.
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="globalOperation:String"><apiName>String</apiName><shortdesc>
	 Returns a string representation of the specified parameter.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>A string representation of the value passed for the <codeph>expression</codeph> parameter.
     </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>expression</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc> An expression to convert to a string.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Returns a string representation of the specified parameter.
	 <p>The following table shows the result of various input types:</p>
	 <adobetable class="innertable">
	   
	   
	   
	   
	   
	   
	   
	   
	   
	 <tgroup cols="2"><thead><row><entry>Input Type/Value</entry><entry>Return Value</entry></row></thead><tbody><row>
	     <entry><codeph>undefined</codeph></entry>
	     <entry><codeph>undefined</codeph></entry>
	   </row><row>
	     <entry><codeph>null</codeph></entry>
	     <entry><codeph>"null"</codeph></entry>
	   </row><row>
	     <entry><codeph>true</codeph></entry>
	     <entry><codeph>"true"</codeph></entry>
	   </row><row>
	     <entry><codeph>false</codeph></entry>
	     <entry><codeph>"false"</codeph></entry>
	   </row><row>
	     <entry><codeph>NaN</codeph></entry>
	     <entry><codeph>"NaN"</codeph></entry>
	   </row><row>
	     <entry>String</entry>
	     <entry>String</entry>
	   </row><row>
	     <entry>Object</entry>
	     <entry>Object.toString()</entry>
	   </row><row>
	     <entry>Number</entry>
	     <entry>String representation of the number</entry>
	   </row></tbody></tgroup></adobetable>
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="globalOperation:Vector"><apiName>Vector</apiName><shortdesc>
	 Creates a new Vector instance whose elements are instances of the specified data type.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><commentPrivate>The reason this compiles with the .&lt;T&gt; designation is because
	 a dummy class "T" is declared in the top level Vector.as file. If this file is
	 built without that one, the build will fail.
	 
	 </commentPrivate></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiException><apiDesc>If the <codeph>sourceArray</codeph> argument contains an element that can't be 
	 converted to the specified data type.
	 
	 </apiDesc><apiItemName>TypeError</apiItemName><apiOperationClassifier>TypeError</apiOperationClassifier></apiException><apiReturn><apiDesc>A Vector instance populated with the elements of the <codeph>sourceArray</codeph> array.
	 
	 </apiDesc><apiType value="Vector$T"/></apiReturn><apiParam><apiItemName>sourceArray</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>An Array or Vector instance whose elements become the elements of the result 
	 Vector. If the argument is a Vector instance whose associated data type is the same as the 
	 specified data type, the argument is returned as the function result.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Creates a new Vector instance whose elements are instances of the specified data type. 
	 When calling this function, you specify the data type of the result Vector's elements 
	 (the Vector's <i>base type</i>) using a type parameter. This function 
	 uses the same syntax that's used when declaring a Vector instance or calling the 
	 <codeph>new Vector.&lt;T&gt;()</codeph> constructor:
	 
	 <codeblock>var v:Vector.&lt;String&gt; = Vector.&lt;String&gt;(["Hello", "World"]);</codeblock>
	 
	 <p>The resulting Vector is populated 
	 with the values in the elements of the <codeph>sourceArray</codeph> argument. 
	 If the <codeph>sourceArray</codeph> argument is already a Vector.&lt;T&gt;  
	 instance where <codeph>T</codeph> is the base type, the function returns 
	 that Vector. Otherwise, the result Vector 
	 is populated with the elements of the <codeph>sourceArray</codeph> Array or Vector.</p>
	 
	 <p>In either case, the data type of all the elements of the <codeph>sourceArray</codeph> 
	 argument must match the base type <codeph>T</codeph> specified in the function call.</p>
	 
	 <p>If the <codeph>sourceArray</codeph> argument has <codeph>length</codeph> 0, the function 
	 returns an empty Vector.</p>
	 
	 <p>If a Vector is passed as the <codeph>sourceArray</codeph> argument and its base type 
	 is not <codeph>T</codeph>, or if an Array is passed and its elements are not all instances of  
	 data type <codeph>T</codeph>, an attempt is made to convert the values to the base type. If 
	 the values can be automatically converted, the result Vector contains the converted values. 
	 If no conversion can be made, an error occurs.</p>
	 
	 <p>Likewise, if an element in the <codeph>sourceArray</codeph> argument is an instance of 
	 a subclass of the base type <codeph>T</codeph>, the call succeeds and the element is 
	 added to the resulting Vector. This works even if the 
	 <codeph>sourceArray</codeph> argument is a Vector whose base type is a subclass 
	 of <codeph>T</codeph>. In fact, this is the only way to convert a Vector with base type 
	 <codeph>T</codeph> to a Vector with a base type that's a superclass of <codeph>T</codeph>.</p>
	 
	 <p>For example, the following code results in a compile error in strict mode, or a 
	 TypeError at run time, because it attempts to assign a Vector.&lt;Sprite&gt; to a 
	 Vector.&lt;DisplayObject&gt; variable (Sprite is a subclass of DisplayObject):</p>
	 
	 <codeblock>
	 var v1:Vector.&lt;Sprite&gt; = new Vector.&lt;Sprite&gt;();
	 v1[0] = new Sprite();
	 var v2:Vector.&lt;DisplayObject&gt; = v1;
	 </codeblock>
	 
	 <p>The following alternative version of the code successfully copies the elements of a 
	 Vector.&lt;Sprite&gt; instance to a Vector.&lt;DisplayObject&gt; instance:</p>
	 
	 <codeblock>
	 var v1:Vector.&lt;Sprite&gt; = new Vector.&lt;Sprite&gt;();
	 v1[0] = new Sprite();
	 var v2:Vector.&lt;DisplayObject&gt; = Vector.&lt;DisplayObject&gt;(v1);
	 </codeblock>
	 
	 </apiDesc></apiOperationDetail><related-links><link href="#Vector"><linktext>Vector class</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:XMLList"><apiName>XMLList</apiName><shortdesc>
     Converts an object to an XMLList object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>An XMLList object containing values held in the converted object.
	 </apiDesc><apiOperationClassifier>XMLList</apiOperationClassifier></apiReturn><apiParam><apiItemName>expression</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>Object to be converted into an XMLList object.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
     Converts an object to an XMLList object.
     <p>The following table describes return values for various input types.</p>
	 <adobetable class="innertable">
	 	
	 	
	 	
	 	
	 	
	 	
	 	
	 	
	 	
	 <tgroup cols="2"><thead><row><entry>Parameter Type</entry><entry>Return Value</entry></row></thead><tbody><row>
	 		<entry>Boolean</entry>
	 		<entry>Value is first converted to a string, then converted to an XMLList object.</entry>
	 	</row><row>
	 		<entry>Null</entry>
	 		<entry>A runtime error occurs (TypeError exception).</entry>
	 	</row><row>
	 		<entry>Number</entry>
	 		<entry>Value is first converted to a string, then converted to an XMLList object.</entry>
	 	</row><row>
	 		<entry>Object</entry>
	 		<entry>Converts to XMLList only if the value is a String, Number or Boolean value. Otherwise a runtime error occurs (TypeError exception).</entry>
	 	</row><row>
	 		<entry>String</entry>
	 		<entry>Value is converted to an XMLList object.</entry>
	 	</row><row>
	 		<entry>Undefined</entry>
	 		<entry>A runtime error occurs (TypeError exception).</entry>
	 	</row><row>
	 		<entry>XML</entry>
	 		<entry>Value is converted to an XMLList object.</entry>
	 	</row><row>
	 		<entry>XMLList</entry>
	 		<entry>Input value is returned unchanged.</entry>
	 	</row></tbody></tgroup></adobetable>
	 </apiDesc></apiOperationDetail><related-links><link href="#global/XML()"><linktext>XML()</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:XML"><apiName>XML</apiName><shortdesc>
	 Converts an object to an XML object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>An XML object containing values held in the converted object.
	 </apiDesc><apiOperationClassifier>XML</apiOperationClassifier></apiReturn><apiParam><apiItemName>expression</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>Object to be converted to XML.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Converts an object to an XML object. 
	 <p>The following table describes return values for various input types.</p>
	 	<adobetable class="innertable">
	 	
	 	
	 	
	 	
	 	
	 	
	 	
	 	
	 	
	 <tgroup cols="2"><thead><row><entry>Parameter Type</entry><entry>Return Value</entry></row></thead><tbody><row>
	 		<entry>Boolean</entry>
	 		<entry>Value is first converted to a string, then converted to an XML object.</entry>
	 	</row><row>
	 		<entry>Null</entry>
	 		<entry>A runtime error occurs (TypeError exception).</entry>
	 	</row><row>
	 		<entry>Number</entry>
	 		<entry>Value is first converted to a string, then converted to an XML object.</entry>
	 	</row><row>
	 		<entry>Object</entry>
	 		<entry>Converts to XML only if the value is a String, Number or Boolean value. Otherwise a runtime error occurs (TypeError exception).</entry>
	 	</row><row>
	 		<entry>String</entry>
	 		<entry>Value is converted to XML.</entry>
	 	</row><row>
	 		<entry>Undefined</entry>
	 		<entry>A runtime error occurs (TypeError exception).</entry>
	 	</row><row>
	 		<entry>XML</entry>
	 		<entry>Input value is returned unchanged.</entry>
	 	</row><row>
	 		<entry>XMLList</entry>
	 		<entry>Returns an XML object only if the XMLList object contains only one property of type XML. Otherwise a runtime error occurs (TypeError exception).</entry>
	 	</row></tbody></tgroup></adobetable>
	 </apiDesc></apiOperationDetail><related-links><link href="#global/XMLList()"><linktext>XMLList()</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:decodeURIComponent"><apiName>decodeURIComponent</apiName><shortdesc>
	 Decodes an encoded URI component into a string.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>A string in which all characters previously escaped by the <codeph>encodeURIComponent</codeph> function are
	 restored to their unescaped representation.
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>uri</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>A string encoded with the <codeph>encodeURIComponent</codeph> function.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Decodes an encoded URI component into a string. Returns a string in which 
	 all characters previously escaped by the <codeph>encodeURIComponent</codeph> 
	 function are restored to their uncoded representation.
	 <p>This function differs from the <codeph>decodeURI()</codeph> function in that it is intended for use only with a part of a URI string, called a URI component.
	 A URI component is any text that appears between special characters called <i>component separators</i> 
     (<codeph>: / ; and ? </codeph>). 
	 Common examples of a URI component are "http" and "www.adobe.com".</p>
	 <p>Another important difference between this function and <codeph>decodeURI()</codeph> is that because this function
	 assumes that it is processing a URI component it treats the escape sequences that represent special separator characters (<codeph>; / ? : @ &amp; = + $ , #</codeph>) as regular
	 text that should be decoded. </p>
	 </apiDesc></apiOperationDetail><related-links><link href="#global/decodeURI()"><linktext>decodeURI()</linktext></link><link href="#global/encodeURI()"><linktext>encodeURI()</linktext></link><link href="#global/encodeURIComponent()"><linktext>encodeURIComponent()</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:decodeURI"><apiName>decodeURI</apiName><shortdesc>
	 Decodes an encoded URI into a string.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>A string in which all characters previously escaped by the <codeph>encodeURI</codeph> function are
	 restored to their unescaped representation.
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>uri</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>A string encoded with the <codeph>encodeURI</codeph> function.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Decodes an encoded URI into a string. Returns a string in which all characters previously encoded 
	 by the <codeph>encodeURI</codeph> function are restored to their unencoded representation.
	 <p>The following table shows the set of escape sequences that are <i>not</i> decoded to characters by the <codeph>decodeURI</codeph> function. Use <codeph>decodeURIComponent()</codeph> to decode the escape sequences in this table.</p>
	 <adobetable class="innertable">
	   
	   
	   
	   
	   
	   
	   
	   
	   
	   
	   
	   
	 <tgroup cols="2"><thead><row><entry>Escape sequences not decoded</entry><entry>Character equivalents</entry></row></thead><tbody><row>
	     <entry><codeph>%23</codeph></entry>
	     <entry><codeph>#</codeph></entry>
	   </row><row>
	     <entry><codeph>%24</codeph></entry>
	     <entry><codeph>$</codeph></entry>
	   </row><row>
	     <entry><codeph>%26</codeph></entry>
	     <entry><codeph>&amp;</codeph></entry>
	   </row><row>
	     <entry><codeph>%2B</codeph></entry>
	     <entry><codeph>+</codeph></entry>
	   </row><row>
	     <entry><codeph>%2C</codeph></entry>
	     <entry><codeph>,</codeph></entry>
	   </row><row>
	     <entry><codeph>%2F</codeph></entry>
	     <entry><codeph>/</codeph></entry>
	   </row><row>
	     <entry><codeph>%3A</codeph></entry>
	     <entry><codeph>:</codeph></entry>
	   </row><row>
	     <entry><codeph>%3B</codeph></entry>
	     <entry><codeph>;</codeph></entry>
	   </row><row>
	     <entry><codeph>%3D</codeph></entry>
	     <entry><codeph>=</codeph></entry>
	   </row><row>
	     <entry><codeph>%3F</codeph></entry>
	     <entry><codeph>?</codeph></entry>
	   </row><row>
	     <entry><codeph>%40</codeph></entry>
	     <entry><codeph>@</codeph></entry>
	   </row></tbody></tgroup></adobetable>
	 
	 </apiDesc><example conref="examples\DecodeURIExample.as"><codeblock>package {
    import flash.display.Sprite;

    public class DecodeURIExample extends Sprite {
        public function DecodeURIExample() {
            var uri:String = "http://www.example.com/application.jsp?user=&lt;user name='some user'&gt;&lt;/user&gt;";
            var encoded:String = encodeURI(uri);
            var decoded:String = decodeURI(encoded);
            trace(uri);        // http://www.example.com/application.jsp?user=&lt;user name='some user'&gt;&lt;/user&gt;
            trace(encoded);    // http://www.example.com/application.jsp?user=%3Cuser%20name='some%20user'%3E%3C/user%3E
            trace(decoded);    // http://www.example.com/application.jsp?user=&lt;user name='some user'&gt;&lt;/user&gt;
        }
    }
}
</codeblock></example></apiOperationDetail><related-links><link href="#global/decodeURIComponent()"><linktext>decodeURIComponent()</linktext></link><link href="#global/encodeURI()"><linktext>encodeURI()</linktext></link><link href="#global/encodeURIComponent()"><linktext>encodeURIComponent()</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:encodeURIComponent"><apiName>encodeURIComponent</apiName><shortdesc>
	 Encodes a string into a valid URI component.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>uri</apiItemName><apiOperationClassifier>String</apiOperationClassifier></apiParam></apiOperationDef><apiDesc>
	 Encodes a string into a valid URI component. Converts a substring of a URI into a 
	 string in which all characters are encoded as UTF-8 escape sequences unless a character
	 belongs to a very small group of basic characters.
	 <p>The <codeph>encodeURIComponent()</codeph> function differs from the <codeph>encodeURI()</codeph> function in that it is intended for use only with a part of a URI string, called a URI component.
	 A URI component is any text that appears between special characters called <i>component separators</i>
     (<codeph>: / ; and ? </codeph>). 
	 Common examples of a URI component are "http" and "www.adobe.com".</p>
	 <p>Another important difference between this function and <codeph>encodeURI()</codeph> is that because this function
	 assumes that it is processing a URI component it treats the special separator characters (<codeph>; / ? : @ &amp; = + $ , #</codeph>) as regular
	 text that should be encoded. </p>
	 <p>The following table shows all characters that are <i>not</i> converted to UTF-8 escape sequences by the <codeph>encodeURIComponent</codeph> function.</p>
	 <adobetable class="innertable">
	   
	   
	   
	   
	   
	 <tgroup cols="1"><thead><row><entry>Characters not encoded</entry></row></thead><tbody><row>
	     <entry><codeph>0 1 2 3 4 5 6 7 8 9</codeph></entry>
	   </row><row>
	     <entry><codeph>a b c d e f g h i j k l m n o p q r s t u v w x y z</codeph></entry>
	   </row><row>
	     <entry><codeph>A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</codeph></entry>
	   </row><row>
	     <entry><codeph>- _ . ! ~ ~~ ' ( )</codeph></entry>
	   </row></tbody></tgroup></adobetable>	 
	 </apiDesc></apiOperationDetail><related-links><link href="#global/decodeURI()"><linktext>decodeURI()</linktext></link><link href="#global/decodeURIComponent()"><linktext>decodeURIComponent()</linktext></link><link href="#global/encodeURI()"><linktext>encodeURI()</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:encodeURI"><apiName>encodeURI</apiName><shortdesc>
	 Encodes a string into a valid URI (Uniform Resource Identifier).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>A string with certain characters encoded as UTF-8 escape sequences.
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>uri</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>A string representing a complete URI.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Encodes a string into a valid URI (Uniform Resource Identifier). 
	 Converts a complete URI into a string in which all characters are encoded 
	 as UTF-8 escape sequences unless a character belongs to a small group of basic characters.
	 <p>The following table shows the entire set of basic characters that are <i>not</i> converted to UTF-8 escape sequences by the <codeph>encodeURI</codeph> function.</p>
	 <adobetable class="innertable">
	   
	   
	   
	   
	   
	   
	 <tgroup cols="1"><thead><row><entry>Characters not encoded</entry></row></thead><tbody><row>
	     <entry><codeph>0 1 2 3 4 5 6 7 8 9</codeph></entry>
	   </row><row>
	     <entry><codeph>a b c d e f g h i j k l m n o p q r s t u v w x y z</codeph></entry>
	   </row><row>
	     <entry><codeph>A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</codeph></entry>
	   </row><row>
	     <entry><codeph>; / ? : @ &amp; = + $ , #</codeph></entry>
	   </row><row>
	     <entry><codeph>- _ . ! ~ ~~ ' ( )</codeph></entry>
	   </row></tbody></tgroup></adobetable>
	 </apiDesc><example conref="examples\EncodeURIExample.as"><codeblock>package {
    import flash.display.Sprite;

    public class EncodeURIExample extends Sprite {
        public function EncodeURIExample() {
            var uri:String = "http://www.example.com/application.jsp?user=&lt;user name='some user'&gt;&lt;/user&gt;";
            var encoded:String = encodeURI(uri);
            var decoded:String = decodeURI(encoded);
            trace(uri);        // http://www.example.com/application.jsp?user=&lt;user name='some user'&gt;&lt;/user&gt;
            trace(encoded);    // http://www.example.com/application.jsp?user=%3Cuser%20name='some%20user'%3E%3C/user%3E
            trace(decoded);    // http://www.example.com/application.jsp?user=&lt;user name='some user'&gt;&lt;/user&gt;
        }
    }
}
</codeblock></example></apiOperationDetail><related-links><link href="#global/decodeURI()"><linktext>decodeURI()</linktext></link><link href="#global/decodeURIComponent()"><linktext>decodeURIComponent()</linktext></link><link href="#global/encodeURIComponent()"><linktext>encodeURIComponent()</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:escape"><apiName>escape</apiName><shortdesc>
	 Converts the parameter to a string and encodes it in a URL-encoded format, 
	 where most nonalphanumeric characters are replaced with % hexadecimal sequences.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>A URL-encoded string.
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>str</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The expression to convert into a string and encode in a URL-encoded format.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Converts the parameter to a string and encodes it in a URL-encoded format, 
	 where most nonalphanumeric characters are replaced with <codeph>%</codeph> hexadecimal sequences. 
	 When used in a URL-encoded string, the percentage symbol (<codeph>%</codeph>) is used to introduce 
	 escape characters, and is not equivalent to the modulo operator (<codeph>%</codeph>).
	 <p>The following table shows all characters that are <i>not</i> converted to escape sequences by the <codeph>escape()</codeph> function.</p>
	 <adobetable class="innertable">
	   
	   
	   
	   
	   
	 <tgroup cols="1"><thead><row><entry>Characters not encoded</entry></row></thead><tbody><row>
	     <entry><codeph>0 1 2 3 4 5 6 7 8 9</codeph></entry>
	   </row><row>
	     <entry><codeph>a b c d e f g h i j k l m n o p q r s t u v w x y z</codeph></entry>
	   </row><row>
	     <entry><codeph>A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</codeph></entry>
	   </row><row>
	     <entry><codeph>@ - _ . ~~ + /</codeph></entry>
	   </row></tbody></tgroup></adobetable>	 
	 
	 </apiDesc></apiOperationDetail><related-links><link href="#global/unescape()"><linktext>unescape()</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:int"><apiName>int</apiName><shortdesc>
	 Converts a given numeric value to an integer value.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>The converted integer value.
	 </apiDesc><apiOperationClassifier>int</apiOperationClassifier></apiReturn><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A value to be converted to an integer.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Converts a given numeric value to an integer value. Decimal values are truncated at the decimal point.
	 </apiDesc></apiOperationDetail><related-links><link href="#global/uint()"><linktext>uint()</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:isFinite"><apiName>isFinite</apiName><shortdesc>
	 Returns true if the value is a finite number, 
	 or false if the value is Infinity or -Infinity.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0."/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>Returns <codeph>true</codeph> if it is a finite number 
	 or <codeph>false</codeph> if it is infinity or negative infinity
     </apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn><apiParam><apiItemName>num</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A number to evaluate as finite or infinite.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Returns <codeph>true</codeph> if the value is a finite number, 
	 or <codeph>false</codeph> if the value is <codeph>Infinity</codeph> or <codeph>-Infinity</codeph>.
	 The presence of <codeph>Infinity</codeph> or <codeph>-Infinity</codeph> indicates a mathematical
	 error condition such as division by 0.
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="globalOperation:isNaN"><apiName>isNaN</apiName><shortdesc>
	 Returns true if the value is NaN(not a number).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>Returns <codeph>true</codeph> if the value is <codeph>NaN</codeph>(not a number) and <codeph>false</codeph> otherwise.
     </apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn><apiParam><apiItemName>num</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A numeric value or mathematical expression to evaluate.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Returns <codeph>true</codeph> if the value is <codeph>NaN</codeph>(not a number). The <codeph>isNaN()</codeph> function is useful for checking whether a mathematical expression evaluates successfully to a number. 
	 The most common use of <codeph>isNaN()</codeph> is to check the value returned from the <codeph>parseInt()</codeph>and <codeph>parseFloat()</codeph> functions. The <codeph>NaN</codeph> value is a special member of the Number data type that represents a value that is "not a number." 
	 <p><b>Note</b>: The <codeph>NaN</codeph> value is not a member of the int or uint data types.</p>
	 <p>The following table describes the return value of <codeph>isNaN()</codeph> on various input types and
	 values. (If your compiler warnings are set to Strict Mode, some of the following operations will generate
	 compiler warnings.)</p>
	 <adobetable class="innertable">
	   
	   
	   
	   
	   
	   
	   
	 <tgroup cols="3"><thead><row><entry>Input Type/Value</entry><entry>Example</entry><entry>Return Value</entry></row></thead><tbody><row>
	     <entry>0 divided by 0</entry>
	     <entry><codeph>isNaN(0/0)</codeph></entry>
	     <entry><codeph>true</codeph></entry>
	   </row><row>
	     <entry>Non-zero number divided by <codeph>0</codeph></entry>
	     <entry><codeph>isNaN(5/0)</codeph></entry>
	     <entry><codeph>false</codeph></entry>
	   </row><row>
	     <entry>Square root of a negative number</entry>
	     <entry><codeph>isNaN(Math.sqrt(-1))</codeph></entry>
	     <entry><codeph>true</codeph></entry>
	   </row><row>
	     <entry>Arcsine of number greater than 1 or less than 0</entry>
	     <entry><codeph>isNaN(Math.asin(2))</codeph></entry>
	     <entry><codeph>true</codeph></entry>
	   </row><row>
	     <entry>String that can be converted to Number</entry>
	     <entry><codeph>isNaN("5")</codeph></entry>
	     <entry><codeph>false</codeph></entry>
	   </row><row>
	     <entry>String that cannot be converted to Number</entry>
	     <entry><codeph>isNaN("5a")</codeph></entry>
	     <entry><codeph>true</codeph></entry>
	   </row></tbody></tgroup></adobetable>
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="globalOperation:isXMLName"><apiName>isXMLName</apiName><shortdesc>
	 Determines whether the specified string is a valid name for an XML element or attribute.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>Returns <codeph>true</codeph> if the <codeph>str</codeph> argument is a valid XML name; <codeph>false</codeph> otherwise.
     </apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn><apiParam><apiItemName>str</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>A string to evaluate.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Determines whether the specified string is a valid name for an XML element or attribute.
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="globalOperation:parseFloat"><apiName>parseFloat</apiName><shortdesc>
	 Converts a string to a floating-point number.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>A number or <codeph>NaN</codeph> (not a number).
     </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>str</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>The string to read and convert to a floating-point number.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Converts a string to a floating-point number. The function reads, or <i>parses</i>, and returns the numbers in a string until it reaches a character that is not a part of the initial number. If the string does not begin with a number that can be parsed, <codeph>parseFloat()</codeph> returns <codeph>NaN</codeph>. White space preceding valid integers is ignored, as are trailing nonnumeric characters.
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="globalOperation:parseInt"><apiName>parseInt</apiName><shortdesc>
	 Converts a string to an integer.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>A number or <codeph>NaN</codeph> (not a number).
     </apiDesc><apiOperationClassifier>Number</apiOperationClassifier></apiReturn><apiParam><apiItemName>str</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>A string to convert to an integer.
	 </apiDesc></apiParam><apiParam><apiItemName>radix</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiData>0</apiData><apiDesc>An integer representing the radix (base) of the number to parse. Legal values are from 2 to 36.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Converts a string to an integer. If the specified string in the parameters cannot be converted to a number, the function returns <codeph>NaN</codeph>. Strings beginning with 0x are interpreted as hexadecimal numbers. Unlike in previous versions of ActionScript, integers beginning with 0 are <i>not</i> interpreted as octal numbers. You must specify a radix of 8 for octal numbers. White space and zeroes preceding valid integers are ignored, as are trailing nonnumeric characters.
	 </apiDesc></apiOperationDetail></apiOperation><apiOperation id="globalOperation:trace"><apiName>trace</apiName><shortdesc>
	 Displays expressions, or writes to log files, while debugging.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>arguments</apiItemName><apiType value="restParam"/><apiDesc>One or more (comma separated) expressions to evaluate. For multiple expressions, a space is inserted between each expression in the output.
     </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Displays expressions, or writes to log files, while debugging. A single trace statement can support multiple arguments. If any argument 
	 in a trace statement includes a data type other than a String, the trace function invokes the associated <codeph>toString()</codeph> method
	 for that data type. For example, if the argument is a Boolean value the trace function invokes <codeph>Boolean.toString()</codeph> and 
	 displays the return value. 
	 </apiDesc><example conref="examples\TraceExample.as"> The following example uses the class <codeph>TraceExample</codeph> to 
 show how the <codeph>trace()</codeph> method can be used to print a simple string.  Generally,
 the message will be printed to a "Debug" console.
<codeblock>
package {
    import flash.display.Sprite;

    public class TraceExample extends Sprite {

        public function TraceExample() {
            trace("Hello World");
        }
    }
}
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="globalOperation:uint"><apiName>uint</apiName><shortdesc>
	 Converts a given numeric value to an unsigned integer value.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>The converted integer value.
	 </apiDesc><apiOperationClassifier>uint</apiOperationClassifier></apiReturn><apiParam><apiItemName>value</apiItemName><apiOperationClassifier>Number</apiOperationClassifier><apiDesc>A value to be converted to an integer.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Converts a given numeric value to an unsigned integer value. Decimal values are truncated at the decimal point.
	 <p>The following table describes the return value of <codeph>uint()</codeph> on various input types and values.</p>
	 <adobetable class="innertable">
	   
	   
	   
	   
	   
	   
	   
	   
	   
	   
	   
	   
	   
	 <tgroup cols="3"><thead><row><entry>Input Type/Value</entry><entry>Example</entry><entry>Return Value</entry></row></thead><tbody><row>
	     <entry><codeph>undefined</codeph></entry>
	     <entry><codeph>uint(undefined)</codeph></entry>
	     <entry><codeph>0</codeph></entry>
	   </row><row>
	     <entry><codeph>null</codeph></entry>
	     <entry><codeph>uint(null)</codeph></entry>
	     <entry><codeph>0</codeph></entry>
	   </row><row>
	     <entry><codeph>0</codeph></entry>
	     <entry><codeph>uint(0)</codeph></entry>
	     <entry><codeph>0</codeph></entry>
	   </row><row>
	     <entry><codeph>NaN</codeph></entry>
	     <entry><codeph>uint(NaN)</codeph></entry>
	     <entry><codeph>0</codeph></entry>
	   </row><row>
	     <entry>Positive floating-point number</entry>
	     <entry><codeph>uint(5.31)</codeph></entry>
	     <entry>Truncated unsigned integer (e.g. <codeph>5</codeph>)</entry>
	   </row><row>
	     <entry>Negative floating-point number</entry>
	     <entry><codeph>uint(-5.78)</codeph></entry>
	     <entry>Truncates to integer then applies rule for negative integers</entry>
	   </row><row>
	     <entry>Negative integer</entry>
	     <entry><codeph>uint(-5)</codeph></entry>
         <entry>Sum of <codeph>uint.MAX_VALUE</codeph> and the negative integer (for example, <codeph>uint.MAX_VALUE + (-5)</codeph>)</entry>
	   </row><row>
	     <entry><codeph>true</codeph></entry>
	     <entry><codeph>uint(true)</codeph></entry>
	     <entry><codeph>1</codeph></entry>
	   </row><row>
	     <entry><codeph>false</codeph></entry>
	     <entry><codeph>uint(false)</codeph></entry>
	     <entry><codeph>0</codeph></entry>
	   </row><row>
	     <entry>Empty String</entry>
	     <entry><codeph>uint("")</codeph></entry>
	     <entry><codeph>0</codeph></entry>
	   </row><row>
	     <entry>String that converts to Number</entry>
	     <entry><codeph>uint("5")</codeph></entry>
	     <entry>The number</entry>
	   </row><row>
	     <entry>String that does not convert to Number</entry>
	     <entry><codeph>uint("5a")</codeph></entry>
	     <entry><codeph>0</codeph></entry>
	   </row></tbody></tgroup></adobetable>

	 </apiDesc></apiOperationDetail><related-links><link href="#global/int()"><linktext>int()</linktext></link></related-links></apiOperation><apiOperation id="globalOperation:unescape"><apiName>unescape</apiName><shortdesc>
	 Evaluates the parameter str as a string, decodes the string from URL-encoded format 
	 (converting all hexadecimal sequences to ASCII characters), and returns the string.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>A string decoded from a URL-encoded parameter.
     </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>str</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiDesc>A string with hexadecimal sequences to escape.
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Evaluates the parameter <codeph>str</codeph> as a string, decodes the string from URL-encoded format 
	 (converting all hexadecimal sequences to ASCII characters), and returns the string.
	 </apiDesc></apiOperationDetail></apiOperation><apiValue id="globalValue:Infinity"><apiName>Infinity</apiName><shortdesc>
 A special value representing positive Infinity.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiDynamic/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
 A special value representing positive <codeph>Infinity</codeph>. The value of this constant is the same as <codeph>Number.POSITIVE_INFINITY</codeph>.
 </apiDesc><example conref="examples\Constants.Infinity.1.as"> The result of division by 0 is <codeph>Infinity</codeph>, but only 
 when the divisor is a positive number.
<codeblock>

trace(0 / 0);  // NaN
trace(7 / 0);  // Infinity
trace(-7 / 0); // -Infinity


</codeblock></example></apiValueDetail><related-links><link href="#Number/POSITIVE_INFINITY"><linktext>Number.POSITIVE_INFINITY</linktext></link></related-links></apiValue><apiValue id="globalValue:-Infinity"><apiName>-Infinity</apiName><shortdesc>
 A special value representing negative Infinity.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiDynamic/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
 A special value representing negative <codeph>Infinity</codeph>. The value of this constant is the same as <codeph>Number.NEGATIVE_INFINITY</codeph>.
 </apiDesc><example conref="examples\Constants.NegInfinity.1.as"> The result of division by 0 is <codeph>-Infinity</codeph>, but only 
 when the divisor is a negative number.
<codeblock>

trace(0 / 0);  // NaN
trace(7 / 0);  // Infinity
trace(-7 / 0); // -Infinity


</codeblock></example></apiValueDetail><related-links><link href="#Number/NEGATIVE_INFINITY"><linktext>Number.NEGATIVE_INFINITY</linktext></link></related-links></apiValue><apiValue id="globalValue:NaN"><apiName>NaN</apiName><shortdesc>
 A special member of the Number data type that represents a value that is "not a number" (NaN).</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiDynamic/><apiValueClassifier>Number</apiValueClassifier></apiValueDef><apiDesc>
 A special member of the Number data type that represents a value that is "not a number" (<codeph>NaN</codeph>). 
 When a mathematical expression results in a value that cannot be expressed as a number, the result is <codeph>NaN</codeph>.
 The following list describes common expressions that result in <codeph>NaN</codeph>.
 <ul>
   <li>Division by 0 results in <codeph>NaN</codeph> only if the divisor is also 0. If the divisor is greater than 0, division by 0 results in <codeph><codeph>Infinity</codeph></codeph>. If the divisor is less than 0,  division by 0 results in <codeph><codeph>-Infinity</codeph></codeph>;</li>
   <li>Square root of a negative number;</li>
   <li>The arcsine of a number outside the valid range of 0 to 1;</li>
   <li><codeph>Infinity</codeph> subtracted from <codeph>Infinity</codeph>;</li>
   <li><codeph>Infinity</codeph> or <codeph>-Infinity</codeph> divided by <codeph>Infinity</codeph> or <codeph>-Infinity</codeph>;</li>
   <li><codeph>Infinity</codeph> or <codeph>-Infinity</codeph> multiplied by 0;</li>
  </ul>
 <p>The <codeph>NaN</codeph> value is not a member of the int or uint data types.</p>
 <p>The <codeph>NaN</codeph> value is not considered equal to any other value, including <codeph>NaN</codeph>, which makes it impossible to use the equality operator to test whether an expression is <codeph>NaN</codeph>. To determine whether a number is the <codeph>NaN</codeph> function, use <codeph>isNaN()</codeph>.</p>
 
 </apiDesc></apiValueDetail><related-links><link href="#global/isNaN()"><linktext>isNaN()</linktext></link><link href="#Number/NaN"><linktext>Number.NaN</linktext></link></related-links></apiValue><apiValue id="globalValue:undefined"><apiName>undefined</apiName><shortdesc>
 A special value that applies to untyped variables that have not been initialized or dynamic object properties that are not initialized.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiDynamic/><apiType value=""/></apiValueDef><apiDesc>
 A special value that applies to untyped variables that have not been initialized or dynamic object properties that are not initialized.
 In ActionScript 3.0, only variables that are untyped can hold the value <codeph>undefined</codeph>,
 which is not true in ActionScript 1.0 and ActionScript 2.0.
 For example, both of the following variables are <codeph>undefined</codeph> because they are untyped and unitialized:
 <ul>
   <li><codeph>var foo;</codeph></li>
   <li><codeph>var bar:~~;</codeph></li>
 </ul>
 <p>The <codeph>undefined</codeph> value also applies to uninitialized or undefined properties of dynamic objects.
 For example, if an object is an instance of the Object class, 
 the value of any dynamically added property is <codeph>undefined</codeph> until a value is assigned to that property.
 </p>
 <p>Results vary when <codeph>undefined</codeph> is used with various functions:</p>
 <ul>
 <li>The value returned by <codeph>String(undefined)</codeph> is <codeph>"undefined"</codeph> (<codeph>undefined</codeph> is
 converted to a string).</li> 
 <li>The value returned by <codeph>Number(undefined)</codeph> is <codeph>NaN</codeph>.</li> 
 <li>The value returned by <codeph>int(undefined)</codeph> and <codeph>uint(undefined)</codeph> is 0.</li>
 <li>The value returned by <codeph>Object(undefined)</codeph> is a new Object instance.</li>
 <li>When the value <codeph>undefined</codeph> is assigned to a typed variable, 
 the value is converted to the default value of the data type.</li>
 </ul>
 <p>Do not confuse <codeph>undefined</codeph> with <codeph>null</codeph>.
 When <codeph>null</codeph> and <codeph>undefined</codeph> are compared with the equality
 (<codeph>==</codeph>) operator, they compare as equal. However, when <codeph>null</codeph> and <codeph>undefined</codeph> are
 compared with the strict equality (<codeph>===</codeph>) operator, they compare
 as not equal.</p>
 </apiDesc><example conref="examples\Constants.undefined.1.as"> In the following example, an untyped variable, <codeph>myVar</codeph> is declared but not initialized.
 The value of <codeph>myVar</codeph> is <codeph>undefined</codeph> because the variable is untyped.
 This is true whether the variable has no type annotation or uses the special (~~) untyped annotation (<codeph>var myVar:~~;</codeph>).
<codeblock>

// trace value of untyped and uninitialized variable
var myVar;
trace(myVar); // undefined
</codeblock></example><example conref="examples\Constants.undefined.2.as"> The same rule applies to uninitialized properties of a dynamic object. For example, given an instance, <codeph>obj</codeph>, of the
 dynamic class <codeph>A</codeph>, the value of <codeph>obj.propName</codeph>, which is an uninitialized 
 property of the <codeph>obj</codeph> instance, is <codeph>undefined</codeph>.
<codeblock>

dynamic class A {}
var obj:A = new A()

// trace undefined property of obj
trace(obj.propName); // undefined

</codeblock></example></apiValueDetail><related-links><link href="statements.html#null"><linktext>null</linktext></link></related-links></apiValue><apiClassifier id="globalClassifier:uint"><apiName>uint</apiName><shortdesc>
 The uint class provides methods for working with a data type representing a 32-bit unsigned integer.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>uint object, uint, built-in class
 </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiStatic/><apiFinal/><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
 The uint class provides methods for working with a data type representing a 32-bit unsigned integer. Because an unsigned integer can only be 
 positive, its maximum value is twice that of the int class.
 <p>The range of values represented by the uint class is 0 to 4,294,967,295 (2^32-1).</p>
 <p>You can create a uint object by declaring a variable of type uint and assigning the variable a literal value. The default value of a variable of type uint is <codeph>0</codeph>.</p>
 <p>The uint class is primarily useful for pixel color values (ARGB and RGBA) and other situations where 
 the int data type does not work well. For example, the number 0xFFFFFFFF, which 
 represents the color value white with an alpha value of 255, can't be represented 
 using the int data type because it is not within the valid range of the int values.</p> 
 
 <p>The following example creates a uint object and calls the <codeph>
 toString()</codeph> method:</p>
 <pre>
 var myuint:uint = 1234;
 trace(myuint.toString()); // 1234
 </pre>
 <p>The following example assigns the value of the <codeph>MIN_VALUE</codeph> 
 property to a variable without the use of the constructor:</p>
 <pre>
 var smallest:uint = uint.MIN_VALUE;
 trace(smallest.toString()); // 0
 </pre> 
 
 </apiDesc><example conref="examples\UintExample.as"> The following example declares a uint <codeph>i</codeph> within a <codeph>for</codeph> loop, 
 which prints out the digits 0 to 9 (since uint defaults to 0).
<codeblock>

package {
    import flash.display.Sprite;

    public class UintExample extends Sprite {
        public function UintExample() {
            for(var i:uint; i &lt; 10; i++) {
                trace(i);
            }
        }
    }
}
</codeblock></example></apiClassifierDetail><related-links><link href="int.html"><linktext>int</linktext></link><link href="Number.html"><linktext>Number</linktext></link></related-links><apiConstructor id="uint:uint"><apiName>uint</apiName><shortdesc>
	 Creates a new uint object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>new number, constructor
	  
	  </keyword></asCustoms></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>num</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiDesc>The numeric value of the uint object being created, 
	 or a value to be converted to a number. If <codeph>num</codeph> is not provided,
	 the default value is <codeph>0</codeph>.
	 
	 </apiDesc></apiParam></apiConstructorDef><apiDesc>
	 Creates a new uint object. You can create a variable of uint type and assign it a literal value. The <codeph>new uint()</codeph> constructor is primarily used 
	 as a placeholder. A uint object is not the same as the <codeph>
	 uint()</codeph> function, which converts a parameter to a primitive value.
	 
	 </apiDesc><example>The following code constructs two new uint objects; the first by assigning a literal value, and the second by using the constructor function:
	 <pre>
	 var n1:uint = 3;
	 var n2:uint = new uint(10);
	 </pre>
	 
	 </example></apiConstructorDetail></apiConstructor><apiOperation id="uint:AS3:toExponential"><apiName>toExponential</apiName><shortdesc>
      Returns a string representation of the number in exponential notation.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiException><apiDesc>Throws an exception if the <codeph>fractionDigits</codeph> argument is outside the range 0 to 20.
	  </apiDesc><apiItemName>RangeError</apiItemName><apiOperationClassifier>RangeError</apiOperationClassifier></apiException><apiReturn><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>fractionDigits</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiDesc>An integer between 0 and 20, inclusive, that represents the desired number of decimal places.
      </apiDesc></apiParam></apiOperationDef><apiDesc>
      Returns a string representation of the number in exponential notation. The string contains
      one digit before the decimal point and up to 20 digits after the decimal point, as
      specified by the <codeph>fractionDigits</codeph> parameter.
      </apiDesc><example conref="examples\Number.toExponential.1.as"> The following example shows how <codeph>toExponential(2)</codeph> returns a string in
 exponential notation.
<codeblock>

var num:Number = 315003;
trace(num.toExponential(2)); // 3.15e+5

</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="uint:AS3:toFixed"><apiName>toFixed</apiName><shortdesc>
     Returns a string representation of the number in fixed-point notation.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiException><apiDesc>Throws an exception if the <codeph>fractionDigits</codeph> argument is outside the range 0 to 20.
	 </apiDesc><apiItemName>RangeError</apiItemName><apiOperationClassifier>RangeError</apiOperationClassifier></apiException><apiReturn><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>fractionDigits</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiDesc>An integer between 0 and 20, inclusive, that represents the desired number of decimal places.
     </apiDesc></apiParam></apiOperationDef><apiDesc>
     Returns a string representation of the number in fixed-point notation. 
     Fixed-point notation means that the string will contain a specific number of digits 
     after the decimal point, as specified in the <codeph>fractionDigits</codeph> parameter.
     The valid range for the <codeph>fractionDigits</codeph> parameter is from 0 to 20. 
     Specifying a value outside this range throws an exception.
     
     </apiDesc><example conref="examples\Number.toFixed.1.as"> The following example shows how <codeph>toFixed(3)</codeph> returns a string that rounds
 to three decimal places.
<codeblock>

var num:Number = 7.31343;
trace(num.toFixed(3)); // 7.313
</codeblock></example><example conref="examples\Number.toFixed.2.as"> The following example shows how <codeph>toFixed(2)</codeph> returns a string that adds
 trailing zeroes.
<codeblock>

var num:Number = 4;
trace(num.toFixed(2)); // 4.00
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="uint:AS3:toPrecision"><apiName>toPrecision</apiName><shortdesc>
      Returns a string representation of the number either in exponential notation or in
      fixed-point notation.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiException><apiDesc>Throws an exception if the <codeph>precision</codeph> argument is outside the range 1 to 21.
	  </apiDesc><apiItemName>RangeError</apiItemName><apiOperationClassifier>RangeError</apiOperationClassifier></apiException><apiReturn><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>precision</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiDesc>An integer between 1 and 21, inclusive, that represents the desired number of digits to represent in the resulting string.
      </apiDesc></apiParam></apiOperationDef><apiDesc>
      Returns a string representation of the number either in exponential notation or in
      fixed-point notation. The string will contain the number of digits specified in the
      <codeph>precision</codeph> parameter.
      </apiDesc><example conref="examples\Number.toPrecision.1.as"> The following example shows how <codeph>toPrecision(3)</codeph> returns a string with
 only three digits. The string is in fixed-point notation because exponential notation is not required.
<codeblock>

var num:Number = 31.570;
trace(num.toPrecision(3)); // 31.6
</codeblock></example><example conref="examples\Number.toPrecision.2.as"> The following example shows how <codeph>toPrecision(3)</codeph> returns a string with
 only three digits. The string is in exponential notation because the resulting number does not
 contain enough digits for fixed-point notation.
<codeblock>

var num:Number = 4000;
trace(num.toPrecision(3)); // 4.00e+3
</codeblock></example></apiOperationDetail></apiOperation><apiOperation id="uint:AS3:toString"><apiName>toString</apiName><shortdesc>
	 Returns the string representation of a uint object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>uint, uint.tostring, tostring
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The string representation of the uint object.
	 
	 </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>radix</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiDesc>Specifies the numeric base (from 2 to 36) to use for the 
	 number-to-string conversion. If you do not specify the <codeph>radix</codeph>
	 parameter, the default value is <codeph>10</codeph>.
	 
	 </apiDesc></apiParam></apiOperationDef><apiDesc>
	 Returns the string representation of a uint object.
	 
     </apiDesc><example>The following example uses 2 and 8 for the <codeph>radix</codeph>
	 parameters and returns a string value with the corresponding 
	 representation of the number 9:
	 <pre>
	 var myuint:uint = 9;
	 trace(myuint.toString(2)); // 1001
	 trace(myuint.toString(8)); // 11
	 </pre>
	 The following example creates hexadecimal values:
	 <pre>
	 var r:uint = 250;
	 var g:uint = 128;
	 var b:uint = 114;
	 var rgb:String = "0x" + r.toString(16) + g.toString(16) + b.toString(16);
	 trace(rgb); // 0xfa8072 
	 </pre>
	 
	 </example></apiOperationDetail></apiOperation><apiOperation id="uint:AS3:valueOf"><apiName>valueOf</apiName><shortdesc>
	 Returns the primitive uint type value of the specified
	 uint object.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>number, number.valueof, valueof, value of
	  
	  </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The primitive uint type value of this uint
	 object.
	 
	 </apiDesc><apiOperationClassifier>uint</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
	 Returns the primitive uint type value of the specified
	 uint object.
	 
	 </apiDesc><example>The following example outputs the primitive value of the <codeph>
	 numSocks</codeph> object.
	 <pre>
	 var numSocks:uint = 2;
	 trace(numSocks.valueOf()); // 2
	 </pre>
	 
	 </example></apiOperationDetail></apiOperation><apiValue id="uint:MAX_VALUE"><apiName>MAX_VALUE</apiName><shortdesc> 
	The largest representable 32-bit unsigned integer, which is 4,294,967,295.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>uint, uint.max_value, max_value, max value
	 
	 </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>4294967295</apiData><apiValueClassifier>uint</apiValueClassifier></apiValueDef><apiDesc> 
	The largest representable 32-bit unsigned integer, which is 4,294,967,295.
	
   	</apiDesc><example>The following ActionScript displays the largest and smallest representable 
	<codeph>uint</codeph> values:
	<pre>
	trace("uint.MIN_VALUE = " + uint.MIN_VALUE);
	trace("uint.MAX_VALUE = " + uint.MAX_VALUE);
	</pre>
	<p>The values are:</p>
	<pre>
	uint.MIN_VALUE = 0
	uint.MAX_VALUE = 4294967295
	</pre>
	
	</example></apiValueDetail></apiValue><apiValue id="uint:MIN_VALUE"><apiName>MIN_VALUE</apiName><shortdesc>
	 The smallest representable unsigned integer, which is 0.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="9"/><apiPlatform description="" name="AIR" version="1.0"/></apiVersion></asMetadata><asCustoms><keyword>uint, uint.min_value, min_value, min value
      
      </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiAccess value="public"/><apiStatic/><apiData>0</apiData><apiValueClassifier>uint</apiValueClassifier></apiValueDef><apiDesc>
	 The smallest representable unsigned integer, which is <codeph>0</codeph>.
	 
	 </apiDesc><example>The following ActionScript displays the largest and smallest representable 
	 <codeph>uint</codeph> values:
	 <pre>
	 trace("uint.MIN_VALUE = " + uint.MIN_VALUE);
	 trace("uint.MAX_VALUE = " + uint.MAX_VALUE);
	 </pre>
	 <p>The values are:</p>
	 <pre>
	 uint.MIN_VALUE = 0
	 uint.MAX_VALUE = 4294967295
	 </pre>
     
     </example></apiValueDetail></apiValue></apiClassifier><apiClassifier id="globalClassifier:Vector"><apiName>Vector</apiName><shortdesc>
 The Vector class lets you access and manipulate a vector &amp;#8212; an array whose elements
 all have the same data type.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata><asCustoms><keyword>Vector, Vector object, built-in class
 
 </keyword></asCustoms></prolog><apiClassifierDetail><apiClassifierDef><apiAccess value="public"/><apiDynamic/><apiTipTexts><apiTipText>Lets you define Vectors (typed arrays).
 </apiTipText></apiTipTexts><apiBaseClassifier>Object</apiBaseClassifier></apiClassifierDef><apiDesc>
 The Vector class lets you access and manipulate a vector — an array whose elements
 all have the same data type. The data type of a Vector's elements is 
 known as the Vector's <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 (<codeph>[]</codeph>) 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 
 <codeph>push()</codeph>, <codeph>pop()</codeph>, <codeph>shift()</codeph>, <codeph>unshift()</codeph>, 
 and others. The properties 
 and methods of a Vector object are similar — in most cases identical — to 
 the properties and methods of an Array. In 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 (<codeph>.</codeph>), left angle bracket (<codeph>&lt;</codeph>), class name, 
 then a right angle bracket (<codeph>&gt;</codeph>), as shown in this example:</p>
 
 <codeblock>
 var v:Vector.&lt;String&gt;;
 v = new Vector.&lt;String&gt;();
 </codeblock>
 
 <p>In the first line of the example, the variable <codeph>v</codeph> is declared as a 
 Vector.&lt;String&gt; 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 <codeph>v</codeph>.</p>
 
 <p>A variable declared with the Vector.&lt;T&gt; data type can only store 
 a Vector instance that is constructed with the same base type 
 <codeph>T</codeph>. For example, a Vector that's constructed by calling 
 <codeph>new Vector.&lt;String&gt;()</codeph> can't be assigned to a variable 
 that's declared with the Vector.&lt;int&gt; 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>
 
 <codeblock>
 // This code doesn't compile even though Sprite is a DisplayObject subclass
 var v:Vector.&lt;DisplayObject&gt; = new Vector.&lt;Sprite&gt;();
 </codeblock>
 
 <p>To convert a Vector with base type <codeph>T</codeph> to a Vector of a superclass of 
 <codeph>T</codeph>, use the <codeph>Vector()</codeph> 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 <codeph>null</codeph>) 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 (<codeph>length - 1</codeph>). 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 <codeph>[length]</codeph>).</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 
       <codeph>push()</codeph> method or <codeph>unshift()</codeph> 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> 
 
 </apiDesc></apiClassifierDetail><related-links><link href="operators.html#array_access"><linktext>[] array access</linktext></link><link href="#global/Vector()"><linktext>Vector() function</linktext></link><link href="#Array"><linktext>Array class</linktext></link></related-links><apiConstructor id="Vector:Vector"><apiName>Vector</apiName><shortdesc>
	 Creates a Vector with the specified base type.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata></prolog><apiConstructorDetail><apiConstructorDef><apiAccess value="public"/><apiParam><apiItemName>length</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiData>0</apiData><apiDesc>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 (<codeph>null</codeph> for reference types).
	 
	 </apiDesc></apiParam><apiParam><apiItemName>fixed</apiItemName><apiOperationClassifier>Boolean</apiOperationClassifier><apiData>false</apiData><apiDesc>Whether the Vector's length is fixed (<codeph>true</codeph>) or 
	 can be changed (<codeph>false</codeph>). This value can also be set using 
	 the <codeph>fixed</codeph> property.
     
     </apiDesc></apiParam></apiConstructorDef><apiDesc>
	 Creates a Vector with the specified base type.
	 
	 <p>When calling the <codeph>Vector.&lt;T&gt;()</codeph> constructor, specify the
	 base type using type parameter syntax. Type parameter syntax is a 
	 sequence consisting of a dot (<codeph>.</codeph>), left angle bracket 
	 (<codeph>&lt;</codeph>), class name, then a right angle bracket 
	 (<codeph>&gt;</codeph>), as shown in this example:</p>
	 
	 <pre product="flash">
	 var v:Vector.&lt;String&gt; = new Vector.&lt;String&gt;();
	 </pre>
	 
	 <p>Unlike with the Array class, you can't use the <codeph>Vector.&lt;T&gt;()</codeph> 
	 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 <codeph>Vector()</codeph> global function.</p>
	 
	 </apiDesc></apiConstructorDetail><related-links><link href="#global/Vector()"><linktext>Vector() function</linktext></link></related-links></apiConstructor><apiOperation id="Vector:AS3:concat"><apiName>concat</apiName><shortdesc>
     Concatenates the elements specified in the parameters with the elements 
	 in the Vector and creates a new Vector.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata><asCustoms><keyword>Vector.concat, concat, concatenate
     
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiException><apiDesc>If any argument is not an instance of the base type 
	 and can't be converted to the base type.
     
     </apiDesc><apiItemName>TypeError</apiItemName><apiOperationClassifier>TypeError</apiOperationClassifier></apiException><apiReturn><apiDesc>A Vector with the same base type as this Vector that contains 
	 the elements from this Vector followed by elements from the parameters.
	 
	 </apiDesc><apiType value="Vector$T"/></apiReturn><apiParam><apiItemName>args</apiItemName><apiType value="restParam"/><apiDesc>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.
     
     </apiDesc></apiParam><apiTipTexts><apiTipText>Concatenates the elements specified in the parameters.
     </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
     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. 
	 
	 <codeblock>hello world</codeblock>
     
     </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Vector:AS3:every"><apiName>every</apiName><shortdesc>
	Executes a test function on each item in the Vector until an item is 
	reached that returns false for the specified function.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A Boolean value of <codeph>true</codeph> if the specified function returns 
	<codeph>true</codeph> when called on all items in the Vector; otherwise, <codeph>false</codeph>.
	
	</apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn><apiParam><apiItemName>callback</apiItemName><apiOperationClassifier>Function</apiOperationClassifier><apiDesc>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&gt;):Boolean {
	   // your code here
	}
	</pre> 
	
	<p>The callback function should return a Boolean value.</p>
	
	</apiDesc></apiParam><apiParam><apiItemName>thisObject</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiData>null</apiData><apiDesc>The object that the identifer <codeph>this</codeph> in the 
	callback function refers to when the function is called.
	
	</apiDesc></apiParam></apiOperationDef><apiDesc>
	Executes a test function on each item in the Vector until an item is 
	reached that returns <codeph>false</codeph> 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 product="flash">For this method, the second parameter, 
	<codeph>thisObject</codeph>, must be <codeph>null</codeph> if the
	first parameter, <codeph>callback</codeph>, is a method closure. That is 
	the most common way of using this method.</p>
	
	<p product="flash">However, suppose you create a function on a frame on the main timeline using Flash Professional, 
	but you want it to be called in a different <codeph>this</codeph> context:</p>
	
	<pre product="flash">
	function myFunction(item:T, index:int, vector:Vector.&lt;T&gt;):Boolean {
	   // your code here
	}
	</pre>
	
	<p product="flash">Suppose you then use the <codeph>every()</codeph> 
	method on a Vector called <codeph>myVector</codeph>:</p>
	
	<pre product="flash">
	myVector.every(myFunction, someObject);
	</pre>
	
	<p product="flash">Because <codeph>myFunction</codeph> is a member of the 
	main class of the SWF, it cannot be executed in a different <codeph>this</codeph> 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 product="flash">
	var myFunction:Function = function(item:T, index:int, vector:Vector.&lt;T&gt;):Boolean {
	    //your code here
	};
	myVector.every(myFunction, someObject);
	</pre>
	
	</apiDesc></apiOperationDetail><related-links><link href="#Vector/some()"><linktext>Vector.some()</linktext></link></related-links></apiOperation><apiOperation id="Vector:AS3:filter"><apiName>filter</apiName><shortdesc>
     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.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A new Vector that contains all items from the original Vector 
	 for which the <codeph>callback</codeph> function returned <codeph>true</codeph>.
     
     </apiDesc><apiType value="Vector$T"/></apiReturn><apiParam><apiItemName>callback</apiItemName><apiOperationClassifier>Function</apiOperationClassifier><apiDesc>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&gt;):Boolean;</pre> 
     
     </apiDesc></apiParam><apiParam><apiItemName>thisObject</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiData>null</apiData><apiDesc>The object that the identifer <codeph>this</codeph> in the 
	 callback function refers to when the function is called.
	 
     </apiDesc></apiParam></apiOperationDef><apiDesc>
     Executes a test function on each item in the Vector and returns 
	 a new Vector containing all items that return <codeph>true</codeph> for the 
	 specified function. If an item returns <codeph>false</codeph>, 
	 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 product="flash">For this method, the second parameter, 
	 <codeph>thisObject</codeph>, must be <codeph>null</codeph> if the
     first parameter, <codeph>callback</codeph>, is a method closure. That is 
	 the most common way of using this method.</p>
	 
	 <p product="flash">However, suppose you create a function on a frame on the main timeline using Flash Professional, 
	 but you want it to be called in a different <codeph>this</codeph> context:</p>
	 
     <pre product="flash">
     function myFunction(item:T, index:int, vector:Vector.&lt;T&gt;):Boolean {
        // your code here
     }
     </pre>
	 
     <p product="flash">Suppose you then use the <codeph>filter()</codeph> 
	 method on a Vector called <codeph>myVector</codeph>:</p>
	 
     <pre product="flash">
     var result:Vector.&lt;T&gt; = myVector.filter(myFunction, someObject);
     </pre>
	 
     <p product="flash">Because <codeph>myFunction</codeph> is a member of the 
	 main class of the SWF, it cannot be executed in a different <codeph>this</codeph> 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 product="flash">
     var myFunction:Function = function(item:T, index:int, vector:Vector.&lt;T&gt;):Boolean {
         //your code here
     };
     myVector.filter(myFunction, someObject);
     </pre>
	 
     </apiDesc></apiOperationDetail><related-links><link href="#Vector/map()"><linktext>Vector.map()</linktext></link></related-links></apiOperation><apiOperation id="Vector:AS3:forEach"><apiName>forEach</apiName><shortdesc>
     Executes a function on each item in the Vector.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiType value="void"/></apiReturn><apiParam><apiItemName>callback</apiItemName><apiOperationClassifier>Function</apiOperationClassifier><apiDesc>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&gt;):void;</pre>
	 <p>Any return value from the function call is discarded.</p>
     
     </apiDesc></apiParam><apiParam><apiItemName>thisObject</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiData>null</apiData><apiDesc>The object that the identifer <codeph>this</codeph> in the 
	 callback function refers to when the function is called.
     
     </apiDesc></apiParam></apiOperationDef><apiDesc>
     Executes a function on each item in the Vector.
     
     <p product="flash">For this method, the second parameter, 
	 <codeph>thisObject</codeph>, must be <codeph>null</codeph> if the
     first parameter, <codeph>callback</codeph>, is a method closure. That is 
	 the most common way of using this method.</p>
	 
	 <p product="flash">However, suppose you create a function on a frame on the main timeline using Flash Professional, 
	 but you want it to be called in a different <codeph>this</codeph> context:</p>
	 
     <pre product="flash">
     function myFunction(item:T, index:int, vector:Vector.&lt;T&gt;):void {
        // your code here
     }
     </pre>
	 
     <p product="flash">Suppose you then use the <codeph>forEach()</codeph> 
	 method on a Vector called <codeph>myVector</codeph>:</p>
	 
     <pre product="flash">
     myVector.forEach(myFunction, someObject);
     </pre>
	 
     <p product="flash">Because <codeph>myFunction</codeph> is a member of the 
	 main class of the SWF, it cannot be executed in a different <codeph>this</codeph> 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 product="flash">
     var myFunction:Function = function(item:T, index:int, vector:Vector.&lt;T&gt;):void {
         //your code here
     };
     myVector.forEach(myFunction, someObject);
     </pre>
	 
     </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Vector:AS3:indexOf"><apiName>indexOf</apiName><shortdesc>
     Searches for an item in the Vector and returns the index position of the item.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A zero-based index position of the item in the Vector. 
	 If the <codeph>searchElement</codeph> argument is not found, 
	 the return value is -1.
     
     </apiDesc><apiOperationClassifier>int</apiOperationClassifier></apiReturn><apiParam><apiItemName>searchElement</apiItemName><apiType value="T"/><apiDesc>The item to find in the Vector.
     
     </apiDesc></apiParam><apiParam><apiItemName>fromIndex</apiItemName><apiOperationClassifier>int</apiOperationClassifier><apiData>0</apiData><apiDesc>The location in the Vector from which to start searching 
	 for the item. If this parameter is negative, it is treated as <codeph>length 
	 + fromIndex</codeph>, meaning the search starts <codeph>-fromIndex</codeph> items 
	 from the end and searches from that position forward to the end of the Vector.
	 
     </apiDesc></apiParam></apiOperationDef><apiDesc>
     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 (<codeph>===</codeph>).
	 
     </apiDesc></apiOperationDetail><related-links><link href="#Vector/lastIndexOf()"><linktext>Vector.lastIndexOf()</linktext></link><link href="operators.html#strict_equality"><linktext>=== (strict equality)</linktext></link></related-links></apiOperation><apiOperation id="Vector:AS3:join"><apiName>join</apiName><shortdesc>
     Converts the elements in the Vector to strings, inserts the specified separator between the 
     elements, concatenates them, and returns the resulting string.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata><asCustoms><keyword>Vector.join, join
     
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A string consisting of the elements of the Vector
     converted to strings and separated by the specified string.
     
     
     </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn><apiParam><apiItemName>sep</apiItemName><apiOperationClassifier>String</apiOperationClassifier><apiData>,</apiData><apiDesc>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. 
     
     </apiDesc></apiParam><apiTipTexts><apiTipText>Converts the elements in the Vector to strings.
     
     </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
     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 <codeph>join()</codeph> method.
     
     </apiDesc></apiOperationDetail><related-links><link href="#String/split()"><linktext>String.split()</linktext></link></related-links></apiOperation><apiOperation id="Vector:AS3:lastIndexOf"><apiName>lastIndexOf</apiName><shortdesc>
     Searches for an item in the Vector, working backward from the specified 
	 index position, and returns the index position of the matching item.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A zero-based index position of the item in the Vector. 
	 If the <codeph>searchElement</codeph> argument is not found, 
	 the return value is -1.
     
     </apiDesc><apiOperationClassifier>int</apiOperationClassifier></apiReturn><apiParam><apiItemName>searchElement</apiItemName><apiType value="T"/><apiDesc>The item to find in the Vector.
     
     </apiDesc></apiParam><apiParam><apiItemName>fromIndex</apiItemName><apiOperationClassifier>int</apiOperationClassifier><apiData>0x7fffffff</apiData><apiDesc>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 
	 <codeph>length + fromIndex</codeph>, meaning the search starts 
	 <codeph>-fromIndex</codeph> items from the end and searches from that 
	 position backward to index 0.</p>
	 
     </apiDesc></apiParam></apiOperationDef><apiDesc>
     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 (<codeph>===</codeph>).
	 
     </apiDesc></apiOperationDetail><related-links><link href="#Vector/indexOf()"><linktext>Vector.indexOf()</linktext></link><link href="operators.html#strict_equality"><linktext>=== (strict equality)</linktext></link></related-links></apiOperation><apiOperation id="Vector:AS3:map"><apiName>map</apiName><shortdesc>
     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.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>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 <codeph>length</codeph> as the original.
     
     </apiDesc><apiType value="Vector$T"/></apiReturn><apiParam><apiItemName>callback</apiItemName><apiOperationClassifier>Function</apiOperationClassifier><apiDesc>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&gt;):T;</pre> 
     
     </apiDesc></apiParam><apiParam><apiItemName>thisObject</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiData>null</apiData><apiDesc>The object that the identifer <codeph>this</codeph> in the 
	 callback function refers to when the function is called.
	 
     </apiDesc></apiParam></apiOperationDef><apiDesc>
     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 <codeph>length</codeph> as the original Vector. 
	 The element at index <codeph>i</codeph> in the result Vector is the result of 
	 the call on the element at index <codeph>i</codeph> in the original Vector.
     
     <p product="flash">For this method, the second parameter, 
	 <codeph>thisObject</codeph>, must be <codeph>null</codeph> if the
     first parameter, <codeph>callback</codeph>, is a method closure. That is 
	 the most common way of using this method.</p>
	 
	 <p product="flash">However, suppose you create a function on a frame on the main timeline, using Flash Professional
	 but you want it to be called in a different <codeph>this</codeph> context:</p>
	 
     <pre product="flash">
     function myFunction(item:Object, index:int, vector:Vector.&lt;T&gt;):T {
        // your code here
     }
     </pre>
	 
     <p product="flash">Suppose you then use the <codeph>map()</codeph> 
	 method on a Vector called <codeph>myVector</codeph>:</p>
	 
     <pre product="flash">
     myVector.map(myFunction, someObject);
     </pre>
	 
     <p product="flash">Because <codeph>myFunction</codeph> is a member of the 
	 main class of the SWF file, it cannot be executed in a different <codeph>this</codeph> 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 product="flash">
     var myFunction:Function = function(item:T, index:int, vector:Vector.&lt;T&gt;):void {
         //your code here
     };
     myVector.map(myFunction, someObject);
     </pre>
	 
     </apiDesc></apiOperationDetail><related-links><link href="#Vector/filter()"><linktext>Vector.filter()</linktext></link></related-links></apiOperation><apiOperation id="Vector:AS3:pop"><apiName>pop</apiName><shortdesc>
     Removes the last element from the Vector and returns that element.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata><asCustoms><keyword>Vector.pop, pop
     
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiException><apiDesc>If this method is called while <codeph>fixed</codeph> is <codeph>true</codeph>.
     
     </apiDesc><apiItemName>RangeError</apiItemName><apiOperationClassifier>RangeError</apiOperationClassifier></apiException><apiReturn><apiDesc>The value of the last element in the specified Vector.
	 
	 </apiDesc><apiType value="T"/></apiReturn></apiOperationDef><apiDesc>
     Removes the last element from the Vector and returns that element. The 
	 <codeph>length</codeph> property of the Vector is decreased by one when 
	 this function is called.
     
     </apiDesc></apiOperationDetail><related-links><link href="#Vector/push()"><linktext>Vector.push()</linktext></link><link href="#Vector/shift()"><linktext>Vector.shift()</linktext></link><link href="#Vector/unshift()"><linktext>Vector.unshift()</linktext></link></related-links></apiOperation><apiOperation id="Vector:AS3:push"><apiName>push</apiName><shortdesc>
     Adds one or more elements to the end of the Vector and returns 
	 the new length of the Vector.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata><asCustoms><keyword>Vector.push, push
     
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiException><apiDesc>If any argument is not an instance of the 
	 base type <codeph>T</codeph> of the Vector.
     
	 </apiDesc><apiItemName>TypeError</apiItemName><apiOperationClassifier>TypeError</apiOperationClassifier></apiException><apiException><apiDesc>If this method is called while <codeph>fixed</codeph> is <codeph>true</codeph>.
     
     </apiDesc><apiItemName>RangeError</apiItemName><apiOperationClassifier>RangeError</apiOperationClassifier></apiException><apiReturn><apiDesc>The length of the Vector after the new elements are added.
	 
	 </apiDesc><apiOperationClassifier>uint</apiOperationClassifier></apiReturn><apiParam><apiItemName>args</apiItemName><apiType value="restParam"/><apiDesc>One or more values to append to the Vector.
	 
     </apiDesc></apiParam></apiOperationDef><apiDesc>
     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>
     
     </apiDesc></apiOperationDetail><related-links><link href="#Vector/pop()"><linktext>Vector.pop()</linktext></link><link href="#Vector/shift()"><linktext>Vector.shift()</linktext></link><link href="#Vector/unshift()"><linktext>Vector.unshift()</linktext></link></related-links></apiOperation><apiOperation id="Vector:AS3:reverse"><apiName>reverse</apiName><shortdesc>
     Reverses the order of the elements in the Vector.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata><asCustoms><keyword>Vector.reverse, reverse
     
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>The Vector with the elements in reverse order.
	 
     </apiDesc><apiType value="Vector$T"/></apiReturn></apiOperationDef><apiDesc>
     Reverses the order of the elements in the Vector. This method 
	 alters the Vector on which it is called.
     
     </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Vector:AS3:shift"><apiName>shift</apiName><shortdesc>
     Removes the first element from the Vector and returns that element.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata><asCustoms><keyword>Vector.shift, shift
     
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiException><apiDesc>If <codeph>fixed</codeph> is <codeph>true</codeph>.
     
     </apiDesc><apiItemName>RangeError</apiItemName><apiOperationClassifier>RangeError</apiOperationClassifier></apiException><apiReturn><apiDesc>The first element in the Vector.
     
	 </apiDesc><apiType value="T"/></apiReturn></apiOperationDef><apiDesc>
     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.
     
     </apiDesc></apiOperationDetail><related-links><link href="#Vector/pop()"><linktext>Vector.pop()</linktext></link><link href="#Vector/push()"><linktext>Vector.push()</linktext></link><link href="#Vector/unshift()"><linktext>Vector.unshift()</linktext></link></related-links></apiOperation><apiOperation id="Vector:AS3:slice"><apiName>slice</apiName><shortdesc>
     Returns a new Vector that consists of a range of elements from 
	 the original Vector, without modifying the original Vector.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata><asCustoms><keyword>Vector.slice, slice
     
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>a Vector that consists of a range of elements from the original Vector.
     
     </apiDesc><apiType value="Vector$T"/></apiReturn><apiParam><apiItemName>startIndex</apiItemName><apiOperationClassifier>int</apiOperationClassifier><apiData>0</apiData><apiDesc>A number specifying the index of the starting point 
     for the slice. If <codeph>startIndex</codeph> is a negative number, the starting 
     point begins at the end of the Vector, where -1 is the last element.  
     
     </apiDesc></apiParam><apiParam><apiItemName>endIndex</apiItemName><apiOperationClassifier>int</apiOperationClassifier><apiData>16777215</apiData><apiDesc>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 <codeph>endIndex</codeph> is a negative 
     number, the ending point is specified from the end of the Vector, where -1 is the 
     last element.
     
     </apiDesc></apiParam><apiTipTexts><apiTipText>Returns a new Vector that consists of a range of elements from the original Vector.
     
     </apiTipText></apiTipTexts></apiOperationDef><apiDesc>
     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 <codeph>startIndex</codeph> element and 
	 all elements up to, but not including, the <codeph>endIndex</codeph> element.
	 
     <p>If you don't pass any parameters, a duplicate of the original 
	 Vector is created.</p>
     
     </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Vector:AS3:some"><apiName>some</apiName><shortdesc>
     Executes a test function on each item in the Vector until an 
	 item is reached that returns true.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>A Boolean value of <codeph>true</codeph> if any items in the Vector return 
	 <codeph>true</codeph> for the specified function; otherwise, <codeph>false</codeph>.
     
     </apiDesc><apiOperationClassifier>Boolean</apiOperationClassifier></apiReturn><apiParam><apiItemName>callback</apiItemName><apiOperationClassifier>Function</apiOperationClassifier><apiDesc>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&gt;):Boolean</pre> 
     
     <p>The callback function should return a Boolean value.</p>
     
     </apiDesc></apiParam><apiParam><apiItemName>thisObject</apiItemName><apiOperationClassifier>Object</apiOperationClassifier><apiData>null</apiData><apiDesc>The object that the identifer <codeph>this</codeph> in the 
	 callback function refers to when the function is called.
	 
     </apiDesc></apiParam></apiOperationDef><apiDesc>
     Executes a test function on each item in the Vector until an 
	 item is reached that returns <codeph>true</codeph>. 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 product="flash">For this method, the second parameter, 
	 <codeph>thisObject</codeph>, must be <codeph>null</codeph> if the
     first parameter, <codeph>callback</codeph>, is a method closure. That is 
	 the most common way of using this method.</p>
	 
	 <p product="flash">However, suppose you create a function on a frame on the main timeline, 
	 but you want it to be called in a different <codeph>this</codeph> context:</p>
	 
     <pre product="flash">
     function myFunction(item:Object, index:int, vector:Vector.&lt;T&gt;):Boolean {
        // your code here
     }
     </pre>
	 
     <p product="flash">Suppose you then use the <codeph>some()</codeph> 
	 method on a Vector called <codeph>myVector</codeph>:</p>
	 
     <pre product="flash">
     myVector.some(myFunction, someObject);
     </pre>
	 
     <p product="flash">Because <codeph>myFunction</codeph> is a member of the 
	 main class of the SWF file, it cannot be executed in a different <codeph>this</codeph> 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 product="flash">
     var myFunction:Function = function(item:T, index:int, vector:Vector.&lt;T&gt;):Boolean {
         //your code here
     };
     myVector.some(myFunction, someObject);
     </pre>
	 
     </apiDesc></apiOperationDetail><related-links><link href="#Vector/every()"><linktext>every()</linktext></link></related-links></apiOperation><apiOperation id="Vector:AS3:sort"><apiName>sort</apiName><shortdesc>
     Sorts the elements in the Vector.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata><asCustoms><keyword>Vector.sort, sort
     
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiReturn><apiDesc>This Vector, with elements in the new order.
     
     </apiDesc><apiType value="Vector$T"/></apiReturn><apiParam><apiItemName>compareFunction</apiItemName><apiOperationClassifier>Function</apiOperationClassifier><apiDesc>A comparison method that determines 
	 the behavior of the sort.
	 
     <p>The specified method must take two arguments of the base type (<codeph>T</codeph>) 
	 of the Vector and return a Number:</p>
	 
	 <codeblock>function compare(x:T, y:T):Number {}</codeblock>
	 
	 <p>The logic of the <codeph>compareFunction</codeph> function is that, given two 
	 elements <codeph>x</codeph> and <codeph>y</codeph>, the function returns one of the 
	 following three values:</p>
	 
     <ul>
       <li>a negative number, if <codeph>x</codeph> should appear before <codeph>y</codeph> 
	   in the sorted sequence</li>
       <li>0, if <codeph>x</codeph> equals <codeph>y</codeph></li>
       <li>a positive number, if <codeph>x</codeph> should appear after <codeph>y</codeph> 
	   in the sorted sequence</li>
     </ul>
	 
     </apiDesc></apiParam></apiOperationDef><apiDesc>
     Sorts the elements in the Vector. This method sorts according to the function 
	 provided as the <codeph>compareFunction</codeph> parameter.
	 
     </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Vector:AS3:splice"><apiName>splice</apiName><shortdesc>
     Adds elements to and removes elements from the Vector.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata><asCustoms><keyword>Vector.splice, splice
	 
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiException><apiDesc>If the <codeph>startIndex</codeph> and <codeph>deleteCount</codeph> 
	 arguments specify an index to be deleted that's outside the Vector's bounds.
	 
	 </apiDesc><apiItemName>RangeError</apiItemName><apiOperationClassifier>RangeError</apiOperationClassifier></apiException><apiException><apiDesc>If this method is called while <codeph>fixed</codeph> is <codeph>true</codeph> and the 
	 <codeph>splice()</codeph> operation changes the <codeph>length</codeph> of the Vector.
     
     </apiDesc><apiItemName>RangeError</apiItemName><apiOperationClassifier>RangeError</apiOperationClassifier></apiException><apiReturn><apiDesc>a Vector containing the elements that were removed from the original Vector.
     
	 </apiDesc><apiType value="Vector$T"/></apiReturn><apiParam><apiItemName>startIndex</apiItemName><apiOperationClassifier>int</apiOperationClassifier><apiDesc>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).
	 
     </apiDesc></apiParam><apiParam><apiItemName>deleteCount</apiItemName><apiOperationClassifier>uint</apiOperationClassifier><apiDesc>An integer that specifies the number of elements 
	 to be deleted. This number includes the element specified in the 
	 <codeph>startIndex</codeph> parameter. If you do not specify a value for the 
     <codeph>deleteCount</codeph> parameter, the method deletes all of the values 
	 from the <codeph>startIndex</codeph> element to the last element in the Vector. 
	 If the value is 0, no elements are deleted.
	 
     </apiDesc></apiParam><apiParam><apiItemName>items</apiItemName><apiType value="restParam"/><apiDesc>An optional list of one or more comma-separated values
     to insert into the Vector at the position specified in the <codeph>startIndex</codeph> parameter.
     
     </apiDesc></apiParam></apiOperationDef><apiDesc>
     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 <codeph>...args</codeph> for the parameters, as this example shows:</p>
	 
     <pre>
     public override function splice(...args) {
       // your statements here
     }
     </pre>
     
     </apiDesc></apiOperationDetail></apiOperation><apiOperation id="Vector:toLocaleString"><apiName>toLocaleString</apiName><shortdesc>
     Returns a string that represents the elements in the specified Vector.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>A string of Vector elements.
	 
     </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
     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 <codeph>Vector.toString()</codeph> method.
     
     </apiDesc></apiOperationDetail><related-links><link href="#Vector/toString()"><linktext>Vector.toString()</linktext></link></related-links></apiOperation><apiOperation id="Vector:toString"><apiName>toString</apiName><shortdesc>
     Returns a string that represents the elements in the Vector.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata><asCustoms><keyword>Vector.toString, toString
     
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="public"/><apiReturn><apiDesc>A string of Vector elements.
     
     </apiDesc><apiOperationClassifier>String</apiOperationClassifier></apiReturn></apiOperationDef><apiDesc>
     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 <codeph>Vector.join()</codeph> method.
     
     </apiDesc></apiOperationDetail><related-links><link href="#String/split()"><linktext>String.split()</linktext></link><link href="#Vector/join()"><linktext>Vector.join()</linktext></link></related-links></apiOperation><apiOperation id="Vector:AS3:unshift"><apiName>unshift</apiName><shortdesc>
     Adds one or more elements to the beginning of the Vector and returns 
	 the new length of the Vector.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata><asCustoms><keyword>Vector.unshift, unshift
     
     </keyword></asCustoms></prolog><apiOperationDetail><apiOperationDef><apiAccess value="AS3"/><apiException><apiDesc>If any argument is not an instance of the 
	 base type <codeph>T</codeph> of the Vector.
     
	 </apiDesc><apiItemName>TypeError</apiItemName><apiOperationClassifier>TypeError</apiOperationClassifier></apiException><apiException><apiDesc>If this method is called while <codeph>fixed</codeph> is <codeph>true</codeph>.
     
     </apiDesc><apiItemName>RangeError</apiItemName><apiOperationClassifier>RangeError</apiOperationClassifier></apiException><apiReturn><apiDesc>An integer representing the new length of the Vector.
	 
	 </apiDesc><apiOperationClassifier>uint</apiOperationClassifier></apiReturn><apiParam><apiItemName>args</apiItemName><apiType value="restParam"/><apiDesc>One or more instances of the base type of the Vector 
	 to be inserted at the beginning of the Vector.  
     
     </apiDesc></apiParam></apiOperationDef><apiDesc>
     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>
	 
     </apiDesc></apiOperationDetail><related-links><link href="#Vector/pop()"><linktext>Vector.pop()</linktext></link><link href="#Vector/push()"><linktext>Vector.push()</linktext></link><link href="#Vector/shift()"><linktext>Vector.shift()</linktext></link></related-links></apiOperation><apiValue id="Vector:fixed:get"><apiName>fixed</apiName><shortdesc>
     Indicates whether the length property of the Vector can 
	 be changed.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata><asCustoms><keyword>vector.fixed, fixed
     
     </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>Boolean</apiValueClassifier></apiValueDef><apiDesc>
     Indicates whether the <codeph>length</codeph> property of the Vector can 
	 be changed. If the value is <codeph>false</codeph>, the <codeph>length</codeph>
	 property can't be changed. This means the following operations are not 
	 allowed when <codeph>fixed</codeph> is <codeph>true</codeph>:
	 
	 <ul>
	   <li>setting the <codeph>length</codeph> property directly</li>
	   <li>assigning a value to index position <codeph>length</codeph></li>
	   <li>calling a method that changes the <codeph>length</codeph> property, including:
	     <ul>
	       <li><codeph>pop()</codeph></li>
	       <li><codeph>push()</codeph></li>
	       <li><codeph>shift()</codeph></li>
	       <li><codeph>unshift()</codeph></li>
	       <li><codeph>splice()</codeph> (if the <codeph>splice()</codeph> call changes 
	           the <codeph>length</codeph> of the Vector).</li>
	     </ul>
	   </li>
	 </ul>
	 
     </apiDesc></apiValueDetail></apiValue><apiValue id="Vector:length:get"><apiName>length</apiName><shortdesc>
     The range of valid indices available in the Vector.</shortdesc><prolog><asMetadata><apiVersion><apiLanguage version="3.0"/><apiPlatform description="" name="Flash" version="10"/><apiPlatform description="" name="AIR" version="1.5"/></apiVersion></asMetadata><asCustoms><keyword>vector.length, length
     
     </keyword></asCustoms></prolog><apiValueDetail><apiValueDef><apiProperty/><apiAccess value="public"/><apiDynamic/><apiValueAccess value="readwrite"/><apiValueClassifier>uint</apiValueClassifier><apiException><apiDesc>If this property is changed 
	 while <codeph>fixed</codeph> is <codeph>true</codeph>.
	 
	 </apiDesc><apiItemName>RangeError</apiItemName><apiOperationClassifier>RangeError</apiOperationClassifier></apiException><apiException><apiDesc>If this property is set to a value larger 
	 than the maximum allowable index (2<sup>32</sup>).
	 
     </apiDesc><apiItemName>RangeError</apiItemName><apiOperationClassifier>RangeError</apiOperationClassifier></apiException></apiValueDef><apiDesc>
     The range of valid indices available in the Vector. 
	 A Vector instance has index positions up to but not including 
	 the <codeph>length</codeph> value.
	 
	 <p>Every Vector element always has a value that is either an 
	 instance of the base type or <codeph>null</codeph>. When the 
	 <codeph>length</codeph> 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 (<codeph>null</codeph> for reference types).</p>
	 
	 <p>When the <codeph>length</codeph> 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 <codeph>length</codeph> 
	 value are removed from the Vector.</p>
	 
	 </apiDesc></apiValueDetail></apiValue></apiClassifier></apiPackage>