﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0014)about:internet -->
<!-- saved from url=(0014)about:internet --><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="book" content="ActionScript&nbsp;3.0&nbsp;Language&nbsp;and&nbsp;Components&nbsp;Reference"><link rel="stylesheet" href="style.css" type="text/css" media="screen"><link rel="stylesheet" href="print.css" type="text/css" media="print"><link rel="stylesheet" href="override.css" type="text/css"><title>Operators (ActionScript 3.0)</title></head><body><script language="javascript" type="text/javascript" src="asdoc.js"></script><script language="javascript" type="text/javascript" src="help.js"></script><script language="javascript" type="text/javascript" src="cookies.js"></script><script language="javascript" type="text/javascript">  
            <!--  
			    
				asdocTitle = 'Operators - ActionScript 3.0 Language and Components Reference';

				var baseRef = '';

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

				<!--

				
				    
				

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

				    
				        
				    
				-->
                
                    
                
			</script><div class="MainContent"><br><p>Symbolic operators are characters that specify how to combine, compare, or modify the values of an expression.</p><br><a name="operatorSummary"></a><table cellspacing="0" cellpadding="3" class="summaryTable"><tr><th>&nbsp;</th><th colspan="3"> Arithmetic </th></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">+</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#addition">addition</a></td><td class="summaryTableLastCol">Adds numeric expressions.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">--</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#decrement">decrement</a></td><td class="summaryTableLastCol">Subtracts 1 from the operand.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">/</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#division">division</a></td><td class="summaryTableLastCol">Divides <code>expression1</code> by <code>expression2</code>.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">++</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#increment">increment</a></td><td class="summaryTableLastCol">Adds 1 to an expression.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">%</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#modulo">modulo</a></td><td class="summaryTableLastCol">Calculates the remainder of <code>expression1</code> divided by <code>expression2</code>.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">*</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#multiplication">multiplication</a></td><td class="summaryTableLastCol">Multiplies two numerical expressions.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">-</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#subtraction">subtraction</a></td><td class="summaryTableLastCol">Used for negating or subtracting.</td></tr><tr><th>&nbsp;</th><th colspan="3"> Arithmetic compound assignment </th></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">+=</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#addition_assignment">addition assignment</a></td><td class="summaryTableLastCol">Assigns <code>expression1</code> the value of <code>expression1 + expression2</code>.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">/=</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#division_assignment">division assignment</a></td><td class="summaryTableLastCol">Assigns <code>expression1</code> the value of <code>expression1 / expression2</code>.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">%=</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#modulo_assignment">modulo assignment</a></td><td class="summaryTableLastCol">Assigns <code>expression1</code> the value of <code>expression1 % expression2</code>.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">*=</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#multiplication_assignment">multiplication assignment</a></td><td class="summaryTableLastCol">Assigns <code>expression1</code> the value of <code>expression1 * expression2</code>.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">-=</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#subtraction_assignment">subtraction assignment</a></td><td class="summaryTableLastCol">Assigns <code>expression1</code> the value of <code>expression1 - expression2</code>.</td></tr><tr><th>&nbsp;</th><th colspan="3"> Assignment </th></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">=</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#assignment">assignment</a></td><td class="summaryTableLastCol">Assigns the value of <code>expression2</code> (the operand on the right) to the variable, array element, or property in <code>expression1</code>.</td></tr><tr><th>&nbsp;</th><th colspan="3"> Bitwise </th></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">&</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#bitwise_AND">bitwise AND</a></td><td class="summaryTableLastCol">Converts <code>expression1</code> and <code>expression2</code> to 32-bit unsigned integers, and performs a Boolean AND operation on each bit of the integer parameters.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol"><<</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#bitwise_left_shift">bitwise left shift</a></td><td class="summaryTableLastCol">Converts <code>expression1</code> and <code>shiftCount</code> to 32-bit integers, and shifts all the bits in <code>expression1</code> to the left by the number of places specified by the integer resulting from the conversion of <code>shiftCount</code>.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">~</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#bitwise_NOT">bitwise NOT</a></td><td class="summaryTableLastCol">Converts <code>expression</code> to a 32-bit signed integer, and then applies a bitwise one's complement.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">|</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#bitwise_OR">bitwise OR</a></td><td class="summaryTableLastCol">Converts <code>expression1</code> and <code>expression2</code> to 32-bit unsigned integers, and places a 1 in each bit position where the corresponding bits of either <code> expression1</code> or <code>expression2</code> are 1.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">>></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#bitwise_right_shift">bitwise right shift</a></td><td class="summaryTableLastCol">Converts <code>expression</code> and <code>shiftCount</code> to 32-bit integers, and shifts all the bits in <code>expression</code> to the right by the number of places specified by the integer that results from the conversion of <code>shiftCount</code>.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">>>></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#bitwise_unsigned_right_shift">bitwise unsigned right shift</a></td><td class="summaryTableLastCol">The same as the bitwise right shift (<code>&gt;&gt;</code>) operator except that it does not preserve the sign of the original expression because the bits on the left are always filled with 0.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">^</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#bitwise_XOR">bitwise XOR</a></td><td class="summaryTableLastCol">Converts <code>expression1</code> and <code>expression2</code> to 32-bit unsigned integers, and places a 1 in each bit position where the corresponding bits in <code>expression1</code> or <code>expression2</code>, but not both, are 1.</td></tr><tr><th>&nbsp;</th><th colspan="3"> Bitwise compound assignment </th></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">&=</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#bitwise_AND_assignment">bitwise AND assignment</a></td><td class="summaryTableLastCol">Assigns <code>expression1</code> the value of <code>expression1</code> <code>&amp; expression2</code>.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol"><<=</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#bitwise_left_shift_and_assignment">bitwise left shift and assignment</a></td><td class="summaryTableLastCol">Performs a bitwise left shift (<code>&lt;&lt;=</code>) operation and stores the contents as a result in <code>expression1</code>.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">|=</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#bitwise_OR_assignment">bitwise OR assignment</a></td><td class="summaryTableLastCol">Assigns <code>expression1</code> the value of <code> expression1 | expression2</code>.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">>>=</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#bitwise_right_shift_and_assignment">bitwise right shift and assignment</a></td><td class="summaryTableLastCol">Performs a bitwise right-shift operation and stores the result in <code>expression</code>.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">>>>=</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#bitwise_unsigned_right_shift_and_assignment">bitwise unsigned right shift and assignment</a></td><td class="summaryTableLastCol">Performs an unsigned bitwise right-shift operation and stores the result in <code>expression</code>.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">^=</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#bitwise_XOR_assignment">bitwise XOR assignment</a></td><td class="summaryTableLastCol">Assigns <code>expression1</code> the value of <code> expression1 ^ expression2</code>.</td></tr><tr><th>&nbsp;</th><th colspan="3"> Comment </th></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">/*..*/</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#block_comment_delimiter">block comment delimiter</a></td><td class="summaryTableLastCol">Delimits one or more lines of script comments.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">//</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#line_comment_delimiter">line comment delimiter</a></td><td class="summaryTableLastCol">Indicates the beginning of a script comment.</td></tr><tr><th>&nbsp;</th><th colspan="3"> Comparison </th></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">==</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#equality">equality</a></td><td class="summaryTableLastCol">Tests two expressions for equality.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#greater_than">greater than</a></td><td class="summaryTableLastCol">Compares two expressions and determines whether <code>expression1</code> is greater than <code>expression2</code>; if it is, the result is <code>true</code>.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">>=</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#greater_than_or_equal_to">greater than or equal to</a></td><td class="summaryTableLastCol">Compares two expressions and determines whether <code>expression1</code> is greater than or equal to <code>expression2</code> (<code>true</code>) or <code>expression1</code> is less than <code>expression2</code> (<code>false</code>).</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">!=</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#inequality">inequality</a></td><td class="summaryTableLastCol">Tests for the exact opposite of the equality (<code>==</code>) operator.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol"><</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#less_than">less than</a></td><td class="summaryTableLastCol">Compares two expressions and determines whether <code>expression1</code> is less than <code>expression2</code>; if so, the result is <code>true</code>.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol"><=</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#less_than_or_equal_to">less than or equal to</a></td><td class="summaryTableLastCol">Compares two expressions and determines whether <code>expression1</code> is less than or equal to <code>expression2</code>; if it is, the result is <code>true</code>.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">===</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#strict_equality">strict equality</a></td><td class="summaryTableLastCol">Tests two expressions for equality, but does not perform automatic data conversion.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">!==</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#strict_inequality">strict inequality</a></td><td class="summaryTableLastCol">Tests for the exact opposite of the strict equality (<code>===</code>) operator.</td></tr><tr><th>&nbsp;</th><th colspan="3"> Logical </th></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">&&</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#logical_AND">logical AND</a></td><td class="summaryTableLastCol">Returns <code>expression1</code> if it is <code>false</code> or can be converted to <code>false</code>, and <code>expression2</code> otherwise.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">&&=</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#logical_AND_assignment">logical AND assignment</a></td><td class="summaryTableLastCol">Assigns <code>expression1</code> the value of <code>expression1 &amp;&amp; expression2</code>.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">!</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#logical_NOT">logical NOT</a></td><td class="summaryTableLastCol">Inverts the Boolean value of a variable or expression.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">||</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#logical_OR">logical OR</a></td><td class="summaryTableLastCol">Returns <code>expression1</code> if it is <code>true</code> or can be converted to <code>true</code>, and <code>expression2</code> otherwise.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">||=</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#logical_OR_assignment">logical OR assignment</a></td><td class="summaryTableLastCol">Assigns <code>expression1</code> the value of <code>expression1 || expression2</code>.</td></tr><tr><th>&nbsp;</th><th colspan="3"> Other </th></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">[]</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#array_access">array access</a></td><td class="summaryTableLastCol">Initializes a new array or multidimensional array with the specified elements (<code>a0</code>, and so on), or accesses elements in an array.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#as">as</a></td><td class="summaryTableLastCol">Evaluates whether an expression specified by the first operand is a member of the data type specified by the second operand.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">,</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#comma">comma</a></td><td class="summaryTableLastCol">Evaluates <code>expression1</code>, then <code>expression2</code>, and so on.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">?:</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#conditional">conditional</a></td><td class="summaryTableLastCol">Evaluates <code>expression1</code>, and if the value of <code>expression1</code> is <code>true</code>, the result is the value of <code>expression2</code>; otherwise the result is the value of <code>expression3</code>.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#delete">delete</a></td><td class="summaryTableLastCol">Destroys the object property specified by <code>reference</code>; the result is <code>true</code> if the property does not exist after the operation completes, and <code>false</code> otherwise.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">.</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#dot">dot</a></td><td class="summaryTableLastCol">Accesses class variables and methods, gets and sets object properties, and delimits imported packages or classes.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#in">in</a></td><td class="summaryTableLastCol">Evaluates whether a property is part of a specific object.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#instanceof">instanceof</a></td><td class="summaryTableLastCol">Evaluates whether an expression's prototype chain includes the prototype object for <code>function</code>.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#is">is</a></td><td class="summaryTableLastCol">Evaluates whether an object is compatible with a specific data type, class, or interface.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">::</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#name_qualifier">name qualifier</a></td><td class="summaryTableLastCol">Identifies the namespace of a property, a method, an XML property, or an XML attribute.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#new">new</a></td><td class="summaryTableLastCol">Instantiates a class instance.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">{}</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#object_initializer">object initializer</a></td><td class="summaryTableLastCol">Creates a new object and initializes it with the specified <code>name</code> and <code>value</code> property pairs.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">()</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#parentheses">parentheses</a></td><td class="summaryTableLastCol">Performs a grouping operation on one or more parameters, performs sequential evaluation of expressions, or surrounds one or more parameters and passes them as arguments to a function that precedes the parentheses.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">/</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#RegExp_delimiter">RegExp delimiter</a></td><td class="summaryTableLastCol">When used before and after characters, indicates that the characters have a literal value and are considered a regular expression (RegExp), not a variable, string, or other ActionScript element.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">:</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#type">type</a></td><td class="summaryTableLastCol">Used for assigning a data type; this operator specifies the variable type, function return type, or function parameter type.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#typeof">typeof</a></td><td class="summaryTableLastCol">Evaluates <code>expression</code> and returns a string specifying the expression's data type.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#void">void</a></td><td class="summaryTableLastCol">Evaluates an expression and then discards its value, returning <code>undefined</code>.</td></tr><tr><th>&nbsp;</th><th colspan="3"> String </th></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">+</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#concatenation">concatenation</a></td><td class="summaryTableLastCol">Concatenates (combines) strings.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">+=</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#concatenation_assignment">concatenation assignment</a></td><td class="summaryTableLastCol">Assigns <code>expression1</code> the value of <code>expression1 + expression2</code>.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">"</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#string_delimiter">string delimiter</a></td><td class="summaryTableLastCol">When used before and after characters, indicates that the characters have a literal value and are considered a string, not a variable, numerical value, or other ActionScript element.</td></tr><tr><th>&nbsp;</th><th colspan="3"> XML </th></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">@</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#attribute_identifier">attribute identifier</a></td><td class="summaryTableLastCol">Identifies attributes of an XML or XMLList object.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">{ }</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#braces_(XML)">braces (XML)</a></td><td class="summaryTableLastCol">Evaluates an expression that is used in an XML or XMLList initializer.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">[ ]</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#brackets_(XML)">brackets (XML)</a></td><td class="summaryTableLastCol">Accesses a property or attribute of an XML or XMLList object.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">+</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#concatenation_(XMLList)">concatenation (XMLList)</a></td><td class="summaryTableLastCol">Concatenates (combines) XML or XMLList values into an XMLList object.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">+=</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#concatenation_assignment_(XMLList)">concatenation assignment (XMLList)</a></td><td class="summaryTableLastCol">Assigns <code>expression1</code>, which is an XMLList object, the value of <code>expression1 + expression2</code>.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#delete_(XML)">delete (XML)</a></td><td class="summaryTableLastCol">Deletes the XML elements or attributes specified by <code>reference</code>.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">..</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#descendant_accessor">descendant accessor</a></td><td class="summaryTableLastCol">Navigates to descendant elements of an XML or XMLList object, or (combined with the @ operator) finds matching attributes of descendants.</td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">.</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#dot_(XML)">dot (XML)</a></td><td class="summaryTableLastCol">Navigates to child elements of an XML or XMLList object, or (combined with the @ operator) returns attributes of an XML or XMLList object.</td></tr><tr class="row1"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">( )</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#parentheses_(XML)">parentheses (XML)</a></td><td class="summaryTableLastCol">Evaluates an expression in an E4X XML construct. </td></tr><tr class="row0"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableOperatorCol">< ></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#XML_literal_tag_delimiter">XML literal tag delimiter</a></td><td class="summaryTableLastCol">Defines an XML tag in an XML literal.</td></tr></table><div class="detailSectionHeader">Operator Detail</div><a name="addition"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">+&nbsp;addition</td><td class="detailHeaderType"> Operator </td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 + expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Adds numeric expressions. If both expressions are integers, the sum is an integer; if either or both expressions are floating-point numbers, the sum is a floating-point number.
            <p>If one expression is a string, all other expressions are converted to strings and concatenated instead of summed. Otherwise, if an expression is not a number, Flash<sup>&#xAE;</sup> Player converts it to a number.</p>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Number.html">Number</a></code> &mdash; 
					A value to be added.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Number.html">Number</a></code> &mdash; 
					A value to be added.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Number.html">Number</a></code> &mdash; An integer or floating-point number.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>This statement adds the integers 2 and 3:
<div class='listing'><pre>
trace(2 + 3); // 5</pre></div> 
This statement adds the floating-point numbers 2.5 and 3.25:
<div class='listing'><pre>
trace(2.5 + 3.25); // 5.75</pre></div> 
This example shows that if one expression is a string, all other expressions are converted to strings and concatenated:
<div class='listing'><pre>
trace("Number " + 8 + 0); // Number 80</pre></div>
<span class="flashonly">Variables associated with dynamic and input text fields have the data type String. In the following example, the variable <code>deposit</code> is an input text field on the Stage. After a user enters a deposit amount, the script attempts to add <code>deposit </code> to <code>oldBalance</code>. However, because <code>deposit</code> is of type String, the script concatenates (combines to form one string) the variable values rather than summing them. 
<div class='listing'><pre>var oldBalance:Number = 1345.23; 
var currentBalance = deposit_txt.text + oldBalance; 
trace(currentBalance); </pre></div>
For example, if a user enters 475 in the deposit text field, the <code>trace()</code> statement sends the value 4751345.23 to the Output panel. To correct this, use the <code>Number()</code> function to convert the string to a number, as shown here: 
<div class='listing'><pre>var oldBalance:Number = 1345.23; 
var currentBalance:Number = Number(deposit_txt.text) + oldBalance;
trace(currentBalance);
</pre></div> </span>

            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#concatenation" target="">+ (concatenation)</a></div></div><a name="addition_assignment"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">+=&nbsp;addition assignment</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 += expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Assigns <code>expression1</code> the value of <code> expression1 + expression2</code>. For example, the following two statements have the same result: <pre>x += y; 
x = x + y; </pre>All the rules of the addition (+) operator apply to the addition assignment (<code>+=</code>) operator.
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Number.html">Number</a></code> &mdash; The result of the addition.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example shows a numeric use of the addition assignment (<code>+=</code>) operator: 
<div class='listing'><pre>var x:Number = 5; 
var y:Number = 10; 
x += y; 
trace(x); // 15 
</pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#addition" target="">+ (addition)</a></div></div><a name="array_access"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">[]&nbsp;array access</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre><code>myArray = [a0, a1,...aN]</code>
<code>myArray[i] = value</code> 
<code>myObject[propertyName]</code></pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Initializes a new array or multidimensional array with the specified elements (<code>a0</code>, and so on), or accesses elements in an array. The array access operator lets you dynamically set and retrieve instance, variable, and object names. It also lets you access object properties. 
			<p>Usage 1: An array is an object whose properties are called elements, which are each identified by a number called an index. When you create an array, you surround the elements with the array access ([]) operator (or brackets). An array can contain elements of various types. For example, the following array, called <code>employee</code>, has three elements; the first is a number and the second two are strings (inside quotation marks): </p> 
			<div class='listing'><pre>var employee:Array = [15, "Barbara", "Jay"]; </pre></div> 
			You can nest brackets to simulate multidimensional arrays. You can nest arrays up to 256 levels deep. The following code creates an array called <code>ticTacToe</code> with three elements; each element is also an array with three elements: <div class='listing'><pre>var ticTacToe:Array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]; 
			<span class="flashonly">
/* Select Debug > List Variables in test mode 
to see a list of the array elements.*/</span> </pre></div> 
Usage 2: Surround the index of each element with brackets ([]) to access it directly; you can add a new element to an array, or you can change or retrieve the value of an existing element. The first index in an array is always 0, as shown in the following example: <div class='listing'><pre>var my_array:Array = new Array(); 
my_array[0] = 15; 
my_array[1] = "Hello"; 
my_array[2] = true; </pre></div> 
You can use brackets to add a fourth element, as shown in the following example: 
<div class='listing'><pre>my_array[3] = "George"; </pre></div> 
You can use brackets to access an element in a multidimensional array. The first set of brackets identifies the element in the original array, and the second set identifies the element in the nested array. The following <code>trace()</code> statement finds the third element (index 2) of the second array (index 1).
<div class='listing'><pre>var ticTacToe:Array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]; 
trace(ticTacToe[1][2]); // 6 </pre></div> 
Usage 3: You can use the array access operator to dynamically set and retrieve values for a property of an object: 
<div class='listing'><pre>var obj:Object = new Object();
obj.prop1 = "foo";
trace(obj["prop" + 1]); // foo
obj.prop2 = "bar";
for (j in obj) {
	trace(obj[j]);
} 
/* Output of for loop: 
foo
bar */
</pre></div>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">myArray</span>:<a href="Object.html">Object</a></code> &mdash; 
					The name of an array.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">a0, a1,...aN</span>:<a href="Object.html">Object</a></code> &mdash; 
					Elements in an array; any native type or object instance, including nested arrays.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">i</span>:<a href="Number.html">Number</a></code> &mdash; 
					An integer index greater than or equal to 0.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">myObject</span>:<a href="Object.html">Object</a></code> &mdash; 
					The name of an object.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">propertyName</span>:<a href="String.html">String</a></code> &mdash; 
					A string that names a property of the object.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Object.html">Object</a></code> &mdash; <p>Usage 1: A reference to an array. </p> <p>Usage 2: A value from the array; either a native type or an object instance (including an Array instance). </p> <p>Usage 3: A property from the object; either a native type or an object instance (including an Array instance). </p></td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example shows two ways to create a new empty Array object; the first line uses brackets: 
<div class='listing'><pre>var my_array:Array = []; 
var my_array:Array = new Array(); </pre></div> 
<p>The following example creates an array called <code>employee_array</code> with three elements and changes the third element in the array.</p>
<div class='listing'><pre>var employee_array = ["Barbara", "George", "Mary"]; 
trace(employee_array); // Barbara,George,Mary 
employee_array[2] = "Sam"; 
trace(employee_array); // Barbara,George,Sam </pre></div> 
In the following example, the expression inside the brackets is evaluated, and the result is used as the name of the variable to be retrieved from the <code>obj</code> object: 
<div class='listing'><pre>var obj:Object = new Object();
obj.prop1 = "foo";
obj.prop2 = "bar";

for (var i:int = 1;i &lt; 3;i++) {
    trace(obj["prop"+i]);
}
/* Output of for loop:
foo
bar */ 
</pre></div> 

            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="Array.html" target="">Array class</a><br/><a href="Object.html" target="">Object class</a></div></div><a name="as"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">as</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression as datatype</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Evaluates whether an expression specified by the first operand is a member of the data type specified by the second operand. If the first operand is a member of the data type, the result is the first operand. Otherwise, the result is the value <code>null</code>.

			<p>The expression used for the second operand must evaluate to a data type.</p>
</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					The value to check against the data type specified.				
				</td></tr><tr><td width="20px"></td><td><code><span class="label">datatype</span>:<a href="Class.html">Class</a></code> &mdash; 
					The data type used to evaluate the <code>expression</code> operand. The special * type, which means untyped, cannot be used.				
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Object.html">Object</a></code> &mdash; The result is <code>expression</code> if <code>expression</code> is a member of the data type specified in <code>datatype</code>. Otherwise, the result is the value <code>null</code>.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>
                The following example creates a simple array named <code>myArray</code> and uses the <code>as</code> operator with various data types.
<div class='listing'><pre>
public var myArray:Array = ["one", "two", "three"];
trace(myArray as Array);  // one,two,three
trace(myArray as Number); // null
trace(myArray as int);    // null
</pre></div>
                
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#instanceof" target="">instanceof</a><br/><a href="#is" target="">is</a></div></div><a name="assignment"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">=&nbsp;assignment</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 = expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Assigns the value of <code>expression2</code> (the operand on the right) to the variable, array element, or property in <code>expression1</code>. Assignment can be either by value or by reference. Assignment by value copies the actual value of <code>expression2</code> and stores it in <code>expression1</code>. Assignment by value is used when <code>expression2</code> is a primitive value, which means that its data type is either Boolean, Number, int, uint, or String. Assignment by reference stores a reference to <code>expression2</code> in <code>expression1</code>. Assignment by reference is commonly used with the <code>new</code> operator. The <code>new</code> operator creates an object in memory, and a reference to that location in memory is assigned to a variable.
			<p><strong>Note:</strong> In ActionScript 3.0 all values (including primitive values) are objects, and all assignment is done by reference, but primitive objects have special operators that allow them to behave as if they are assigned by value.</p></p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					A variable, element of an array, or property of an object.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					A value of any type.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Object.html">Object</a></code> &mdash; The assigned value, <code>expression2</code>.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example uses assignment by value to assign the value of 5 to the variable <code>z</code>. 
<div class='listing'><pre>var z:Number = 5;</pre></div>
            The following example uses assignment by value to assign the value "<code>hello</code>" to the variable <code>z</code>:
<div class='listing'><pre>var x:String;
x = "hello";</pre></div>
The following example uses assignment by reference to create the <code>moonsOfJupiter</code> variable, which contains a reference to a newly created Array object. Assignment by value is then used to copy the value "Callisto" to the first element of the array referenced by the variable <code>moonsOfJupiter</code>: 
<div class='listing'><pre>var moonsOfJupiter:Array = new Array();
moonsOfJupiter[0] = "Callisto";
</pre></div>
The following example uses assignment by reference to create a new object and assign a reference to that object to the variable <code>mercury</code>. Assignment by value is then used to assign the value of 3030 to the <code>diameter</code> property of the <code>mercury</code> object:
<div class='listing'><pre>var mercury:Object = new Object();
mercury.diameter = 3030; // in miles
trace(mercury.diameter); // 3030</pre></div>
The following example builds on the previous example by creating a variable named <code>merkur</code> (the German word for <em>mercury</em>) and assigning it the value of <code>mercury</code>. This creates two variables that reference the same object in memory, which means you can use either variable to access the object's properties. You can then change the <code>diameter</code> property to use kilometers instead of miles:
<div class='listing'><pre>var merkur:Object = mercury;
merkur.diameter = 4878;  // in kilometers
trace(mercury.diameter); // 4878</pre></div><p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#equality" target="">== (equality)</a></div></div><a name="attribute_identifier"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">@&nbsp;attribute identifier</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre> myXML.@attributeName </pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Identifies attributes of an XML or XMLList object. For example, <code>myXML.&#064;id</code> 
			identifies attributes named <code>id</code> for the <code>myXML</code> XML object. You can 
			also use the following syntax to access 
			attributes: <code>myXML.attribute("id")</code>, <code>myXML["&#064;id"]</code>, and
			<code>myXML.&#064;["id"]</code>. The syntax <code>myXML.&#064;id</code> is 
			recommended. To return an XMLList object of all attribute names, use <code>&#064;*</code>.
			To return an attribute with a name that matches an ActionScript reserved word, 
			use the <code>attribute()</code> method instead of the <code>&#064;</code> operator.
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">attributeName</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					The name of the attribute.
				</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The first example shows how to use the <code>&#064;</code> (at sign) operator to identify an attribute of an element:
<div class='listing'><pre>var myXML:XML = 
    &lt;item id = "42"&gt;
        &lt;catalogName&gt;Presta tube&lt;/catalogName&gt;
        &lt;price&gt;3.99&lt;/price&gt;
    &lt;/item&gt;;

trace(myXML.&#064;id); // 42</pre></div>

The next example returns all attribute names:

<div class='listing'><pre>var xml:XML =&lt;example id='123' color='blue'/&gt;
 var xml2:XMLList = xml.&#064;*;
 trace(xml2 is XMLList); // true
 trace(xml2.length());  // 2
 for (var i:int = 0; i &lt; xml2.length(); i++)
 { 
    trace(typeof(xml2[i]));    // xml
    trace(xml2[i].nodeKind()); // attribute
    trace(xml2[i].name());     // id and color
 } </pre></div>
 
The next example returns an attribute with a name that matches a reserved word in ActionScript. 
You cannot use the syntax <code>xml.&#064;class</code> (since <code>class</code> is a reserved word in ActionScript). 
You need to use the syntax <code>xml.attribute("class")</code>:
 
<div class='listing'><pre>var xml:XML = &lt;example class='123'/&gt;
trace(xml.attribute("class"));</pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="XML.html" target="">XML class</a><br/><a href="XMLList.html" target="">XMLList class</a><br/><a href="XML.html#attribute()" target="">XML.attribute()</a><br/><a href="XML.html#attributes()" target="">XML.attributes()</a></div></div><a name="bitwise_AND"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">&&nbsp;bitwise AND</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 <b>&</b> expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>
				Converts <code>expression1</code> and <code>expression2</code> to 32-bit unsigned integers, 
				and performs a Boolean AND operation on each bit of the integer parameters. 
				Floating-point numbers are converted to integers by discarding any digits after the decimal point. 
				The result is a new 32-bit integer. 
				<p>A positive integer is converted to an unsigned hexadecimal value with a maximum value of 4294967295 or 0xFFFFFFFF; 
				a value larger than the maximum has its most significant digits discarded when it is converted so the value is still 32-bit. 
				A negative number is converted to an unsigned hexadecimal value using the two's complement notation, with a minimum value of -2147483648 or 0x800000000; 
				a number less than the minimum is converted to two's complement with greater precision before the most significant digits are discarded. </p> 
				<p>The result is interpreted as a 32-bit two's complement number, so the result is an integer in the range -2147483648 to 2147483647. </p>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="int.html">int</a></code> &mdash; The result of the bitwise operation.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example performs a bitwise AND of 13 (binary 1101) and 11 (binary 1011) by comparing the bit representations of the numbers. The resulting integer is composed of a sequence of bits, each of which is set to 1 only if the bits of both operands at the same position are 1. 
<div class='listing'><pre>var insert:Number = 13; 
var update:Number = 11; 
trace(insert &amp; update); // 9 (or 1001 binary) </pre></div> 
The bitwise AND of 13 (binary 1101) and 11 (binary 1011) is 9 because only the first and last positions in both numbers have the number 1. 
<pre>
  1101
&amp; 1011
  ----
  1001
</pre>
<p>The following examples show the behavior of the return value conversion: </p> 
<div class='listing'><pre>trace(0xFFFFFFFF); // 4294967295 
trace(0xFFFFFFFF &amp; 0xFFFFFFFF); // -1 
trace(0xFFFFFFFF &amp; -1); // -1 
trace(4294967295 &amp; -1); // -1 
trace(4294967295 &amp; 4294967295); // -1 </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#bitwise_AND_assignment" target="">&= (bitwise AND assignment)</a><br/><a href="#bitwise_NOT" target="">~ (bitwise NOT)</a><br/><a href="#bitwise_OR" target="">| (bitwise OR)</a><br/><a href="#bitwise_OR_assignment" target="">|= (bitwise OR assignment)</a><br/><a href="#bitwise_XOR" target="">^ (bitwise XOR)</a><br/><a href="#bitwise_XOR_assignment" target="">^= (bitwise XOR assignment)</a></div></div><a name="bitwise_AND_assignment"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">&=&nbsp;bitwise AND assignment</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 <b>&=</b> expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Assigns <code>expression1</code> the value of <code>expression1</code> <code>&amp; expression2</code>. For example, the following two expressions are equivalent: 
<pre>x &amp;= y; 
x = x &amp; y; </pre>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="int.html">int</a></code> &mdash; The value of <code>expression1 &amp; expression2</code>.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example assigns the value 9 to <code>x</code>: 
<div class='listing'><pre>var x:Number = 15; 
var y:Number = 9; 
trace(x &amp;= y); // 9 </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#bitwise_AND" target="">& (bitwise AND)</a><br/><a href="#bitwise_NOT" target="">~ (bitwise NOT)</a><br/><a href="#bitwise_OR" target="">| (bitwise OR)</a><br/><a href="#bitwise_OR_assignment" target="">|= (bitwise OR assignment)</a><br/><a href="#bitwise_XOR" target="">^ (bitwise XOR)</a><br/><a href="#bitwise_XOR_assignment" target="">^= (bitwise XOR assignment)</a></div></div><a name="bitwise_left_shift"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName"><<&nbsp;bitwise left shift</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 <b>&lt;&lt;</b> shiftCount</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Converts <code>expression1</code> and <code>shiftCount</code> to 32-bit integers, and shifts all the bits in <code>expression1</code> to the left by the number of places specified by the integer resulting from the conversion of <code>shiftCount</code>. The bit positions that are emptied as a result of this operation are filled in with 0 and bits shifted off the left end are discarded. Shifting a value left by one position is the equivalent of multiplying it by 2. 
			<p>A floating-point number is converted to an integer by discarding any digits after the decimal point. 
			A positive integer is converted to an unsigned hexadecimal value with a maximum value of 4294967295 or 0xFFFFFFFF; 
			a value larger than the maximum has its most significant digits discarded when it is converted so the value is still 32-bit. 
			A negative number is converted to an unsigned hexadecimal value using the two's complement notation, with a minimum value of -2147483648 or 0x800000000; 
			a number less than the minimum is converted to two's complement with greater precision before the most significant digits are discarded. </p> 
			<p>The result is interpreted as a 32-bit two's complement number, so the result is an integer in the range -2147483648 to 2147483647. </p>
			<p>If the result is a negative integer, a runtime error occurs if you attempt to assign the result to a variable of type <code>uint</code>. Although ActionScript has no "unsigned bitwise left shift" operator, you can achieve the same effect, and avoid the runtime error, by using <code>uint(expression1 &lt;&lt; shiftCount)</code>:</p>
			<div class='listing'><pre>
var num1:uint = 0xFF;
var num2:uint = uint(num1 &lt;&lt; 24); // uint() prevents runtime error</pre></div>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression to be shifted left.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">shiftCount</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that converts to an integer from 0 to 31.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="int.html">int</a></code> &mdash; The result of the bitwise operation.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>In the following example, the integer 1 is shifted 10 bits to the left:
<div class='listing'><pre>x = 1 &lt;&lt; 10</pre></div> The result of the bitwise left shift operation is 1024. This is because 1 decimal equals 1 binary, 1 binary shifted left by 10 is 10000000000 binary, and 10000000000 binary is 1024 decimal:
<pre>
   00000000001 binary 
&lt;&lt;          10 decimal
--------------
   10000000000 binary equals 1024 decimal 
</pre>
<p>In the following example, the integer 7 is shifted 8 bits to the left:</p> 
<div class='listing'><pre>x = 7 &lt;&lt; 8</pre></div> The result of the bitwise left shift operation is 1792. This is because 7 decimal equals 111 binary, 111 binary shifted left by 8 bits is 11100000000 binary, and 11100000000 binary is 1792 decimal:
<pre>
   00000000111 binary 
&lt;&lt;           8 decimal
--------------
   11100000000 binary equals 1792 decimal 
</pre>
<p>The following <code>trace</code> statement shows that the bits have been pushed three positions to the left: </p>
<div class='listing'><pre>// 1 binary == 0001 
// 8 binary == 1000 
trace(1 &lt;&lt; 3); // 8 </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#bitwise_left_shift_and_assignment" target=""><<= (bitwise left shift and assignment)</a><br/><a href="#bitwise_right_shift" target="">>> (bitwise right shift)</a><br/><a href="#bitwise_right_shift_and_assignment" target="">>>= (bitwise right shift and assignment)</a><br/><a href="#bitwise_unsigned_right_shift" target="">>>> (bitwise unsigned right shift)</a><br/><a href="#bitwise_unsigned_right_shift_and_assignment" target="">>>>= (bitwise unsigned right shift and assignment)</a></div></div><a name="bitwise_left_shift_and_assignment"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName"><<=&nbsp;bitwise left shift and assignment</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 <b>&lt;&lt;=</b> expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Performs a bitwise left shift (<code>&lt;&lt;=</code>) operation and stores the contents as a result in <code>expression1</code>. The following two expressions are equivalent: <pre>A &lt;&lt;= B
A = (A &lt;&lt; B)</pre></p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression to be shifted left.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that converts to an integer from 0 to 31.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="int.html">int</a></code> &mdash; The result of the bitwise operation.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example uses the bitwise left shift and assignment (&lt;&lt;=) operator to shift all bits one position to the left: 
<div class='listing'><pre>var x:Number = 4; 
// Shift all bits one slot to the left. 
x &lt;&lt;= 1; 
trace(x); // 8 
// 4 decimal = 0100 binary 
// 8 decimal = 1000 binary </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#bitwise_left_shift" target=""><< (bitwise left shift)</a><br/><a href="#bitwise_right_shift" target="">>> (bitwise right shift)</a><br/><a href="#bitwise_right_shift_and_assignment" target="">>>= (bitwise right shift and assignment)</a></div></div><a name="bitwise_NOT"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">~&nbsp;bitwise NOT</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><b>~</b>expression</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Converts <code>expression</code> to a 32-bit signed integer, and then applies a bitwise one's complement. That is, every bit that is a 0 is set to 1 in the result, and every bit that is a 1 is set to 0 in the result. The result is a signed 32-bit integer.
			This operator is also known as the one's complement operator or the bitwise complement operator. <p>For example, the hexadecimal value 0x7777 is represented as this binary number:</p>
			<pre>0111011101110111</pre> 
			<p>The bitwise negation of that hexadecimal value, ~0x7777, is this binary number:</p>
			<pre>1000100010001000</pre> 
			<p>In hexadecimal, this is 0x8888. Therefore, ~0x7777 is 0x8888.</p> 
			<p>The most common use of bitwise operators is for representing flag bits (Boolean values packed into 1 bit each). </p> 
			<p>A floating-point number is converted to an integer by discarding any digits after the decimal point. 
			A positive integer is converted to an unsigned hexadecimal value with a maximum value of 4294967295 or 0xFFFFFFFF; 
			a value larger than the maximum has its most significant digits discarded when it is converted so the value is still 32-bit. 
			A negative number is converted to an unsigned hexadecimal value using the two's complement notation, with a minimum value of -2147483648 or 0x800000000; 
			a number less than the minimum is converted to two's complement with greater precision before the most significant digits are discarded. </p> 
			<p>The result is interpreted as a 32-bit two's complement number, so the result is an integer in the range -2147483648 to 2147483647. </p>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number to be converted.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="int.html">int</a></code> &mdash; The result of the bitwise operation.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example demonstrates a use of the bitwise NOT (<code>~</code>) operator with flag bits: 
<div class='listing'><pre>var ReadOnlyFlag:int = 0x0001; // defines bit 0 as the read-only flag 
var flags:int = 0; 
trace(flags); 
/* To set the read-only flag in the flags variable, 
   the following code uses the bitwise OR: 
*/
flags |= ReadOnlyFlag; 
trace(flags); 
/* To clear the read-only flag in the flags variable, 
   first construct a mask by using bitwise NOT on ReadOnlyFlag. 
   In the mask, every bit is a 1 except for the read-only flag. 
   Then, use bitwise AND with the mask to clear the read-only flag. 
   The following code constructs the mask and performs the bitwise AND: 
*/ 
flags &amp;= ~ReadOnlyFlag; 
trace(flags); 
// 0 1 0 </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#bitwise_AND" target="">& (bitwise AND)</a><br/><a href="#bitwise_AND_assignment" target="">&= (bitwise AND assignment)</a><br/><a href="#bitwise_OR" target="">| (bitwise OR)</a><br/><a href="#bitwise_OR_assignment" target="">|= (bitwise OR assignment)</a><br/><a href="#bitwise_XOR" target="">^ (bitwise XOR)</a><br/><a href="#bitwise_XOR_assignment" target="">^= (bitwise XOR assignment)</a></div></div><a name="bitwise_OR"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">|&nbsp;bitwise OR</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 | expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Converts <code>expression1</code> and <code>expression2</code> to 32-bit unsigned integers, and places a 1 in each bit position where the corresponding bits of either <code>expression1 </code> or <code>expression2</code> are 1. 
			<p>A floating-point number is converted to an integer by discarding any digits after the decimal point. 
			A positive integer is converted to an unsigned hexadecimal value with a maximum value of 4294967295 or 0xFFFFFFFF; 
			a value larger than the maximum has its most significant digits discarded when it is converted so the value is still 32-bit. 
			A negative number is converted to an unsigned hexadecimal value using the two's complement notation, with a minimum value of -2147483648 or 0x800000000; 
			a number less than the minimum is converted to two's complement with greater precision before the most significant digits are discarded. </p> 
			<p>The result is interpreted as a 32-bit two's complement number, so the result is an integer in the range -2147483648 to 2147483647. </p>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="int.html">int</a></code> &mdash; The result of the bitwise operation.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following is an example of a bitwise OR (<code>|</code>) operation: <div class='listing'><pre>// 15 decimal = 1111 binary 
var a:Number = 15; 
// 9 decimal = 1001 binary 
var b:Number = 9; 
// 1111 | 1001 = 1111 
trace(a | b); // returns 15 decimal (1111 binary) </pre></div> Don't confuse the single <code>|</code> (bitwise OR) with <code>||</code> (logical OR).
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#bitwise_AND" target="">& (bitwise AND)</a><br/><a href="#bitwise_AND_assignment" target="">&= (bitwise AND assignment)</a><br/><a href="#bitwise_NOT" target="">~ (bitwise NOT)</a><br/><a href="#bitwise_OR_assignment" target="">|= (bitwise OR assignment)</a><br/><a href="#bitwise_XOR" target="">^ (bitwise XOR)</a><br/><a href="#bitwise_XOR_assignment" target="">^= (bitwise XOR assignment)</a></div></div><a name="bitwise_OR_assignment"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">|=&nbsp;bitwise OR assignment</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 <b>|=</b> expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Assigns <code>expression1</code> the value of <code>expression1 | expression2</code>. For example, the following two statements are equivalent: 
<pre>x |= y; 
x = x | y; </pre></p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number to be converted.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number to be converted.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="int.html">int</a></code> &mdash; The result of the bitwise operation.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example uses the bitwise OR assignment (<code>|=</code>) operator: <div class='listing'><pre>// 15 decimal = 1111 binary 
var a:Number = 15; 
// 9 decimal = 1001 binary 
var b:Number = 9; 
// 1111 |= 1001 = 1111 
trace(a |= b); // returns 15 decimal (1111 binary) </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#bitwise_AND" target="">& (bitwise AND)</a><br/><a href="#bitwise_AND_assignment" target="">&= (bitwise AND assignment)</a><br/><a href="#bitwise_NOT" target="">~ (bitwise NOT)</a><br/><a href="#bitwise_OR" target="">| (bitwise OR)</a><br/><a href="#bitwise_XOR" target="">^ (bitwise XOR)</a><br/><a href="#bitwise_XOR_assignment" target="">^= (bitwise XOR assignment)</a></div></div><a name="bitwise_right_shift"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">>>&nbsp;bitwise right shift</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression <b>&gt;&gt;</b> shiftCount</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Converts <code>expression</code> and <code>shiftCount</code> to 32-bit integers, and shifts all the bits in <code>expression</code> to the right by the number of places specified by the integer that results from the conversion of <code>shiftCount</code>. Bits that are shifted off the right end are discarded. To preserve the sign of the original expression, the bits on the left are filled in with 0 if the most significant bit (the bit farthest to the left) of <code>expression</code> is 0, and filled in with 1 if the most significant bit is 1. Shifting a value right by one position is the equivalent of dividing by 2 and discarding the remainder. 
			<p>A floating-point number is converted to an integer by discarding any digits after the decimal point. 
			A positive integer is converted to an unsigned hexadecimal value with a maximum value of 4294967295 or 0xFFFFFFFF; 
			a value larger than the maximum has its most significant digits discarded when it is converted so the value is still 32-bit. 
			A negative number is converted to an unsigned hexadecimal value using the two's complement notation, with a minimum value of -2147483648 or 0x800000000; 
			a number less than the minimum is converted to two's complement with greater precision before the most significant digits are discarded. </p> 
			<p>The result is interpreted as a 32-bit two's complement number, so the result is an integer in the range -2147483648 to 2147483647. </p>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression to be shifted right.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">shiftCount</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that converts to an integer from 0 to 31.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="int.html">int</a></code> &mdash; The result of the bitwise operation.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example converts 65535 to a 32-bit integer and shifts it 8 bits to the right, resulting in a decimal value of 255: 
<div class='listing'><pre>var a:Number = 65535 &gt;&gt; 8; 
trace(a); // 255</pre></div> 
This is because 65535 decimal equals 00000000000000001111111111111111 binary (sixteen 0s followed by sixteen 1s); shifting right by 8 bits causes the 8 least significant bits (the bits farthest to the right) to be discarded. Because 65535 is positive, the bit position made available by the shift (the 8 bit positions farthest on the left) are filled in with 0s. The result is 00000000000000000000000011111111 (twenty-four 0s followed by eight 1s) binary, which represents the 32-bit integer 255.
<pre>
    00000000000000001111111111111111 binary (65535 decimal)
&gt;&gt;                                 8 decimal
--------------------
    00000000000000000000000011111111 binary (255 decimal)
</pre>
The following example converts -8 to a 32-bit integer and shifts it 1 bit to the right, resulting in a decimal value of -4:
<div class='listing'><pre>var a:Number = -8 &gt;&gt; 1;
trace(a); // -4</pre></div> 
This is because -8 decimal equals 11111111111111111111111111111000 binary (twenty-nine 1s followed by three 0s); shifting right by one bit causes the least significant bit (the bit farthest to the right) to be discarded. Because -8 is negative, the bit position made available by the shift (the 1 bit position farthest on the left) is filled in with 1. The result is 11111111111111111111111111111100 (thirty 1s followed by two 0s) binary, which represents the 32-bit integer -4.
<pre>
    11111111111111111111111111111000 binary (-8 decimal)
&gt;&gt;                                1 decimal
--------------------
    11111111111111111111111111111100 binary (-4 decimal)
</pre>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#bitwise_right_shift_and_assignment" target="">>>= (bitwise right shift and assignment)</a></div></div><a name="bitwise_right_shift_and_assignment"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">>>=&nbsp;bitwise right shift and assignment</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression <b>&gt;&gt;=</b> shiftCount</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Performs a bitwise right-shift operation and stores the result in <code>expression</code>. 
			<p> The following two statements are equivalent: </p> 
			<pre>A &gt;&gt;= B; 
A = (A &gt;&gt; B);</pre></p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression to be shifted right.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">shiftCount</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that converts to an integer from 0 to 31.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="int.html">int</a></code> &mdash; The result of the bitwise operation.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following code uses the bitwise right shift and assignment (<code>&gt;&gt;=</code>) operator: 
<div class='listing'><pre>function convertToBinary(numberToConvert:Number):String { 
    var result:String = ""; 
    for (var i = 0; i &lt; 32; i++) { 
        // Extract least significant bit using bitwise AND. 
        var lsb:Number = numberToConvert &amp; 1; 
        // Add this bit to the result.
        result = (lsb ? "1" : "0")+result; 
        // Shift numberToConvert right by one bit, to see next bit. 
        numberToConvert &gt;&gt;= 1; 
    } 
    return result; 
} 
trace(convertToBinary(479)); 
// Returns the string 00000000000000000000000111011111. 
// This string is the binary representation of the decimal number 479.</pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#bitwise_right_shift" target="">>> (bitwise right shift)</a></div></div><a name="bitwise_unsigned_right_shift"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">>>>&nbsp;bitwise unsigned right shift</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression <b>&gt;&gt;&gt;</b> shiftCount</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>The same as the bitwise right shift (<code>&gt;&gt;</code>) operator except that it does not preserve the sign of the original expression because the bits on the left are always filled with 0. 
			<p>A floating-point number is converted to an integer by discarding any digits after the decimal point. 
			A positive integer is converted to an unsigned hexadecimal value with a maximum value of 4294967295 or 0xFFFFFFFF; 
			a value larger than the maximum has its most significant digits discarded when it is converted so the value is still 32-bit. 
			A negative number is converted to an unsigned hexadecimal value using the two's complement notation, with a minimum value of -2147483648 or 0x800000000; 
			a number less than the minimum is converted to two's complement with greater precision before the most significant digits are discarded. </p> 
			<p>The result is interpreted as a 32-bit unsigned integer, so the result is an integer in the range 0 to 4294967295. </p>
			<p><strong>Note: </strong> ActionScript has no complementary "bitwise unsigned left shift" operator, but you can achieve the same effect by using <code>uint(expression &lt;&lt; shiftCount)</code>.</p>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression to be shifted right.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">shiftCount</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that converts to an integer between 0 and 31.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="uint.html">uint</a></code> &mdash; The result of the bitwise operation.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example converts -1 to a 32-bit integer and shifts it 1 bit to the right: 
<div class='listing'><pre>var a:Number = -1 &gt;&gt;&gt; 1; 
trace(a); // 2147483647 </pre></div> 
This is because -1 decimal is 11111111111111111111111111111111 binary (thirty-two 1s), and when you shift right (unsigned) by 1 bit, the least significant (rightmost) bit is discarded, and the most significant (leftmost) bit is filled with a 0. The result is 01111111111111111111111111111111 binary, which represents the 32-bit integer 2147483647. 
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#bitwise_right_shift" target="">>> (bitwise right shift)</a><br/><a href="#bitwise_right_shift_and_assignment" target="">>>= (bitwise right shift and assignment)</a></div></div><a name="bitwise_unsigned_right_shift_and_assignment"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">>>>=&nbsp;bitwise unsigned right shift and assignment</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression <b>&gt;&gt;&gt;=</b> shiftCount</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Performs an unsigned bitwise right-shift operation and stores the result in <code>expression</code>. The following two statements are equivalent: 
			<pre>A &gt;&gt;&gt;= B; 
A = (A &gt;&gt;&gt; B); </pre></p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression to be shifted right.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">shiftCount</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that converts to an integer from 0 to 31.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="uint.html">uint</a></code> &mdash; The result of the bitwise operation.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example converts -1 to a 32-bit integer and shifts it 1 bit to the right: 
<div class='listing'><pre>var a:Number = -1;
a &gt;&gt;&gt;= 1; 
trace(a); // 2147483647 </pre></div> 
This is because -1 decimal is 11111111111111111111111111111111 binary (thirty-two 1s), and when you shift right (unsigned) by 1 bit, the least significant (rightmost) bit is discarded, and the most significant (leftmost) bit is filled with a 0. The result is 01111111111111111111111111111111 binary, which represents the 32-bit integer 2147483647. 
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#bitwise_unsigned_right_shift" target="">>>> (bitwise unsigned right shift)</a><br/><a href="#bitwise_right_shift_and_assignment" target="">>>= (bitwise right shift and assignment)</a></div></div><a name="bitwise_XOR"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">^&nbsp;bitwise XOR</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 ^ expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Converts <code>expression1</code> and <code>expression2</code> to 32-bit unsigned integers, and places a 1 in each bit position where the corresponding bits in <code>expression1</code> or <code>expression2</code>, but not both, are 1. 
			<p>A floating-point number is converted to an integer by discarding any digits after the decimal point. 
			A positive integer is converted to an unsigned hexadecimal value with a maximum value of 4294967295 or 0xFFFFFFFF; 
			a value larger than the maximum has its most significant digits discarded when it is converted so the value is still 32-bit. 
			A negative number is converted to an unsigned hexadecimal value using the two's complement notation, with a minimum value of -2147483648 or 0x800000000; 
			a number less than the minimum is converted to two's complement with greater precision before the most significant digits are discarded. </p> 
			<p>The result is interpreted as a 32-bit two's complement number, so the result is an integer in the range -2147483648 to 2147483647. </p>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="int.html">int</a></code> &mdash; The result of the bitwise operation.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example uses the bitwise XOR operator on the decimals 15 and 9, and assigns the result to the variable <code>a</code>: 
<div class='listing'><pre>// 15 decimal = 1111 binary 
// 9 decimal = 1001 binary 
var a:Number = 15 ^ 9; 
trace(a); 
// 1111 ^ 1001 = 0110 
// returns 6 decimal (0110 binary) </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#bitwise_AND" target="">& (bitwise AND)</a><br/><a href="#bitwise_AND_assignment" target="">&= (bitwise AND assignment)</a><br/><a href="#bitwise_NOT" target="">~ (bitwise NOT)</a><br/><a href="#bitwise_OR" target="">| (bitwise OR)</a><br/><a href="#bitwise_OR_assignment" target="">|= (bitwise OR assignment)</a><br/><a href="#bitwise_XOR_assignment" target="">^= (bitwise XOR assignment)</a></div></div><a name="bitwise_XOR_assignment"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">^=&nbsp;bitwise XOR assignment</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 <b>^=</b> expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Assigns <code>expression1</code> the value of <code> expression1 ^ expression2</code>. For example, the following two statements are equivalent: 
			<pre>x ^= y 
x = x ^ y </pre></p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="int.html">int</a></code> &mdash; The result of the bitwise operation.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example shows a bitwise XOR assignment (^=) operation: <div class='listing'><pre>// 15 decimal = 1111 binary 
var a:Number = 15; 
// 9 decimal = 1001 binary 
var b:Number = 9; 
trace(a ^= b); // returns 6 decimal (0110 binary) </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#bitwise_AND" target="">& (bitwise AND)</a><br/><a href="#bitwise_AND_assignment" target="">&= (bitwise AND assignment)</a><br/><a href="#bitwise_NOT" target="">~ (bitwise NOT)</a><br/><a href="#bitwise_OR" target="">| (bitwise OR)</a><br/><a href="#bitwise_OR_assignment" target="">|= (bitwise OR assignment)</a><br/><a href="#bitwise_XOR" target="">^ (bitwise XOR)</a></div></div><a name="block_comment_delimiter"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">/*..*/&nbsp;block comment delimiter</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre>/* comment */</pre> <pre>/* comment</pre> <pre>   comment */</pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Delimits one or more lines of script comments. Characters that appear between the opening delimiter (<code>/*</code>) and the closing delimiter (<code>*/</code>) are interpreted as a comment and ignored by the ActionScript compiler. 
			Use these delimiters to identify comments on multiple successive lines; for single-line comments, use the <code>//</code> delimiter. 
			<p>You will receive an error message if you omit the closing block comment delimiter (<code>*/</code>), or if you attempt to nest comments. 
			After an opening delimiter (<code>/*</code>) is used, the first closing delimiter (<code>*/</code>) ends the comment, regardless of the number of opening delimiters placed before it.</p></p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">comment</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					Any characters.
				</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following script uses block comment delimiters at the beginning of the script: 
<div class='listing'><pre>/* records the X and Y positions of 
the ball and bat movie clips */ 
var ballX:Number = ball_mc._x; 
var ballY:Number = ball_mc._y; 
var batX:Number = bat_mc._x; 
var batY:Number = bat_mc._y; </pre></div> The following attempt to nest comments results in an error message: 
<div class='listing'><pre>/* This is an attempt to nest comments. 
/* But the first closing tag will be paired 
with the first opening tag */ 
and this text will not be interpreted as a comment */ </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#line_comment_delimiter" target="">// (line comment delimiter)</a></div></div><a name="braces_(XML)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">{ }&nbsp;braces (XML)</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre> myXML = &lt;{tagName} {attributeName} = {attributeValue}&gt;{content}&lt;/{tagName}&gt;</pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Evaluates an expression that is used in an XML or XMLList initializer.
			An XML or XMLList initializer is a literal value that is assigned to a variable of type XML or XMLList.
			An expression that is delimited by the XML <code>{</code> and <code>}</code> operators 
			can be used in an XML or XMLList initializer instead of literal names or values.
			An expression can be used in place of <code>tagName</code>, <code>attributeName</code>, <code>attributeValue</code>, and <code>content</code>.

			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">myXML</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An XML or XMLList object.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">tagName</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An expression that evaluates to the name of an XML tag.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">attributeName</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An expression that evaluates to the name of an XML attribute.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">attributeValue</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An expression that evaluates to the value of an XML attribute.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">content</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An expression that evaluates to the contents of an XML tag.
				</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example shows how to use the { and } operators when defining an XML literal:
<div class='listing'><pre>var tagname:String = "item"; 
var attributename:String = "id"; 
var attributevalue:String = "5"; 
var content:String = "Chicken"; 
var x:XML = &lt;{tagname} {attributename}={attributevalue}&gt;{content}&lt;/{tagname}&gt;; 
trace(x.toXMLString()); // &lt;item id="5"&gt;Chicken&lt;/item&gt;</pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="XML.html" target="">XML class</a><br/><a href="XMLList.html" target="">XMLList class</a></div></div><a name="brackets_(XML)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">[ ]&nbsp;brackets (XML)</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre> myXML[expression]</pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Accesses a property or attribute of an XML or XMLList object. The brackets operator allows you to access property names that are not accessible with the dot (<code>.</code>) operator.

			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">myXML</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An XML or XMLList object.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An expression that evaluates to the name of an XML tag or attribute.
				</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example shows how to use the <code>[</code> and <code>]</code> operators to access an XML property that is     not accessible with the dot operator because of the hyphen in the tag name:
<div class='listing'><pre>
var myXML:XML = &lt;a&gt;&lt;foo-bar&gt;44&lt;/foo-bar&gt;&lt;/a&gt;;
trace(myXML["foo-bar"]);
</pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="XML.html" target="">XML class</a><br/><a href="XMLList.html" target="">XMLList class</a></div></div><a name="comma"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">,&nbsp;comma</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>(expression1<b>,</b> expression2[<b>,</b> expressionN... ])</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Evaluates <code>expression1</code>, then <code>expression2</code>, and so on. This operator is primarily used with the <code>for</code> loop statement and is often used with the parentheses <code>()</code> operator.</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An expression to be evaluated.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An expression to be evaluated.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expressionN</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					Any number of additional expressions to be evaluated.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Object.html">Object</a></code> &mdash; The values of the evaluated expressions.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example uses the comma (<code>,</code>) operator in a <code>for</code> loop: 
<div class='listing'><pre>for (i = 0, j = 0; i &lt; 3 &amp;&amp; j &lt; 3; i++, j+=2) { 
    trace("i = " + i + ", j = " + j); 
} 
// output: 
// i = 0, j = 0 
// i = 1, j = 2</pre></div> 
The following example uses the comma operator without the parentheses operator to show that the comma operator is of lower precedence than the assignment (<code>=</code>) operator: 
<div class='listing'><pre>var v:Number = 0; 
v = 4, 5, 6; 
trace(v); // 4 </pre></div> 
The following example uses the comma operator with parentheses and illustrates that the comma operator returns the value of the last expression: 
<div class='listing'><pre>var v:Number = 0; 
v = (4, 5, 6); 
trace(v); // 6 </pre></div> 
The following example uses the comma operator without parentheses and illustrates that the comma operator causes all of the expressions to be evaluated sequentially. The first expression, <code>v + 4</code>, is assigned to the variable <code>v</code> because the assignment (=) operator is of higher precedence than the comma operator. The second expression, <code>z++</code>, is evaluated and <code>z</code> is incremented by one. 
<div class='listing'><pre>var v:Number = 0; 
var z:Number = 0; 
v = v + 4 , z++, v + 6; 
trace(v); // 4 
trace(z); // 1 </pre></div> 
The following example is identical to the previous example except for the addition of parentheses, which changes the order of operations such that the comma operator is evaluated before the assignment (<code>=</code>) operator: 
<div class='listing'><pre>var v:Number = 0; 
var z:Number = 0; 
v = (v + 4, z++, v + 6); 
trace(v); // 6 
trace(z); // 1 </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#parentheses" target="">() (parentheses)</a></div></div><a name="concatenation"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">+&nbsp;concatenation</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 + expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Concatenates (combines) strings. If one expression is a string, all other expressions are converted to strings and concatenated. 
			<p>If both expressions are numbers, this operator behaves as an addition operator.</p></p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="String.html">String</a></code> &mdash; 
					A string to be concatenated.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="String.html">String</a></code> &mdash; 
					A string to be concatenated.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="String.html">String</a></code> &mdash; The concatenated string.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example concatenates two strings. 
<div class='listing'><pre>
var lastName:String = "Cola"; 
var instrument:String = "Drums"; 
trace(lastName + " plays " + instrument); // Cola plays Drums </pre></div>
This example shows that if one expression is a string, all other expressions are converted to strings and concatenated:
<div class='listing'><pre>
trace("Number " + 8 + 0); // Number 80</pre></div>
The following example shows how numeric sums to the right of a string expression are not calculated because they are converted to strings:
<div class='listing'><pre>var a:String = 3 + 10 + "asdf"; 
trace(a); // 13asdf 
var b:String = "asdf" + 3 + 10; 
trace(b); // asdf310 </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#addition" target="">+ (addition)</a></div></div><a name="concatenation_(XMLList)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">+&nbsp;concatenation (XMLList)</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre>expression1 + expression2</td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Concatenates (combines) XML or XMLList values into an XMLList object.
			An XMLList object results only if both operands are XML or XMLList values.
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An XML or XMLList value.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An XML or XMLList value.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="XMLList.html">XMLList</a></code> &mdash; The concatenated XMLList object.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example shows how to use the XMLList (<code>+</code>) (concatenation) operator:
<div class='listing'><pre>var x1:XML = 
        &lt;employee id = "42"&gt;
            &lt;firstName&gt;Joe&lt;/firstName&gt;
            &lt;lastName&gt;Smith&lt;/lastName&gt;
        &lt;/employee&gt;;

var x2:XML = 
        &lt;employee id = "43"&gt;
            &lt;firstName&gt;Susan&lt;/firstName&gt;
            &lt;lastName&gt;Jones&lt;/lastName&gt;
        &lt;/employee&gt;;

var myXMLList:XMLList = x1 + x2;
    
trace(myXMLList.toXMLString()); 
</pre></div>
<p>The <code>trace</code> statement produces the following output:</p>
<pre><code>&lt;employee id = "42"&gt;
    &lt;firstName&gt;Joe&lt;/firstName&gt;
    &lt;lastName&gt;Smith&lt;/lastName&gt;
&lt;/employee&gt;
&lt;employee id = "43"&gt;
    &lt;firstName&gt;Susan&lt;/firstName&gt;
    &lt;lastName&gt;Jones&lt;/lastName&gt;
&lt;/employee&gt;
    
</code></pre>
            
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="XMLList.html" target="">XMLList class</a><br/><a href="package.html#XMLList()" target="">XMLList global function</a></div></div><a name="concatenation_assignment"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">+=&nbsp;concatenation assignment</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 += expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Assigns <code>expression1</code> the value of <code>expression1 + expression2</code>. For example, the following two statements have the same result: <pre>x += y; 
x = x + y;</pre>All the rules of the concatenation (<code>+</code>) operator apply to the concatenation assignment (<code>+=</code>) operator. Note that using concatenation assignment for the <code>text</code> property of a <code>TextField</code> (i.e. <code>someTextField.text += moreText</code> is much less efficient than <code>TextField.appendText()</code>, particularly with a <code>TextField</code> that contains a significant amount of content.
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="String.html">String</a></code> &mdash; 
					A string.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="String.html">String</a></code> &mdash; 
					A string.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Number.html">Number</a></code> &mdash; The result of the concatenation.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>This example uses the <code>+=</code> operator with a string expression:
<div class='listing'><pre>var x1:String = "My name is "; 
x1 += "Gilbert"; 
trace(x1); // My name is Gilbert </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#concatenation" target="">+ (concatenation)</a></div></div><a name="concatenation_assignment_(XMLList)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">+=&nbsp;concatenation assignment (XMLList)</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre>expression1 += expression2</td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Assigns <code>expression1</code>, which is an XMLList object, the value of <code>expression1 + expression2</code>. 
			For example, the following two statements have the same result: 
<pre>x += y; 
x = x + y; </pre>All the rules of the XMLList concatenation (<code>+</code>) operator apply to the XMLList concatenation assignment (<code>+=</code>) operator.
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="XMLList.html">XMLList</a></code> &mdash; 
					The XMLList object to which you are adding a new value.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An XML or XMLList value.
				</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example shows how to use the XMLList concatenation assignment (<code>+=</code>) operator:
<div class='listing'><pre>var x1:XML = &lt;location&gt;Athens&lt;/location&gt;;    
var x2:XML = &lt;location&gt;Paris&lt;/location&gt;;        
myXMLList = x1 + x2;

var x3:XML = &lt;location&gt;Springfield&lt;/location&gt;;
myXMLList += x3;
            
trace(myXMLList.toXMLString());</pre></div>
<p>The <code>trace</code> statement produces the following output:</p>
<pre><code>&lt;location&gt;Athens&lt;/location&gt;
    
&lt;location&gt;Paris&lt;/location&gt;    

&lt;location&gt;Springfield&lt;/location&gt;</code></pre>
            
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="XML.html" target="">XML class</a><br/><a href="XMLList.html" target="">XMLList class</a><br/><a href="package.html#XML()" target="">XML() global function</a><br/><a href="package.html#XMLList()" target="">XMLList() global function</a></div></div><a name="conditional"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">?:&nbsp;conditional</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre>expression1 ? expression2 : expression3</pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Evaluates <code>expression1</code>, and if the value of <code>expression1</code> is <code>true</code>, the result is the value of <code>expression2</code>; otherwise the result is the value of <code>expression3</code>.</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Boolean.html">Boolean</a></code> &mdash; 
					An expression that evaluates to a Boolean value; usually a comparison expression, such as <code>x &lt; 5</code>.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					A value of any type.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression3</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					A value of any type.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="specialTypes.html#*">*</a></code> &mdash; The value of <code>expression2</code> or <code>expression3</code>.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following statement assigns the value of variable <code>x</code> to variable <code>z</code> because the first expression evaluates to <code>true</code>: 
<div class='listing'><pre>var x:Number = 5; 
var y:Number = 10; 
var z = (x &lt; 6) ? x: y; 
trace(z); // returns 5</pre></div> The following example shows a conditional statement written in shorthand: 
<div class='listing'><pre>var timecode:String = (new Date().getHours() &lt; 11) ? "AM" : "PM"; 
trace(timecode); </pre></div> The same conditional statement could also be written in longhand, as shown in the following example: 
<div class='listing'><pre>if (new Date().getHours() &lt; 11) { 
    var timecode:String = "AM"; 
} else { 
    var timecode:String = "PM"; 
}
trace(timecode); </pre></div>
            <p></p></div><a name="decrement"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">--&nbsp;decrement</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre>--expression</pre> <pre>expression--</pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Subtracts 1 from the operand. The operand can be a variable, element in an array, or property of an object. 
			The pre-decrement form of the operator (<code>--expression</code>) subtracts 1 from <code>expression</code> and returns the result. 
			The post-decrement form of the operator (<code>expression--</code>) subtracts 1 from <code>expression</code> and returns the initial value of <code>expression</code> (the value prior to the subtraction).</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or a variable that evaluates to a number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Number.html">Number</a></code> &mdash; The result of the decremented value.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The pre-decrement form of the operator decrements <code>x</code> to 2 (<code>x</code> - <code>1 = 2</code>) and returns the result as <code>y</code>: 
<div class='listing'><pre>var x:Number = 3; 
var y:Number = --x; // y is equal to 2</pre></div> 
The post-decrement form of the operator decrements <code>x</code> to 2 (<code>x</code> - <code>1 = 2</code>) and returns the original value of <code>x</code> as the result <code>y</code>: 
<div class='listing'><pre>var x:Number = 3; 
var y:Number = x--; // y is equal to 3</pre></div> 
The following example loops from 10 to 1, and each iteration of the loop decreases the counter variable <code>i</code> by 1:
<div class='listing'><pre>for (var i = 10; i > 0; i--) { 
    trace(i); 
}</pre></div>
            <p></p></div><a name="delete"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">delete</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre> delete reference</pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Destroys the object property specified by <code>reference</code>; the result is <code>true</code> if the property does not exist after the operation completes, and <code>false</code> otherwise. 
            The <code>delete</code> operator returns <code>true</code> if it is called on a nonexistent property or a dynamic property not defined in a class. 
			<p>The <code>delete</code> operator can fail and return <code>false</code> if the <code>reference</code> parameter cannot be deleted. 
			You cannot delete fixed properties or variables that are declared with the <code>var</code> statement. 
			A fixed property is a variable or method defined in a class definition.	</p>
			<p>The <code>delete</code> operator cannot be used to destroy a property of a class, unless that class is a dynamic class added at runtime. Properties of sealed classes cannot be destroyed using <code>delete</code>. Set the property to <code>null</code> instead.</p>
			<p><strong>Note:</strong> You cannot delete an object, but you can make an object eligible for garbage collection by removing all references to the object. 
			The most common reference to an object is a variable that points to it. You can remove such a reference by setting the variable to <code>null</code>.
			The garbage collector removes any object that has no references.</p>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">reference</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					The name of the property to eliminate.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> &mdash; The value <code>true</code> if the deletion succeeded and <code>false</code> if it failed.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example deletes a property of an object:
<div class='listing'><pre>// create the new object "account" 
var account:Object = new Object(); 
// assign property name to the account 
account.name = "Jon"; 
// delete the property 
delete account.name; 
trace(account.name); // undefined

// delete a nonexistent property
var fooDeleted:Boolean = delete account.foo;
trace(fooDeleted); // true
</pre></div> 
<p>The following example deletes the value of an array element, but the value of the <code>length</code> property is not changed:</p> 
<div class='listing'><pre>
var my_array:Array = new Array(); 
my_array[0] = "abc"; // my_array.length == 1 
my_array[1] = "def"; // my_array.length == 2 
my_array[2] = "ghi"; // my_array.length == 3 
// my_array[2] is deleted, but Array.length is not changed 
delete my_array[2]; 
trace(my_array.length); // 3 
trace(my_array); // abc,def,</pre></div> 

<p>The following example shows how the returned Boolean from <code>delete</code> can be used as a condition for future code execution. Note that if an item has already been deleted, calling <code>delete</code> on the item again will return <code>false</code>.</p> <div class='listing'><pre>
var my_array:Array = [ "abc", "def", "ghi" ];
var deleteWasSuccessful:Boolean

deleteWasSuccessful = delete my_array[0];
if(deleteWasSuccessful) delete my_array[1];
deleteWasSuccessful = delete my_array[0];
if(deleteWasSuccessful) delete my_array[2];

trace(my_array) // outputs: undefined,undefined,ghi</pre></div>
            
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="statements.html#var" target="">var</a></div></div><a name="delete_(XML)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">delete (XML)</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre> delete reference</pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Deletes the XML elements or attributes specified by <code>reference</code>. 
			<p>When used with an XMLList operand, the result of the <code>delete</code> operator is always <code>true</code> because the XMLList operand always refers to a valid (though possibly empty) XMLList object.</p>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">reference</span>:<a href="XMLList.html">XMLList</a></code> &mdash; 
					An XMLList object that specifies the XML elements or attributes to delete.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> &mdash; A value of <code>true</code> if the deletion succeeded, <code>false</code> if it failed.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example shows how to delete an attribute, then 
delete a single element, then delete multiple elements:

<div class='listing'><pre> 
var x1:XML = &lt;x1&gt;
                &lt;a id = "52"&gt;AYY&lt;/a&gt;
                &lt;a&gt;AYY 2 &lt;/a&gt;
                &lt;b&gt;BEE&lt;/b&gt;
                &lt;c&gt;CEE&lt;/c&gt;
            &lt;/x1&gt;;

trace(x1.toXMLString());
trace("___________");

delete x1.a.@id;

trace(x1.toXMLString());
trace("___________");

delete x1.b;

trace(x1.toXMLString());
trace("___________");

delete x1.a;

trace(x1.toXMLString());</pre></div>

<p>The output is as follows:</p>

<pre><code>&lt;x1&gt;
  &lt;a id="52"&gt;AYY&lt;/a&gt;
  &lt;a&gt;AYY 2&lt;/a&gt;
  &lt;b&gt;BEE&lt;/b&gt;
  &lt;c&gt;CEE&lt;/c&gt;
&lt;/x1&gt;
___________
&lt;x1&gt;
  &lt;a&gt;AYY&lt;/a&gt;
  &lt;a&gt;AYY 2&lt;/a&gt;
  &lt;b&gt;BEE&lt;/b&gt;
  &lt;c&gt;CEE&lt;/c&gt;
&lt;/x1&gt;
___________
&lt;x1&gt;
  &lt;a&gt;AYY&lt;/a&gt;
  &lt;a&gt;AYY 2&lt;/a&gt;
  &lt;c&gt;CEE&lt;/c&gt;
&lt;/x1&gt;
___________
&lt;x1&gt;
  &lt;c&gt;CEE&lt;/c&gt;
&lt;/x1&gt;
</code></pre>
            
            <p></p>The following example shows how to delete all contents of an element, including attributes 
and child elements, without deleting the element itself:

<div class='listing'><pre> 
var xml:XML = 
            &lt;order&gt;
                &lt;item id="121"&gt;hamburger&lt;/item&gt;
                &lt;item id="122"&gt;fries&lt;/item&gt;
                &lt;item id="123"&gt;chocolate shake&lt;/item&gt;
            &lt;/order&gt;;
delete xml.item[1].*;
delete xml.item[1].@*;
trace(xml);
</pre></div>
<p>The output for this example is the following:</p>    
<pre><code>&lt;order&gt;
  &lt;tem id="121"&gt;hamburger&lt;/item&gt;
  &lt;item/&gt;
  &lt;item id="123"&gt;chocolate shake&lt;/item&gt;
&lt;/order&gt;</code></pre>
            
            <p></p></div><a name="descendant_accessor"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">..&nbsp;descendant accessor</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre> myXML..childElement1..@attributeName </pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Navigates to descendant elements of an XML or XMLList object, 
			or (combined with the @ operator) finds matching attributes of descendants. 
			The matching elements or attributes need not be direct children of the XML or XMLList object; 
			they can be lower in the tree (for example, grandchildren). The result is an XMLList object, 
			because more than one child element or attribute can match. 
			
			<p>The order of nodes in the XMLList object returned is the result of a depth-first traversal. For example, consider the following:</p>
			
<div class='listing'><pre>var myXML:XML = &lt;a&gt;
			&lt;b&gt;one
				&lt;c&gt; 
					&lt;b&gt;two&lt;/b&gt; 
				&lt;/c&gt; 
			&lt;/b&gt;
			&lt;b&gt;three&lt;/b&gt;
		&lt;/a&gt;;

trace(myXML..b[0].toXMLString());
trace("______________");
trace(myXML..b[1].toXMLString());
trace("______________");
trace(myXML..b[2].toXMLString());</pre></div>

<p>The following output would result:</p>

<pre><code>&lt;b&gt;
  one
  &lt;c&gt;
    &lt;b&gt;two&lt;/b&gt;
  &lt;/c&gt;
&lt;/b&gt;
______________
&lt;b&gt;two&lt;/b&gt;
______________
&lt;b&gt;three&lt;/b&gt;
</code></pre>

<p>To return descendants with names that match ActionScript reserved words, use the 
<code>XML.descendants()</code> method instead of the descendant (..) operator, as the 
following example shows: </p>

<div class='listing'><pre>
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")); 
 </pre></div>
			
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">myXML</span>:<a href="Object.html">Object</a></code> &mdash; 
					The XML or XMLList object.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">childElement1_or_attributeName</span></code> &mdash; 
					The name of an XML property or the name of an attribute.
				</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example shows how to use the descendant accessor (..) operator to return descendant elements of an XML object and to return an attribute of an element:
<div class='listing'><pre>var myXML:XML = 
    &lt;employees&gt;
        &lt;employee id = "42"&gt;
            &lt;firstName&gt;Billy&lt;/firstName&gt;
            &lt;lastName&gt;Einstein&lt;/lastName&gt;
        &lt;/employee&gt;
        &lt;employee id = "43"&gt;
            &lt;firstName&gt;Sally&lt;/firstName&gt;
            &lt;lastName&gt;Shostakovich&lt;/lastName&gt;
        &lt;/employee&gt;
    &lt;/employees&gt;
    
trace(myXML..firstName); 
    // &lt;firstName&gt;Billy&lt;/firstName&gt;
    // &lt;firstName&gt;Sally&lt;/firstName&gt;
                
trace(myXML..@id); //4243</pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="XML.html" target="">XML class</a><br/><a href="XMLList.html" target="">XMLList class</a><br/><a href="XML.html#descendants()" target="">XML.descendants()</a></div></div><a name="division"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">/&nbsp;division</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 / expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Divides <code>expression1</code> by <code>expression2</code>. The result of the division operation is a double-precision floating-point number.</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or a variable that evaluates to a number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Number.html">Number</a></code> &mdash; The floating-point result of the operation.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example shows that the results of dividing by 0 differs if the dividend is positive, negative or 0.
<div class='listing'><pre>trace(3/0);   // Infinity
trace(-3/0);  // -Infinity
trace(0/0);   // NaN</pre></div> 
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#modulo" target="">% (modulo)</a></div></div><a name="division_assignment"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">/=&nbsp;division assignment</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 /= expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Assigns <code>expression1</code> the value of <code> expression1 / expression2</code>. For example, the following two statements are equivalent: 
<pre>x /= y; 
x = x / y;</pre></p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or a variable that evaluates to a number.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or a variable that evaluates to a number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Number.html">Number</a></code> &mdash; A number.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following code shows the division assignment (<code>/=</code>) operator used with variables and numbers: 
<div class='listing'><pre>var a:Number = 10; 
var b:Number = 2; 
a /= b; trace(a); // 5 </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#division" target="">/ (division)</a></div></div><a name="dot"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">.&nbsp;dot</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre>object.property_or_method</pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Accesses class variables and methods, gets and sets object properties, and delimits imported packages or classes.</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">object</span>:<a href="Object.html">Object</a></code> &mdash; 
					An instance of a class. The object can be an instance of any of the built-in ActionScript classes or a class you define. This operand is always to the left of the dot (.) operator.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">property_or_method</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					The name of a property or method associated with an object. All the valid methods and properties for the built-in classes are listed in the method and property summary tables for that class. This operand is always to the right of the dot (.) operator.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="specialTypes.html#*">*</a></code> &mdash; The variable, method, or property named on the right side of the dot.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example uses the dot operator as a delimiter when importing the Timer class.
<div class='listing'><pre>import flash.utils.Timer;</pre></div> 
The following example creates a generic object and uses the dot operator to add a new property.
<div class='listing'><pre>var obj:Object = new Object();
obj.propertyA = "hello";
trace(obj.propertyA);  // hello</pre></div> 
            
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#dot_(XML)" target="">dot (XML) operator</a></div></div><a name="dot_(XML)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">.&nbsp;dot (XML)</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre>myXML.childElement
myXML.@attributeName </pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Navigates to child elements 
			of an XML or XMLList object, or (combined with the @ operator) returns attributes 
			of an XML or XMLList object. The object returned is an XMLList, because more than 
			one child element or attribute can match. 
			<p>To return elements with names that match 
			ActionScript reserved words, use the <code>XML.elements()</code> method or the <code>XML.descendants()</code> method instead of the 
			XML dot (.) operator, as the following example shows: </p>
			
<div class='listing'><pre>
var xml:XML = 
	&lt;student id="206">
		&lt;class name="Trigonometry" /&gt;
		&lt;class name="Spanish 2" /&gt;
	&lt;/student&gt;;
trace(xml.elements("class"));
trace(xml.descendants("class")); 
</pre></div>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">myXML</span>:<a href="Object.html">Object</a></code> &mdash; 
					The XML or XMLList object.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">childElement</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					The name of an XML property.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">attributeName</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					The name of an attribute.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="XMLList.html">XMLList</a></code> &mdash; The XMLList specified.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example shows how to use the dot (.) operator to return to a child element of an XML object and to return an attribute of an element:
<div class='listing'><pre>var myXML:XML = 
    &lt;employee id = "42"&gt;
        &lt;firstName&gt;Billy&lt;/firstName&gt;
        &lt;lastName&gt;Einstein&lt;/lastName&gt;
    &lt;/employee&gt;;

trace(myXML.firstName); // Billy
trace(myXML.@id);       // 42
</pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="XML.html" target="">XML class</a><br/><a href="XMLList.html" target="">XMLList class</a><br/><a href="XML.html#descendants()" target="">XML.descendants()</a><br/><a href="XML.html#elements()" target="">XML.elements()</a></div></div><a name="equality"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">==&nbsp;equality</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 <b>==</b> expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Tests two expressions for equality. The result is <code>true</code> if the expressions are equal. 
			<p>If the data types of the two operands match, the definition of equal depends on the data type of the operands:</p> 
			<ul> 
			  <li>Values of type int, uint, and Boolean are considered equal if they have the same value.</li> 
			  <li>Numbers with matching values are considered equal, unless they are both <code>NaN</code>.</li>
			  <li>If the value of both operands is <code>null</code> or <code>undefined</code>, they are considered equal.</li>
			  <li>String expressions are equal if they have the same number of characters and the characters are identical.</li> 
			  <li>For XML objects:
			    <ul>
				<li>If one operand is a text or attribute node and the other has simple content, both operands are converted to strings with the <code>toString()</code> method and are considered equal if the resulting strings match. </li>
				<li>Otherwise, objects are considered equal only if the qualified name, attributes, and child properties for both objects match.</li>
			    </ul>
			  </li>
			  <li>XMLList objects are considered equal if they have the same number of properties and both the order and values of the properties match.</li>
			  <li>For Namespace objects, values are considered equal if the <code>uri</code> properties of both objects match.</li>
			  <li>For QName objects, values are considered equal if the <code>uri</code> properties of both objects match and the <code>localName</code> properties of both objects match.</li>
			  <li>Variables representing objects, arrays, and functions are compared by reference. Two such variables are equal if they refer to the same object, array, or function. Two separate arrays are never considered equal, even if they have the same number of elements.</li> 
			</ul> 


			If the data types of the operands do not match, the result is <code>false</code> except in the following circumstances:
			  <ul>
				<li>The operands' values are <code>undefined</code> and <code>null</code>, in which case the result is <code>true</code>.</li>
				<li>Automatic data type conversion converts the data types of String, Boolean, int, uint, and Number values to compatible types and the converted values are equal, in which case operands are considered equal.</li>
				<li>One operand is of type XML with simple content (<code>hasSimpleContent() == true</code>), and after both operands are converted to strings with the <code>toString()</code> method, the resulting strings match.</li>
				<li>One operand is of type XMLList, and either of the following conditions is true:
					<ul>
						<li>The <code>length</code> property of the XMLList object is 0, and the other object is <code>undefined</code>.</li>
						<li>The <code>length</code> property of the XMLList object is 1, and one element of the XMLList object matches the other operand.</li>
					</ul>
				</li>
			  </ul>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Object.html">Object</a></code> &mdash; 
					A number, string, Boolean value, variable, object, array, or expression.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Object.html">Object</a></code> &mdash; 
					A number, string, Boolean value, variable, object, array, or expression.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> &mdash; A value of <code>true</code> if the expressions are equal, and <code>false</code> otherwise.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example uses the equality (<code>==</code>) operator with an <code>if</code> statement:
<div class='listing'><pre>var a:String = "David"
var b:String = "David"; 
if (a == b) { 
    trace("David is David"); 
} </pre></div> 
The following examples show how the equality operator does automatic type conversion when comparing by value. String values are converted to numbers: 
<div class='listing'><pre>var a:Number = 5; 
var b:String = "5"; 
trace(a == b); // true</pre></div>
Boolean values are converted to numbers, where <code>true</code> is converted to 1 and <code>false</code> is converted to 0:
<div class='listing'><pre>var c:Number = 1; 
var d:Boolean = true; 
trace(c == d); // true
var e:Number = 0; 
var f:Boolean = false; 
trace(e == f); // true</pre></div>
However, string values are not converted to Boolean values, so the following returns <code>false</code>:
<div class='listing'><pre>var g:String = "true";
var h:Boolean = true;
trace(g == h); // false</pre></div>
The following examples show comparison by reference. The first example compares two arrays with identical length and elements. 
The equality operator returns <code>false</code> for these two arrays. 
Although the arrays appear equal, comparison by reference requires that both <code>firstArray</code> and <code>secondArray</code> refer to the same array. 
The second example creates the <code>thirdArray</code> variable, which points to the same array as <code>firstArray</code>. 
The equality operator returns true for these two arrays because the two variables refer to the same array. 
<div class='listing'><pre>var firstArray:Array = new Array("one", "two", "three"); 
var secondArray:Array = new Array("one", "two", "three"); 
trace(firstArray == secondArray); // false 
/* Arrays are only considered equal 
if the variables refer to the same array. */
var thirdArray:Array = firstArray; 
trace(firstArray == thirdArray); // true </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#inequality" target="">!= (inequality)</a><br/><a href="#logical_AND" target="">&& (logical AND)</a><br/><a href="#logical_NOT" target="">! (logical NOT)</a><br/><a href="#logical_OR" target="">|| (logical OR)</a><br/><a href="#strict_equality" target="">=== (strict equality)</a><br/><a href="#strict_inequality" target="">!== (strict inequality)</a></div></div><a name="greater_than"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">>&nbsp;greater than</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 > expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Compares two expressions and determines whether <code>expression1</code> 
			is greater than <code>expression2</code>; if it is, the result is <code>true</code>. 
			If <code>expression1</code> is less than or equal to <code>expression2</code>, the result is <code>false</code>. 
			<p>If both operands are of type String, the operands are compared using alphabetical 
			order; all capital letters come before lowercase letters. Otherwise, operands are first 
			converted to numbers, then compared.</p>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Object.html">Object</a></code> &mdash; 
					A string, integer, or floating-point number.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Object.html">Object</a></code> &mdash; 
					A string, integer, or floating-point number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> &mdash; A value of <code>true</code> if <code>expression1</code> is greater than <code>expression2</code>; <code>false</code> otherwise.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example shows that strings are compared alphabetically, with capital letters before lowercase letters:
<div class='listing'><pre>
var a:String = "first";
var b:String = "First";
trace(a > b); // true
</pre></div>
The following example shows how String and Boolean values are converted to numbers:
<div class='listing'><pre>
var c:Number = 5;
var d:String = "4";
trace(c > d); // true

var e: Number = 2;
var f:Boolean = true;
trace(e > f); // true</pre></div>


            
            <p></p></div><a name="greater_than_or_equal_to"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">>=&nbsp;greater than or equal to</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 >= expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Compares two expressions and determines whether <code>expression1</code> is greater than or equal to <code>expression2</code> (<code>true</code>) or <code>expression1</code> is less than <code>expression2</code> (<code>false</code>).</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Object.html">Object</a></code> &mdash; 
					A string, integer, or floating-point number.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Object.html">Object</a></code> &mdash; 
					A string, integer, or floating-point number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> &mdash; A value of <code>true</code> if <code>expression1</code> is greater than or equal to <code>expression2</code>; <code>false</code> otherwise.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>In the following example, the greater than or equal to (&gt;=) operator is used to determine whether the current hour is greater than or equal to 12: 
<div class='listing'><pre>if (new Date().getHours() >= 12) { 
    trace("good afternoon"); 
} else { 
    trace("good morning"); 
}</pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#greater_than" target="">> (greater than)</a></div></div><a name="in"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">in</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 <b>in</b> expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Evaluates whether a property is part of a specific object. 
			To use the <code>in</code> operator, specify a property name as the first operand
			and an object as the second operand. If the object you specify contains such a 
			property, the result is <code>true</code>; otherwise the result is <code>false</code>.
			<p>If the specified object is an Array object, you can use the <code>in</code> 
			operator to check whether a particular index number is valid. If you pass an 
			integer as the first operand, the result is <code>true</code> if the index is 
			within the valid range of index numbers, and <code>false</code> otherwise.</p>
			</p><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> &mdash; A value of <code>true</code> if <code>expression1</code> is a property of the object represented by <code>expression2</code>, and <code>false</code> otherwise.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>
                The following example uses the <code>in</code> operator to show that <code>PI</code> is a property of the Math object, but that <code>myProperty</code> is not.
<div class='listing'><pre>
trace("PI" in Math);         // true
trace("myProperty" in Math); // false
</pre></div>
<p>The following example uses the <code>in</code> operator to show that the numbers 0, 1, and 2 are valid index numbers in the <code>myArray</code> object, but that the number 3 is not.</p>
<div class='listing'><pre>
public var myArray:Array = ["zero", "one", "two"];
trace(0 in myArray); // true
trace(1 in myArray); // true
trace(2 in myArray); // true
trace(3 in myArray); // false
</pre></div>
                
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#instanceof" target="">instanceof</a></div></div><a name="increment"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">++&nbsp;increment</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre>++expression</pre> <pre> expression++</pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Adds 1 to an expression. 
			The expression can be a variable, an element in an array, or a property of an 
			object. The pre-increment form of the operator (<code>++expression</code>) adds 1 to <code>
			expression</code> and returns the result. The post-increment form of the operator 
			(<code>expression++</code>) adds 1 to <code>expression</code> and returns the 
			initial value of <code>expression</code> (the value prior to the addition). 
			
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or a variable that evaluates to a number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Number.html">Number</a></code> &mdash; The result of the increment.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>
The following example uses ++ as a pre-increment operator in a <code>while</code> loop to
show that the value added to the array is the value that has been incremented: 
<div class='listing'><pre>
var preInc:Array = new Array(); 
var i:int = 0; 
while (i &lt; 10) { 
    preInc.push(++i); 
} 
trace(preInc); // 1,2,3,4,5,6,7,8,9,10 
</pre></div> 
The following example uses ++ as a post-increment operator in a <code>while</code>loop to
show that the value added to the array is the initial value: 
<div class='listing'><pre> 
var postInc:Array = new Array(); 
var i:int = 0; 
while (i &lt; 10) { 
   postInc.push(i++); 
} 
trace(postInc); // 0,1,2,3,4,5,6,7,8,9 
</pre></div> 
The following example uses ++ as a post-increment operator to make a <code>while</code>loop run five times: 
<div class='listing'><pre>var i:int = 0; 
while (i++ &lt; 5) { 
    trace("this is execution " + i); 
} 
/* output: 
   this is execution 1 
   this is execution 2 
   this is execution 3 
   this is execution 4 
   this is execution 5 
*/</pre></div> 
            <p></p></div><a name="inequality"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">!=&nbsp;inequality</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 <b>!=</b> expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Tests for the exact opposite of the equality (<code>==</code>) operator. If <code>expression1</code> is equal to <code>expression2</code>, the result is <code>false</code>. As with the equality (<code>==</code>) operator, the definition of equal depends on the data types being compared. 
			<p>If the data types of the two operands match, the definition of equal depends on the data type of the operands:</p> 
			<ul> 
			  <li>Values of type int, uint, and Boolean are considered equal if they have the same value.</li> 
			  <li>Numbers with matching values are considered equal, unless they are both <code>NaN</code>.</li>
			  <li>If the value of both operands is <code>null</code> or <code>undefined</code>, they are considered equal.</li>
			  <li>String expressions are equal if they have the same number of characters and the characters are identical.</li> 
			  <li>For XML objects:
			    <ul>
				<li>If one operand is a text or attribute node and the other has simple content, both operands are converted to strings with the <code>toString()</code> method and are considered equal if the resulting strings match. </li>
				<li>Otherwise, objects are considered equal only if the qualified name, attributes, and child properties for both objects match.</li>
			    </ul>
			  </li>
			  <li>XMLList objects are considered equal if they have the same number of properties and both the order and values of the properties match.</li>
			  <li>For Namespace objects, values are considered equal if the <code>uri</code> properties of both objects match.</li>
			  <li>For QName objects, values are considered equal if the <code>uri</code> properties of both objects match and the <code>localName</code> properties of both objects match.</li>
			  <li>Variables representing objects, arrays, and functions are compared by reference. Two such variables are equal if they refer to the same object, array, or function. Two separate arrays are never considered equal, even if they have the same number of elements.</li> 
			</ul> 


			If the data types of the operands do not match, the inequality operator (<code>!=</code>) returns <code>true</code> except in the following circumstances:
			  <ul>
				<li>The operands' values are <code>undefined</code> and <code>null</code>, in which case the result is <code>true</code>.</li>
				<li>Automatic data type conversion converts the data types of String, Boolean, int, uint, and Number values to compatible types and the converted values are equal, in which case operands are considered equal.</li>
				<li>One operand is of type XML with simple content (<code>hasSimpleContent() == true</code>), and after both operands are converted to strings with the <code>toString()</code> method the resulting strings match.</li>
				<li>One operand is of type XMLList, and either of the following conditions is true:
					<ul>
						<li>The <code>length</code> property of the XMLList object is 0, and the other object is <code>undefined</code>.</li>
						<li>The <code>length</code> property of the XMLList object is 1, and one element of the XMLList object matches the other operand.</li>
					</ul>
				</li>
			  </ul>

			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Object.html">Object</a></code> &mdash; 
					A number, string, Boolean value, variable, object, array, or function.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Object.html">Object</a></code> &mdash; 
					A number, string, Boolean value, variable, object, array, or function.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> &mdash; A value of <code>true</code> if the expressions are not equal, and <code>false</code> otherwise.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example illustrates the result of the inequality (<code>!=</code>) operator: 
<div class='listing'><pre>trace(5 != 8); // true 
trace(5 != 5); // false </pre></div> 
The following example illustrates the use of the inequality (<code>!=</code>) operator in an <code>if</code> statement: 
<div class='listing'><pre>var a:String = "David";
var b:String = "Fool";
if (a != b) { 
    trace("David is not a fool"); 
}</pre></div> 
The following example illustrates comparison by reference with two functions: 
<div class='listing'><pre>var a:Function = function() { trace("foo"); }; 
var b:Function = function() { trace("foo"); }; 
a(); // foo 
b(); // foo 
trace(a != b); // true 
a = b; 
a(); // foo 
b(); // foo 
trace(a != b); // false</pre></div> 
The following example illustrates comparison by reference with two arrays: 
<div class='listing'><pre>var a:Array = [ 1, 2, 3 ]; 
var b:Array = [ 1, 2, 3 ]; 
trace(a);      // 1,2,3 
trace(b);      // 1,2,3 
trace(a != b); // true 
a = b; 
trace(a);      // 1,2,3 
trace(b);      // 1,2,3 
trace(a != b); // false</pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#equality" target="">== (equality)</a><br/><a href="#logical_AND" target="">&& (logical AND)</a><br/><a href="#logical_NOT" target="">! (logical NOT)</a><br/><a href="#logical_OR" target="">|| (logical OR)</a><br/><a href="#strict_equality" target="">=== (strict equality)</a><br/><a href="#strict_inequality" target="">!== (strict inequality)</a></div></div><a name="instanceof"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">instanceof</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression instanceof function</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Evaluates whether an expression's prototype chain includes the prototype object for <code>function</code>. 
			The <code>instanceof</code> operator is included for backward compatibility with ECMAScript edition 3, 
			and may be useful for advanced programmers who choose to use prototype-based inheritance with constructor functions instead of classes. 
			<p>To check whether an object is a member of a specific data type, use the <code>is</code> operator.</p>
			<p>When used with classes, the <code>instanceof</code> operator is similar to the <code>is</code> operator because a class's prototype chain includes all of its superclasses.
			Interfaces, however, are not included on prototype chains, so the <code>instanceof</code> operator always results in <code>false</code> when used with interfaces,
			whereas the <code>is</code> operator results in <code>true</code> if an object belongs to a class that implements the specified interface.</p>
			<p><strong>Note:</strong> The ActionScript <code>is</code> operator is the equivalent of the Java <code>instanceof</code> operator.</p></p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression</span>:<a href="Object.html">Object</a></code> &mdash; 
					The object that contains the prototype chain to evaluate.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">function</span>:<a href="Object.html">Object</a></code> &mdash; 
					A function object (or class).
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> &mdash; Returns <code>true</code> if the prototype chain of <code>expression</code> includes the prototype object for <code>function</code>, and <code>false</code> otherwise.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>
                The following example creates an instance of the Sprite class named <code>mySprite</code> and uses the <code>instanceof</code> operator to test whether 
                the prototype chain of <code>mySprite</code> includes the prototype objects of the Sprite and DisplayObject classes. 
                The result is <code>true</code> with the Sprite class and the DisplayObject class because the prototype objects for Sprite and DisplayObject are on the prototype chain of <code>mySprite</code>.
<div class='listing'><pre>
var mySprite:Sprite = new Sprite();
trace(mySprite instanceof Sprite);        // true
trace(mySprite instanceof DisplayObject); // true
</pre></div>
The following example uses the IBitmapDrawable interface to show that the <code>instanceof</code> operator does not work with interfaces.
The <code>is</code> operator results in <code>true</code> because the DisplayObject class, which is a superclass of the Sprite class, implements the IBitmapDrawable interface.
<div class='listing'><pre>
var mySprite:Sprite = new Sprite();
trace(mySprite instanceof IBitmapDrawable); // false
trace(mySprite is IBitmapDrawable);         // true
</pre></div>
                
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#is" target="">is</a><br/><a href="Object.html#prototype" target="">prototype</a></div></div><a name="is"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">is</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 is expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Evaluates whether an object is compatible with a specific data type, class, or interface. 
			Use the <code>is</code> operator instead of the <code>instanceof</code> operator for type comparisons.
			You can also use the <code>is</code> operator to check whether an object implements an interface. 
			</p><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> &mdash; A value of <code>true</code> if <code>expression1</code> is compatible with the data type, class, or interface specified in <code>expression2</code>, and <code>false</code> otherwise.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>
                The following example creates an instance of the Sprite class named <code>mySprite</code> and uses the <code>is</code> operator to test whether <code>mySprite</code> is an instance of the Sprite and DisplayObject classes, and whether it implements the IEventDispatcher interface.
<div class='listing'><pre>
import flash.display.*;
import flash.events.IEventDispatcher;

var mySprite:Sprite = new Sprite();
trace(mySprite is Sprite);           // true
trace(mySprite is DisplayObject);    // true
trace(mySprite is IEventDispatcher); // true
</pre></div>
                
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#as" target="">as</a><br/><a href="#instanceof" target="">instanceof</a></div></div><a name="less_than"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName"><&nbsp;less than</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 <b><</b> expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Compares two expressions and determines whether <code>expression1</code> 
			is less than <code>expression2</code>; if so, the result is <code>true</code>. 
			If <code>expression1</code> is greater than or equal to <code>expression2</code>, the result is <code>false</code>. 
			<p>If both operands are of type String, the operands are compared using alphabetical order; 
			all capital letters come before lowercase letters. 
			Otherwise, operands are first converted to numbers, then compared.</p>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Object.html">Object</a></code> &mdash; 
					A string, integer, or floating-point number.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Object.html">Object</a></code> &mdash; 
					A string, integer, or floating-point number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> &mdash; A value of <code>true</code> if <code>expression1</code> is less than <code>expression2</code>; <code>false</code> otherwise.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following examples show <code>true</code> and <code>false</code> results for both numeric and string comparisons: 
<div class='listing'><pre>trace(5 &lt; 10); // true 
trace(2 &lt; 2);            // false 
trace(10 &lt; 3);           // false 
trace("Allen" &lt; "Jack"); // true 
trace("Jack" &lt; "Allen"); // false 
trace("11" &lt; "3");       // true 
trace("11" &lt; 3);         // false (numeric comparison) 
trace("C" &lt; "abc");      // true 
trace("A" &lt; "a");        // true </pre></div>
            <p></p></div><a name="less_than_or_equal_to"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName"><=&nbsp;less than or equal to</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 <b><=</b> expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Compares two expressions and determines whether <code>expression1</code> is less than or equal to <code>expression2</code>; 
			if it is, the result is <code>true</code>. If <code> expression1</code> is greater than <code>expression2</code>, the result is <code>false</code>. 
			<p>If both operands are of type String, the operands are compared using alphabetical order; all capital letters come before lowercase letters. Otherwise, operands are first converted to numbers, then compared.</p>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Object.html">Object</a></code> &mdash; 
					A string, integer, or floating-point number.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Object.html">Object</a></code> &mdash; 
					A string, integer, or floating-point number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> &mdash; A value of <code>true</code> if <code>expression1</code> is less than or equal to <code>expression2</code>; <code>false</code> otherwise.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following examples show <code>true</code> and <code>false</code> results for both numeric and string comparisons: 
<div class='listing'><pre>trace(5 &lt;= 10); // true 
trace(2 &lt;= 2);            // true 
trace(10 &lt;= 3);           // false 
trace("Allen" &lt;= "Jack"); // true 
trace("Jack" &lt;= "Allen"); // false 
trace("11" &lt;= "3");       // true 
trace("11" &lt;= 3);         // false (numeric comparison) 
trace("C" &lt;= "abc");      // true 
trace("A" &lt;= "a");        // true </pre></div>
            <p></p></div><a name="line_comment_delimiter"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">//&nbsp;line comment delimiter</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><b>//</b> comment</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Indicates the beginning of a script comment. Characters that appear between the comment delimiter (<code>//</code>) and the end-of-line character are interpreted as a comment and are ignored.
			Use this delimiter for single-line comments; for comments on multiple successive lines, use the <code>/*</code> and <code>*/</code> delimiters. 

			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">comment</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					Any characters.
				</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example shows a single-line comment: 
<div class='listing'><pre>// Any text following a line comment delimiter is ignored during compilation</pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#block_comment_delimiter" target="">/*..*/ (block comment delimiter)</a></div></div><a name="logical_AND"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">&&&nbsp;logical AND</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 <b>&amp;&amp;</b> expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Returns <code>expression1</code> if it is <code>false</code> or can be converted to <code>false</code>, and <code>expression2</code> otherwise.
			Examples of values that can be converted to <code>false</code> are 0, <code>NaN</code>, <code>null</code>, and <code>undefined</code>.
			If you use a function call as <code>expression2</code>, the function is not called if <code>expression1</code> evaluates to <code>false</code>. 
			<p>If both operands are of type Boolean, the result is <code>true</code> only if both operands are <code>true</code>, as 
			shown in the following table:</p> 
			<table class="innertable"> 
			  <tr> 
			    <th rowspan="1" colspan="1">Expression </th> 
			    <th rowspan="1" colspan="1">Evaluates </th> 
			  </tr> 
			  <tr> 
			    <td rowspan="1" colspan="1"><code>true &amp;&amp; true</code> </td> 
			    <td rowspan="1" colspan="1"><code>true</code></td> 
			  </tr> 
			  <tr> 
			    <td rowspan="1" colspan="1"><code>true &amp;&amp; false</code> </td> 
			    <td rowspan="1" colspan="1"><code>false</code></td> 
			  </tr> 
			  <tr> 
			    <td rowspan="1" colspan="1"><code>false &amp;&amp; false</code> </td> 
			    <td rowspan="1" colspan="1"><code>false</code></td> 
			  </tr> 
			  <tr> 
			    <td rowspan="1" colspan="1"><code>false &amp;&amp; true</code> </td> 
			    <td rowspan="1" colspan="1"><code>false</code></td> 
			  </tr> 
			</table>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					A value or expression of any type.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					A value of expression of any type.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="specialTypes.html#*">*</a></code> &mdash; A Boolean value if both operands are of type Boolean. Otherwise, the result is the value of either expression.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example uses the logical AND (<code>&amp;&amp;</code>) operator to perform a test to determine if a player has won the game. The <code>turns</code> variable and the <code>score</code> variable are updated when a player takes a turn or scores points during the game. The script outputs "You Win the Game!" when the player's score reaches 75 or higher in three or fewer turns.
<div class='listing'><pre>var turns:Number = 2; 
var score:Number = 77; 
if ((turns &lt;= 3) &amp;&amp; (score &gt;= 75)) { 
    trace("You Win the Game!"); 
} else { 
    trace("Try Again!"); 
} </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#equality" target="">== (equality)</a><br/><a href="#inequality" target="">!= (inequality)</a><br/><a href="#logical_NOT" target="">! (logical NOT)</a><br/><a href="#logical_OR" target="">|| (logical OR)</a><br/><a href="#logical_OR_assignment" target="">||= (logical OR assignment)</a><br/><a href="#logical_AND_assignment" target="">&&= (logical AND assignment)</a><br/><a href="#strict_equality" target="">=== (strict equality)</a><br/><a href="#strict_inequality" target="">!== (strict inequality)</a></div></div><a name="logical_AND_assignment"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">&&=&nbsp;logical AND assignment</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 &amp;&amp;= expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Assigns <code>expression1</code> the value of <code>expression1 &amp;&amp; expression2</code>. For example, the following two statements are equivalent: 
<pre>x &amp;&amp;= y; 
x = x &amp;&amp; y; </pre>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					A value of any type.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					A value of any type.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="specialTypes.html#*">*</a></code> &mdash; A Boolean value if both operands are members of the Boolean data type. Otherwise, the result will be the value of either of the two expressions.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example modifies a variable named <code>myTag</code> if the variable does not evaluate to <code>false</code>. This technique takes advantage of the fact that the logical AND (<code>&amp;&amp;</code>) operator returns the value of <code>expression1</code> if <code>expression1</code> evaluates to <code>false</code> and otherwise returns the value of <code>expression2</code>.
            If <code>myTag</code> already contains a value that evaluates to <code>true</code>, <code>myVar</code> is modified to resemble an XML tag. However, if <code>myVar</code> contains a value that evaluates to <code>false</code>, such as the values <code>null</code>, <code>""</code>(empty string), and <code>undefined</code> among others, <code>myVar</code> is unchanged.
<div class='listing'><pre>var myVar:String = 'tag';
myVar &amp;&amp;= "&lt;" + myVar + "/&gt;";
trace (myVar); // output: &lt;tag/&gt;</pre></div>
            The same effect can be achieved with an <code>if</code> statement, as shown in the following example:
<div class='listing'><pre>var myVar:String = 'tag';
if (myVar != '') {
  myVar = "&lt;" + myVar + "/&gt;";
}
trace (myVar); // output: &lt;tag/&gt;</pre></div>
            The advantage of using an <code>if</code> statement is that the code is easier to read, whereas the advantage of using the logical AND assignment (<code>&amp;&amp;=</code>) operator is that it you need not specify the exact default value for a given data type.
            
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#equality" target="">== (equality)</a><br/><a href="#inequality" target="">!= (inequality)</a><br/><a href="#logical_OR" target="">|| (logical OR)</a><br/><a href="#logical_OR_assignment" target="">||= (logical OR assignment)</a><br/><a href="#logical_AND" target="">&& (logical AND)</a><br/><a href="#logical_NOT" target="">! (logical NOT)</a><br/><a href="#strict_equality" target="">=== (strict equality)</a><br/><a href="#strict_inequality" target="">!== (strict inequality)</a></div></div><a name="logical_NOT"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">!&nbsp;logical NOT</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><b>!</b>expression</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Inverts the Boolean value of a variable or expression. If <code>expression</code> is a variable with the absolute or converted value <code>true</code>, the value of <code>!expression</code> is <code>false</code>. If the expression <code>x &amp;&amp; y</code> evaluates to <code>false</code>, the expression <code>!(x &amp;&amp; y)</code> evaluates to <code>true</code>. 
			<p> The following expressions illustrate the result of using the logical NOT (!) operator: </p> 
			<ul><li><code>!true</code> returns <code>false</code>.</li> 
				<li><code>!false</code> returns <code>true</code>.</li></ul></p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression</span>:<a href="Boolean.html">Boolean</a></code> &mdash; 
					An expression or a variable that evaluates to a Boolean value.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> &mdash; The Boolean result of the logical operation.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>In the following example, the variable <code>happy</code> is set to <code>false</code>. 
The <code>if</code> condition evaluates the condition <code>!happy</code>, and if the condition is <code>true</code>, 
the <code>trace()</code> statement outputs a string. 
<div class='listing'><pre>var happy:Boolean = false; 
if (!happy) { 
    trace("don't worry, be happy"); // don't worry, be happy 
} </pre></div> The <code>trace</code> statement executes because <code>!false</code> equals <code>true</code>.
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#equality" target="">== (equality)</a><br/><a href="#inequality" target="">!= (inequality)</a><br/><a href="#logical_AND" target="">&& (logical AND)</a><br/><a href="#logical_OR" target="">|| (logical OR)</a><br/><a href="#logical_AND_assignment" target="">&&= (logical AND assignment)</a><br/><a href="#logical_OR_assignment" target="">||= (logical OR assignment)</a><br/><a href="#strict_equality" target="">=== (strict equality)</a><br/><a href="#strict_inequality" target="">!== (strict inequality)</a></div></div><a name="logical_OR"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">||&nbsp;logical OR</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 || expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Returns <code>expression1</code> if it is <code>true</code> or can be converted to <code>true</code>, and <code>expression2</code> otherwise. 
			If you use a function call as <code>expression2</code>, the function is not called if <code>expression1</code> evaluates to <code>true</code>. 
			<p>If both operands are of type Boolean, the result is <code>true</code> if either or both expressions are <code>true</code>; the result is <code>false</code> only if both expressions are <code>false</code>, as shown in the following table:
			</p>
			<table class="innertable"> 
			  <tr> 
			    <th rowspan="1" colspan="1">Expression </th> 
			    <th rowspan="1" colspan="1">Evaluates </th> 
			  </tr> 
			  <tr> 
			    <td rowspan="1" colspan="1"><code>true || true</code> </td> 
			    <td rowspan="1" colspan="1"><code>true</code></td> 
			  </tr> 
			  <tr> 
			    <td rowspan="1" colspan="1"><code>true || false</code> </td> 
			    <td rowspan="1" colspan="1"><code>true</code></td> 
			  </tr> 
			  <tr> 
			    <td rowspan="1" colspan="1"><code>false || false</code> </td> 
			    <td rowspan="1" colspan="1"><code>false</code></td> 
			  </tr> 
			  <tr> 
			    <td rowspan="1" colspan="1"><code>false || true</code> </td> 
			    <td rowspan="1" colspan="1"><code>true</code></td> 
			  </tr> 
			</table>

			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					A value of any type.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					A value of any type.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="specialTypes.html#*">*</a></code> &mdash; A Boolean value if both operands are members of the Boolean data type. Otherwise, the result will be the value of either of the two expressions.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example uses the logical OR (<code>||</code>) operator in an <code>if</code> statement. The second expression evaluates to <code>true,</code> so the final result is <code>true</code>: 
<div class='listing'><pre>var a:Number = 10; 
var b:Number = 250; 
var start:Boolean = false; 
if ((a &gt; 25) || (b &gt; 200) || (start)) { 
    trace("the logical OR test passed"); // the logical OR test passed 
} </pre></div> 
The message "the logical OR test passed" appears because one of the conditions in the <code>if</code> statement is true (<code>b > 200</code>). 
<p>The following example demonstrates how using a function call as the second operand can lead to unexpected results. If the expression on the left of the operator evaluates to <code>true</code>, that result is returned without evaluating the expression on the right (the function <code>fx2()</code> is not called). </p> 
<div class='listing'><pre>function fx1():Boolean { 
    trace("fx1 called"); 
    return true; 
} 
function fx2():Boolean { 
    trace("fx2 called"); 
    return true; 
} 
if (fx1() || fx2()) { 
    trace("IF statement entered");
}</pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#equality" target="">== (equality)</a><br/><a href="#inequality" target="">!= (inequality)</a><br/><a href="#logical_AND" target="">&& (logical AND)</a><br/><a href="#logical_AND_assignment" target="">&&= (logical AND assignment)</a><br/><a href="#logical_OR_assignment" target="">||= (logical OR assignment)</a><br/><a href="#logical_NOT" target="">! (logical NOT)</a><br/><a href="#strict_equality" target="">=== (strict equality)</a><br/><a href="#strict_inequality" target="">!== (strict inequality)</a></div></div><a name="logical_OR_assignment"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">||=&nbsp;logical OR assignment</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 ||= expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Assigns <code>expression1</code> the value of <code>expression1 || expression2</code>. For example, the following two statements are equivalent: 
<pre>x ||= y; 
x = x || y; </pre>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					A value of any type.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					A value of any type.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="specialTypes.html#*">*</a></code> &mdash; A Boolean value if both operands are members of the Boolean data type. Otherwise, the result will be the value of either of the two expressions.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example assigns a default value to a previously declared variable named <code>myVar</code>. This technique takes advantage of the fact that the logical OR (<code>||</code>) operator returns the value of <code>expression1</code> if <code>expression1</code> evaluates to <code>true</code> and otherwise returns the value of <code>expression2</code>.
            If <code>myVar</code> already contains a value that evaluates to <code>true</code>, <code>myVar</code> is unchanged. However, if <code>myVar</code> contains a value that evaluates to <code>false</code>, such as the values <code>null</code>, <code>""</code>(empty string), and <code>undefined</code> among others, <code>myVar</code> is assigned the value <code>"default"</code>.
<div class='listing'><pre>myVar ||= "default";</pre></div>
            
            
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#equality" target="">== (equality)</a><br/><a href="#inequality" target="">!= (inequality)</a><br/><a href="#logical_OR" target="">|| (logical OR)</a><br/><a href="#logical_AND" target="">&& (logical AND)</a><br/><a href="#logical_AND_assignment" target="">&&= (logical AND assignment)</a><br/><a href="#logical_NOT" target="">! (logical NOT)</a><br/><a href="#strict_equality" target="">=== (strict equality)</a><br/><a href="#strict_inequality" target="">!== (strict inequality)</a></div></div><a name="modulo"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">%&nbsp;modulo</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 <b>%</b> expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Calculates the remainder of <code>expression1</code> divided by <code>expression2</code>. If either operand is non-numeric, the modulo (<code>%</code>) operator attempts to convert it to a number. 
			<p>The sign of the modulo result matches the sign of the dividend (the first number). For example, <code>-4 % 3</code> and <code>-4 % -3</code> both evaluate to <code>-1</code>.</p></p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number. A string that contains only numeric characters evaluates to a number.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number. A string that contains only numeric characters evaluates to a number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Number.html">Number</a></code> &mdash; The result of the arithmetic operation.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following numeric example uses the modulo (<code>%</code>) operator: 
<div class='listing'><pre>
trace(12 % 5);    // 2 
trace(4.3 % 2.1); // 0.0999999999999996 
trace(4 % 4);     // 0 </pre></div> The first trace returns 2, rather than 12/5 or 2.4, because the modulo (<code>%</code>) operator returns only the remainder. The second trace returns 0.0999999999999996 instead of the expected 0.1 because of the limitations of floating-point accuracy in binary computing.
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#division" target="">/ (division)</a><br/><a href="Math.html#round()" target="">Math.round()</a></div></div><a name="modulo_assignment"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">%=&nbsp;modulo assignment</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 <b>%=</b> expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Assigns <code>expression1</code> the value of <code>expression1 % expression2</code>. The following two statements are equivalent: 
			<pre>x %= y; 
x = x % y; </pre></p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Number.html">Number</a></code> &mdash; The result of the arithmetic operation.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example assigns the value 4 to the variable <code>a</code>: 
<div class='listing'><pre>var a:Number = 14; 
var b:Number = 5; 
a %= b;
trace(a); // 4 </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#modulo" target="">% (modulo)</a></div></div><a name="multiplication"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">*&nbsp;multiplication</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 <b>*</b> expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Multiplies two numerical expressions. If both expressions are integers, the product is an integer. If either or both expressions are floating-point numbers, the product is a floating-point number.</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Number.html">Number</a></code> &mdash; An integer or floating-point number.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following statement multiplies the integers 2 and 3, resulting in the integer 6: 
<div class='listing'><pre>trace(2*3); // 6 </pre></div> 
This statement multiplies the floating-point numbers 2.0 and 3.1416, resulting in 6.2832, which is a floating-point number: 
<div class='listing'><pre>trace(2.0 * 3.1416); // 6.2832 </pre></div> <p></p></div><a name="multiplication_assignment"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">*=&nbsp;multiplication assignment</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 <b>*=</b> expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Assigns <code>expression1</code> the value of <code> expression1 * expression2</code>. For example, the following two expressions are equivalent: 
			<pre>x *= y 
x = x * y </pre></p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Number.html">Number</a></code> &mdash; The value of <code>expression1 * expression2</code> . If an expression cannot be converted to a numeric value, it returns <code>NaN</code> (not a number).</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example assigns the value 50 to the variable <code>a</code>: 
<div class='listing'><pre>var a:Number = 5; 
var b:Number = 10; 
trace(a *= b); // 50 </pre></div> 
The second and third lines of the following example calculate the expressions on the right side of the equal sign and assign the results to <code>c</code> and <code>d</code>: 
<div class='listing'><pre>var i:Number = 5; 
var c:Number = 4 - 6; 
var d:Number = i + 2; 
trace(c *= d); // -14 </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#multiplication" target="">* (multiplication)</a></div></div><a name="name_qualifier"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">::&nbsp;name qualifier</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre>namespace::property</pre> 
			<pre>namespace::method()</pre> 
			<pre>namespace::xmlObject.property</pre> 
			<pre>namespace::xmlObject.@attribute</pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Identifies the namespace of a property, a method, an XML property, or an XML attribute.</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">namespace</span>:<a href="Object.html">Object</a></code> &mdash; 
					The identifying namespace.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">propertyName</span>:<a href="Object.html">Object</a></code> &mdash; 
					The property, method, XML property, or XML attribute to identify.
				</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example uses the <code>::</code> operator to identify two methods that have the same name in two different namespaces: 
<div class='listing'><pre>public class NamespaceExample extends Sprite {
    public namespace French;
    public namespace Hawaiian;
    public function NamespaceExample() {
        trace(Hawaiian::hello()); // aloha
        trace(French::hello()); // bonjour
    }
    Hawaiian function hello():String {
        return "aloha";
    }

    French function hello():String { 
        return "bonjour";
    }
}</pre></div> 

The following example uses the <code>::</code> operator to identify XML properties with specified namespaces: 
<div class='listing'><pre>var soap:Namespace = new Namespace("http://schemas.xmlsoap.org/wsdl/soap/");
var w:Namespace = new Namespace("http://weather.example.org/forecast");
var myXML:XML = 
    &lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"&gt; 
     &lt;soap:Body&gt;
      &lt;w:forecast xmlns:w="http://weather.example.org/forecast"&gt;
       &lt;w:city&gt;Quito&lt;/w:city&gt;
       &lt;w:country&gt;Ecuador&lt;/w:country&gt;
       &lt;date&gt;2006-01-14&lt;/date&gt;
      &lt;/w:forecast&gt;
      &lt;/soap:Body&gt;
    &lt;/soap:Envelope&gt;;
    
trace(myXML.soap::Body.w::forecast.w::city); // Quito</pre></div> 

            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="Namespace.html" target="">Namespace class</a><br/><a href="XML.html" target="">XML class</a></div></div><a name="new"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">new</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><b>new</b> constructor(parameters)</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 5</td></tr></table><p></p><p>Instantiates a class instance. The <code>new</code> operator can be used with a class or a variable of type Class to create an instance of a class.
			The <code>new</code> operator is commonly used with a class object to create an instance of a class. For example, the statement <code>new Sprite()</code> creates an instance of the Sprite class.
			<p>The <code>new</code> operator can also be used to associate a class with an embedded asset, which is an external object such as an image, sound, or font that is compiled into a SWF file.
			Each embedded asset is represented by a unique embedded asset class. To access an embedded asset, you must use the <code>new</code> operator to instantiate its associated class. 
			Subsequently, you can call the appropriate methods and properties of the embedded asset class to manipulate the embedded asset.</p>
			<p>If you prefer to define classes with Function objects instead of the <code>class</code> keyword, you can use the <code>new</code> operator to create objects based on constructor functions.
			Do not confuse constructor functions with constructor methods of a class. A constructor function is a Function object that is defined with the <code>function</code> keyword, but that is not part of a class definition.
			If you use constructor functions to create objects, you must use prototype inheritance instead of class inheritance.</p>
			
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">constructor</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					A class, a function, or a variable that holds a value of type Class.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">parameters</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					One or more parameters, separated by commas.
				</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example creates the <code>Book</code> class and uses the <code>new</code> operator to create the objects <code>book1</code> and <code>book2</code>.
<div class='listing'><pre>
class Book {
  var bName:String;
  var bPrice:Number;
  
  public function Book(nameParam:String, priceParam:Number){
    bName = nameParam;
    bPrice = priceParam;
  }
}

var book1:Book = new Book("Confederacy of Dunces", 19.95);
var book2:Book = new Book("The Floating Opera", 10.95);
trace(book1); // [object Book]
</pre></div>
The following example uses the <code>new</code> operator to create an instance of the Array class with 18 elements:
<div class='listing'><pre>
var golfCourse:Array = new Array(18);
</pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#array_access" target="">[] (array access)</a><br/><a href="statements.html#class" target="">class statement</a><br/><a href="Object.html#constructor" target="">Object.constructor</a><br/><a href="Object.html#prototype" target="">Object.prototype</a><br/><a href="#object_initializer" target="">{} (object initializer)</a></div></div><a name="object_initializer"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">{}&nbsp;object initializer</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre>object = {name1 : value1, name2 : value2,... nameN : valueN}</pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Creates a new object and initializes it with the specified <code>name</code> and <code>value</code> property pairs. Using this operator is the same as using the <code>new Object</code> syntax and populating the property pairs using the assignment operator. The prototype of the newly created object is generically named the Object object. <p>This operator is also used to mark blocks of contiguous code associated with flow control statements (<code>for</code>, <code>while</code>, <code>if</code>, <code>else</code>, <code>switch</code>) and functions. </p></p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">object</span>:<a href="Object.html">Object</a></code> &mdash; 
					The object to create.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">name1,2,...N</span>:<a href="Object.html">Object</a></code> &mdash; 
					The names of the properties.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">value1,2,...N</span>:<a href="Object.html">Object</a></code> &mdash; 
					The corresponding values for each <code>name</code> property.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Object.html">Object</a></code> &mdash; An Object object.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The first line of the following code creates an empty object using the object initializer ({}) operator; the second line creates a new object using a constructor function: 
<div class='listing'><pre>var object:Object = {}; 
var object:Object = new Object(); </pre></div> 
The following example creates an object <code>account</code> and initializes the properties <code>name</code>, <code>address</code>, <code>city</code>, <code>state</code>, <code>zip</code>, and <code>balance</code> with accompanying values: 
<div class='listing'><pre>var account:Object = {name:"Adobe Systems, Inc.", address:"601 Townsend Street", city:"San Francisco", state:"California", zip:"94103", balance:"1000"}; 
for (i in account) { 
    trace("account."+i+" = "+account[i]); 
} </pre></div> 
The following example shows how array and object initializers can be nested within each other: 
<div class='listing'><pre>var person:Object = {name:"Gina Vechio", children:["Ruby", "Chickie", "Puppa"]}; </pre></div> 
The following code uses the information in the previous example and produces the same result using a constructor function: 
<div class='listing'><pre>var person:Object = new Object(); 
person.name = "Gina Vechio"; 
person.children = new Array(); 
person.children[0] = "Ruby"; 
person.children[1] = "Chickie"; 
person.children[2] = "Puppa"; </pre></div> 

            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#braces_(XML)" target="">braces (XML)</a><br/><a href="Object.html" target="">Object class</a></div></div><a name="parentheses"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">()&nbsp;parentheses</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre>(expression1[, expression2])</pre> <pre>(expression1, expression2)</pre> <pre>function(parameter1,..., parameterN) </pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Performs a grouping operation on one or more parameters, performs sequential evaluation of expressions, or surrounds one or more parameters and passes them as arguments to a function that precedes the parentheses. <p>Usage 1: Controls the order in which the operators execute. Parentheses override the normal precedence order and cause the expressions within the parentheses to be evaluated first. When parentheses are nested, the contents of the innermost parentheses are evaluated before the contents of the outer ones.</p> <p>Usage 2: Evaluates a series of expressions, separated by commas, in sequence, and returns the result of the final expression. </p> 
			<p>Usage 3: Surrounds one or more parameters and passes them to the function that precedes the parentheses.</p></p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Object.html">Object</a></code> &mdash; 
					An expression, which can include numbers, strings, variables, or text.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Object.html">Object</a></code> &mdash; 
					An expression, which can include numbers, strings, variables, or text.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">function</span>:<a href="Function.html">Function</a></code> &mdash; 
					The function to be performed on the contents of the parentheses.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">parameter1...parameterN</span>:<a href="Object.html">Object</a></code> &mdash; 
					A series of parameters to execute before the results are passed as arguments to the function outside the parentheses.
				</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>Usage 1: The following statements show the use of parentheses to control the order in which expressions are executed:
<div class='listing'><pre>
trace((2 + 3) * (4 + 5)); // 45 
trace(2 + (3 * (4 + 5))); // 29
trace(2 + (3 * 4) + 5);   // 19
trace(2 + (3 * 4) + 5);   // 19</pre></div> 
Usage 2: The following example evaluates the function <code>foo()</code> and then the function <code>bar()</code>, and returns the result of the expression <code>a + b</code>: 
<div class='listing'><pre>var a:Number = 1; 
var b:Number = 2; 
function foo() { 
  a += b; 
} 
function bar() { 
  b *= 10; 
} 
trace((foo(), bar(), a + b)); // 23 </pre></div> 
Usage 3: The following example shows the use of parentheses with functions: 
<div class='listing'><pre>var today:Date = new Date(); 
trace(today.getFullYear()); // outputs current year 
function traceParameter(param):void { 
  trace(param); 
} 
traceParameter(2 * 2); // 4 </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#parentheses_(XML)" target="">parentheses (XML)</a><br/><a href="statements.html#with" target="">with</a></div></div><a name="parentheses_(XML)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">( )&nbsp;parentheses (XML)</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre>myXML.(expression)</pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Evaluates an expression in an ECMAScript for XML (E4X) XML construct. For example, <code>myXML.(lastName == "Smith")</code> identifies XML elements with the name <code>lastName</code> and the value <code>"Smith"</code>.  The result is an XMLList object.</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">myXML</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An XML or XMLList object.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					The expression defining the matching elements.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="XMLList.html">XMLList</a></code> &mdash; The XMLList specified by the parentheses.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example shows how parentheses are used to identify elements and attributes:
<div class='listing'><pre>var myXML:XML = 
    &lt;employees&gt;
        &lt;employee id = "42"&gt;
            &lt;firstName&gt;Joe&lt;/firstName&gt;
            &lt;lastName&gt;Smith&lt;/lastName&gt;
        &lt;/employee&gt;
        &lt;employee id = "43"&gt;
            &lt;firstName&gt;Susan&lt;/firstName&gt;
            &lt;lastName&gt;Jones&lt;/lastName&gt;
        &lt;/employee&gt;
        &lt;employee id = "44"&gt;
            &lt;firstName&gt;Anne&lt;/firstName&gt;
            &lt;lastName&gt;Smith&lt;/lastName&gt;
        &lt;/employee&gt;
    &lt;/employees&gt;;
    
trace(myXML.employee.(lastName == "Smith").@id.toXMLString()); 
    // 42
    // 44
                
trace(myXML.employee.(Number(@id) > 42).@id.toXMLString()); 
    // 43
    // 44
</pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="XML.html" target="">XML class</a><br/><a href="XMLList.html" target="">XMLList class</a></div></div><a name="RegExp_delimiter"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">/&nbsp;RegExp delimiter</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre>/pattern/flags</pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>When used before and after characters, indicates that the characters have a literal value and are considered a regular expression (RegExp), not a variable, string, or other ActionScript element. Note, however, that two sequential forward slash characters (<code>//</code>) indicate the beginning of a comment. </p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">pattern</span>:<a href="String.html">String</a></code> &mdash; 
					A sequence of one or more characters, defining the pattern of the regular expression.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">flags</span>:<a href="String.html">String</a></code> &mdash; 
					A sequence of zero or more of the following characters: <code>g</code> (for the <code>global</code> flag), <code>i</code> (for the <code>ignoreCase</code> flag), <code>s</code> (for the <code>dotall</code> flag), <code>x</code> (for the <code>extended</code> flag).
				</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example uses forward slash characters (/) to set the value of a variable of type RegExp (the <code>i</code> flag is set, to ignore case sensitivity when matching): 
<div class='listing'><pre>var myRegExp:RegExp = /foo-\d+/i; 
trace(myRegExp.exec("ABC Foo-32 def.")); // Foo-32 </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="RegExp.html" target="">RegExp class</a></div></div><a name="strict_equality"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">===&nbsp;strict equality</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 === expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Tests two expressions for equality, but does not perform automatic data conversion. 
			The result is <code>true</code> if both expressions, including their data types, are equal.
			<p>The strict equality (<code>===</code>) operator is the same as the equality (<code>==</code>) operator in three ways:</p> 
			<ul> 
			  <li>Numbers and Boolean values are compared by value and are considered equal if they have the same value.</li> 
			  <li>String expressions are equal if they have the same number of characters and the characters are identical.</li> 
			  <li>Variables representing objects, arrays, and functions are compared by reference. Two such variables are equal if they refer to the same object, array, or function. Two separate arrays are never considered equal, even if they have the same number of elements.</li> 
			</ul>
			The strict equality (<code>===</code>) operator differs from the equality (<code>==</code>) operator in only two ways:
			<ul>
			  <li>The strict equality operator performs automatic data conversion only for the number types (Number, int, and uint),
			  whereas the equality operator performs automatic data conversion for all primitive data types.</li>
			  <li>When comparing <code>null</code> and <code>undefined</code>, the strict equality operator returns <code>false</code>.</li>
			</ul>
			The strict equality operator generates different results in ActionScript 3.0 than it did in ActionScript 2.0 in two situations involving primitive values (for example, <code>var x:Number = 1</code>) with primitive objects (for example, <code>var x:Number = new Number(1)</code>).
			This is because ActionScript 3.0 removes the distinction between primitive values and primitive wrapper objects. 
			<p>First, comparisons between primitive values and primitive objects that contain the same value return <code>true</code> in ActionScript 3.0, but <code>false</code> in earlier versions. In earlier versions, the data type of a primitive value is either Boolean, Number, or String, whereas the data type of a primitive object is always Object rather than Boolean, Number or String. 
			The practical effect of this difference is that the following code results in <code>false</code> in previous versions of ActionScript because the data types of the operands do not match, but the result is <code>true</code> in ActionScript 3.0 because primitive values are typed as either Boolean, Number, int, uint, or String, whether they are wrapped in an object or not.</p>
			<div class='listing'><pre>
var num1:Number = 1;
var num2:Number = new Number(1);
trace(num1 === num2); // true in ActionScript 3.0, false in ActionScript 2.0
			</pre></div>
			Second, comparisons between two primitive objects that contain the same value result in <code>true</code> in ActionScript 3.0, but <code>false</code> in previous versions.
			<div class='listing'><pre>
var num1:Number = new Number(1);
var num2:Number = new Number(1);
trace(num1 == num2);  // true in ActionScript 3.0, false in ActionScript 2.0
trace(num1 === num2); // true in ActionScript 3.0, false in ActionScript 2.0</pre></div>
			This is because in previous versions of ActionScript, both variables belong to the data type Object, so they are compared by reference and the result is <code>false</code> for both the equality and strict equality operations.
			In ActionScript 3.0, however, both variables belong to the data type Number, so they are compared by value and the result is <code>true</code> for both the equality and strict equality operators.
</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Object.html">Object</a></code> &mdash; 
					A number, string, Boolean value, variable, object, array, or function.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Object.html">Object</a></code> &mdash; 
					A number, string, Boolean value, variable, object, array, or function.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> &mdash; The Boolean result of the comparison.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example shows that strict equality (<code>===</code>) is the same as equality (<code>==</code>) when both the value and data types match:
<div class='listing'><pre>
var string1:String = "5"; 
var string2:String = "5"; 
trace(string1 == string2);  // true 
trace(string1 === string2); // true
</pre></div>
The following example shows that the strict equality operator does not convert the String data type to Number, but the equality (<code>==</code>) operator does:
<div class='listing'><pre>// The equality (==) operator converts 5 to "5", but the strict equality operator does not
var string1:String = "5"; 
var num:Number = 5; 
trace(string1 == num);  // true 
trace(string1 === num); // false 
</pre></div>
The following example shows that the strict equality operator does not convert Boolean values to numbers, but the equality operator does:
<div class='listing'><pre>
var num:Number = 1;
var bool:Boolean = true;
trace(num == bool);  // true 
trace(num === bool); // false</pre></div>
The following example shows that the strict equality operator does convert int and uint data types:
<div class='listing'><pre>
var num1:Number = 1;
var num2:int = 1;
var num3:uint = 1;
trace(num1 === num2); // true
trace(num1 === num3); // true</pre></div>
The following example shows that the strict equality operator considers <code>null</code> and <code>undefined</code> not equal, but the equality operator considers them equal:
<div class='listing'><pre>
trace(null == undefined);  // true 
trace(null === undefined); // false 
</pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#equality" target="">== (equality)</a><br/><a href="#inequality" target="">!= (inequality)</a><br/><a href="#logical_AND" target="">&& (logical AND)</a><br/><a href="#logical_NOT" target="">! (logical NOT)</a><br/><a href="#logical_OR" target="">|| (logical OR)</a><br/><a href="#strict_inequality" target="">!== (strict inequality)</a></div></div><a name="strict_inequality"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">!==&nbsp;strict inequality</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 <b>!==</b> expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Tests for the exact opposite of the strict equality (<code>===</code>) operator. 
			The strict inequality operator performs the same as the inequality operator except that only the int and uint data types are converted. 
			<p>If <code>expression1</code> is equal to <code>expression2</code>, and their data types are equal, the result is <code>false</code>.</p>
			<p>The strict inequality (<code>!==</code>) operator is the same as the inequality (<code>!=</code>) operator in three ways:</p> 
			<ul> 
			  <li>Numbers and Boolean values are compared by value and are considered equal if they have the same value.</li> 
			  <li>String expressions are equal if they have the same number of characters and the characters are identical.</li> 
			  <li>Variables representing objects, arrays, and functions are compared by reference. Two such variables are equal if they refer to the same object, array, or function. Two separate arrays are never considered equal, even if they have the same number of elements.</li> 
			</ul>
			The strict inequality  operator differs from the inequality (<code>!=</code>) operator in only two ways:
			<ul>
			  <li>The strict inequality (<code>!==</code>) operator performs automatic data conversion only for the number types, Number, int, and uint,
			  whereas the inequality (<code>!=</code>) operator performs automatic data conversion for all primitive data types.</li>
			  <li>When comparing <code>null</code> and <code>undefined</code>, the strict inequality (<code>!==</code>) operator returns <code>true</code>.</li>
			</ul>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Object.html">Object</a></code> &mdash; 
					A number, string, Boolean value, variable, object, array, or function.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Object.html">Object</a></code> &mdash; 
					A number, string, Boolean value, variable, object, array, or function.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> &mdash; The Boolean result of the comparison.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The comments in the following code show the returned value of operations that use the equality (<code>==</code>), strict equality (<code>===</code>), and strict inequality (<code>!==</code>) operators: 
<div class='listing'><pre>var s1:String = "5"; 
var s2:String = "5"; 
var s3:String = "Hello"; 
var n:Number = 5; 
var b:Boolean = true; 
trace(s1 == s2);  // true 
trace(s1 == s3);  // false 
trace(s1 == n);   // true 
trace(s1 == b);   // false 
trace(s1 === s2); // true 
trace(s1 === s3); // false 
trace(s1 === n);  // false 
trace(s1 === b);  // false 
trace(s1 !== s2); // false 
trace(s1 !== s3); // true 
trace(s1 !== n);  // true 
trace(s1 !== b);  // true </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#equality" target="">== (equality)</a><br/><a href="#inequality" target="">!= (inequality)</a><br/><a href="#logical_AND" target="">&& (logical AND)</a><br/><a href="#logical_NOT" target="">! (logical NOT)</a><br/><a href="#logical_OR" target="">|| (logical OR)</a><br/><a href="#strict_equality" target="">=== (strict equality)</a></div></div><a name="string_delimiter"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">"&nbsp;string delimiter</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre> "text" </pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>When used before and after characters, indicates that the characters have a literal value and are considered a string, not a variable, numerical value, or other ActionScript element.</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">text</span>:<a href="String.html">String</a></code> &mdash; 
					A sequence of zero or more characters.
				</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example uses quotation marks (") to indicate that the value of the variable <code>yourGuess</code> is the literal string <code>"Prince Edward Island"</code> and not the name of a variable. 
<div class='listing'><pre>var yourGuess:String = "Prince Edward Island"; 
submit_btn.onRelease = function() { trace(yourGuess); }; 
// Prince Edward Island</pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="String.html" target="">String class</a><br/><a href="package.html#String()" target="">String() function</a></div></div><a name="subtraction"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">-&nbsp;subtraction</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre><code><b>-</b>expression</code></pre> <pre> <code>expression1 <b>-</b> expression2</code></pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Used for negating or subtracting. <p> Usage 1: When used for negating, the operator reverses the sign of a numerical expression.</p><p> Usage 2: When used for subtracting, the operator performs an arithmetic subtraction on two numerical expressions, subtracting <code>expression2</code> from <code>expression1</code>. When both expressions are integers, the difference is an integer. When either or both expressions are floating-point numbers, the difference is a floating-point number.</p></p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Number.html">Number</a></code> &mdash; An integer or floating-point number.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>Usage 1: The following statement reverses the sign of the expression 2 + 3: 
<div class='listing'><pre>trace(-(2 + 3)); // -5 </pre></div> 
Usage 2: The following statement subtracts the integer 2 from the integer 5: 
<div class='listing'><pre>trace(5 - 2); // 3 </pre></div> The result, 3, is an integer.
<p>The following statement subtracts the floating-point number 1.5 from the floating-point number 3.25:</p>
<div class='listing'><pre>trace(3.25 - 1.5); // 1.75 </pre></div> 
The result, 1.75, is a floating-point number.<p></p></div><a name="subtraction_assignment"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">-=&nbsp;subtraction assignment</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>expression1 -= expression2</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Assigns <code>expression1</code> the value of <code>expression1 - expression2</code>. For example, the following two statements are equivalent: 
			<pre>x -= y ;
x = x - y;</pre> 
			<p>String expressions must be converted to numbers; otherwise, the result is <code>NaN</code> (not a number).</p></p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression1</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">expression2</span>:<a href="Number.html">Number</a></code> &mdash; 
					A number or expression that evaluates to a number.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="Number.html">Number</a></code> &mdash; The result of the arithmetic operation.</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example uses the subtraction assignment (<code>-=</code>) operator to subtract 10 from 5 and assign the result to the variable <code>x</code>: 
<div class='listing'><pre>var x:Number = 5; 
var y:Number = 10; 
x -= y; 
trace(x); // -5 </pre></div> The following example shows how strings are converted to numbers: 
<div class='listing'><pre>var x:String = "5"; 
var y:String = "10"; 
x -= y; 
trace(x); // -5 </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#subtraction" target="">- (subtraction)</a></div></div><a name="type"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">:&nbsp;type</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre>[modifiers] var variableName:type</pre> <pre>function functionName():type { ... }</pre> <pre>function functionName(parameter1:type, ..., parameterN:type) [:type]{ ... } </pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Used for assigning a data type; this operator specifies the variable type, function return type, or function parameter type. When used in a variable declaration or assignment, this operator specifies the variable's type; when used in a function declaration or definition, this operator specifies the function's return type; when used with a function parameter in a function definition, this operator specifies the variable type expected for that parameter. 
			<p>Type checking always occurs at run time. However, when the compiler is set to strict mode, all types are also checked at compile time, and errors are generated when there is a mismatch. Mismatches can occur during assignment operations, function calls, and class member dereferencing using the dot (<code>.</code>) operator.</p> 
			<p>Types that you can use include all native object types, classes and interfaces that you define, and <code>void</code>. The recognized native types are Boolean, Number, int, uint, and String. All built-in classes are also supported as native types.</p>
			<p>If you do not assign a data type, the variable, function return value, or function parameter is considered untyped, which means that the value can be of any data type.
			If you wish to make clear your intent to use an untyped value, you can use the asterisk (*) character as the type annotation. When used as a type annotation, the asterisk character is equivalent to leaving a variable, function return type, or function parameter untyped.</p>
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">variableName</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An identifier for a variable.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">type</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					A native data type, class name that you have defined, or interface name.			
				</td></tr><tr><td width="20px"></td><td><code><span class="label">functionName</span>:<a href="Function.html">Function</a></code> &mdash; 
					An identifier for a function.			
				</td></tr><tr><td width="20px"></td><td><code><span class="label">parameter</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An identifier for a function parameter.			
				</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>Usage 1: The following example declares a public variable named <code>userName</code> whose type is String and assigns an empty string to it: 
<div class='listing'><pre>var userName:String = ""; </pre></div> 
Usage 2: The following example shows how to specify a function's return type by defining a function named <code>randomInt()</code> that specifies its return type as int: 
<div class='listing'><pre>function randomInt(integer:int):int { 
    return Math.round(Math.random()*integer); 
} 
trace(randomInt(8)); </pre></div> 
Usage 3: The following example defines a function named <code>squareRoot()</code> that takes a parameter named <code>val</code> of the Number type and returns the square root of <code>val</code>, also a Number type: 
<div class='listing'><pre>function squareRoot(val:Number):Number { 
    return Math.sqrt(val); 
} 
trace(squareRoot(121)); </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="statements.html#function" target="">function statement</a><br/><a href="statements.html#var" target="">var statement</a></div></div><a name="typeof"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">typeof</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>typeof expression</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Evaluates <code>expression</code> and returns a string specifying the expression's data type.
			The result is limited to six possible string values: <code>boolean</code>, <code>function</code>, <code>number</code>, <code>object</code>, <code>string</code>, and <code>xml</code>.
			If you apply this operator to an instance of a user-defined class, the result is the string <code>object</code>.
			The <code>typeof</code> operator is included for backward compatibility. Use the <code>is</code> operator to check type compatibility.
			</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression</span>:<a href="Object.html">Object</a></code> &mdash; 
					An object to evaluate.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="String.html">String</a></code> &mdash; A string representation of the type of <code>expression</code>. The following table shows the results of the <code>typeof</code> operator on each type of expression.
<p/>
<table class="innertable" width="250">
  <tr>
    <th>Expression Type</th>
    <th>Result</th>
  </tr>
  <tr>
    <td>
      Array
    </td>
    <td>
      <code>object</code>
    </td>
  </tr>
  <tr>
    <td>
      Boolean
    </td>
    <td>
      <code>boolean</code>
    </td>
  </tr>
  <tr>
    <td>
      Function
    </td>
    <td>
      <code>function</code>
    </td>
  </tr>
  <tr>
    <td>
      int
    </td>
    <td>
      <code>number</code>
    </td>
  </tr>
  <tr>
    <td>
      Number
    </td>
    <td>
      <code>number</code>
    </td>
  </tr>
  <tr>
    <td>
      Object
    </td>
    <td>
      <code>object</code>
    </td>
  </tr>
  <tr>
    <td>
      String
    </td>
    <td>
      <code>string</code>
    </td>
  </tr>
  <tr>
    <td>
      uint
    </td>
    <td>
      <code>number</code>
    </td>
  </tr>
  <tr>
    <td>
      XML
    </td>
    <td>
      <code>xml</code>
    </td>
  </tr>
  <tr>
    <td>
      XMLList
    </td>
    <td>
      <code>xml</code>
    </td>
  </tr>
</table></td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>
                The following example shows the result of using <code>typeof</code> on various objects and values.
<div class='listing'><pre>
trace(typeof Array); // object
trace(typeof Date);  // object
trace(typeof 3);     // number
</pre></div>
The following example shows that in ActionScript 3.0, the data type of a primitive object is the same whether you assign a literal value or use the <code>new</code> operator to create an object. 
This differs from previous versions of ActionScript in which the <code>typeof</code> operator returns <code>object</code> for variable <code>b</code>:
<div class='listing'><pre>
var a:String = "sample";
var b:String = new String("sample");
trace(typeof a); // string
trace(typeof b); // string 
</pre></div>
                
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="#as" target="">as</a><br/><a href="#instanceof" target="">instanceof</a><br/><a href="#is" target="">is</a></div></div><a name="void"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">void</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>void expression</code></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Evaluates an expression and then discards its value, returning <code>undefined</code>. The <code>void</code> operator is often used in comparisons that use the <code>==</code> operator to test for undefined values.</p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">expression</span>:<a href="Object.html">Object</a></code> &mdash; 
					An expression to be evaluated.
				</td></tr></table><p></p><span class="label">Result</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="specialTypes.html#*">*</a></code> &mdash; The value <code>undefined</code>.</td></tr></table></div><a name="XML_literal_tag_delimiter"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">< >&nbsp;XML literal tag delimiter</td><td class="detailHeaderType"> Operator </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Usage</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><pre> myXML= &lt;{tagName} {attributeName} = {attributeValue}&gt;{content}&lt;/{tagName}&gt;</pre></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 9</td></tr></table><p></p><p>Defines an XML tag in an XML literal. Use the forward slash / to define the closing tag. </p><p></p><span class="label">Operands</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">myXML</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An XML or XMLList object.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">tagName</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An expression that evaluates to the name of an XML tag.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">attributeName</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An expression that evaluates to the name of an XML attribute.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">attributeValue</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An expression that evaluates to the value of an XML attribute.
				</td></tr><tr><td width="20px"></td><td><code><span class="label">content</span>:<a href="specialTypes.html#*">*</a></code> &mdash; 
					An expression that evaluates to the contents of an XML tag.
				</td></tr></table><br/><span class="label">Example</span><br/><span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span><br/>The following example shows how to use the <code>&lt;</code> and <code>&gt;</code> operators when defining an XML literal:
<div class='listing'><pre>var x:XML = &lt;item id= "324"&gt;cola&lt;/item&gt;; </pre></div>
            <p></p><p><span class="label"> See also </span></p><div class="seeAlso"><a href="XML.html" target="">XML class</a><br/><a href="XMLList.html" target="">XMLList class</a></div></div><p></p><center class="copyright"> &copy; 2004-2008 Adobe Systems Incorporated. All rights reserved. <br/>Thu Oct 30 2008, 07:14 PM -07:00  </center></div></body></html><!-- &copy; 2004-2008 Adobe Systems Incorporated. All rights reserved. <br/>Thu Oct 30 2008, 07:14 PM -07:00  -->
