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

				<!--

				
				    
				

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

				    
				        
				    
				-->
                
                    
                
			</script><div class="MainContent"><table class="classHeaderTable" cellpadding="0" cellspacing="0"><tr><td class="classHeaderTableLabel">Package</td><td><a href="package-detail.html" onclick="javascript:loadClassListFrame('class-list.html')">Top Level</a></td></tr><tr><td class="classHeaderTableLabel">Class</td><td class="classSignature">public final   class  Namespace</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">Namespace  <img src="images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> <a href="Object.html">Object</a></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p></p>
        The Namespace class contains methods and properties for defining and working with namespaces. 
There are three scenarios for using namespaces:
        <ul>
                  <li>
            
                     <b>Namespaces of XML objects</b>
            Namespaces associate a namespace prefix with a Uniform Resource Identifier (URI) 
that identifies the namespace. The prefix is a string used to reference the namespace within an 
XML object. If the prefix is undefined, when the XML is converted to a string, a prefix is 
automatically generated.
          </li>
                  <li>
            
                     <b>Namespace to differentiate methods</b>
            Namespaces can differentiate methods with the same name to perform different tasks. 
If two methods have the same name but separate namespaces, they can perform different tasks.
          </li>
                  <li>
            
                     <b>Namespaces for access control</b>
            Namespaces can be used to control access to a group of
properties and methods in a class. If you place the
properties and methods into a private
namespace, they are
inaccessible to any code that does not have access to
that namespace. You can grant access to the group of
properties and methods by passing the namespace to
other classes, methods or functions.
          </li>
               </ul>
        
               <p>This class shows two forms of the constructor method because each form accepts 
different parameters.</p>
        
               <p>This class (along with the XML, XMLList, and QName classes) implements 
powerful XML-handling standards defined in ECMAScript for XML 
(E4X) specification (ECMA-357 edition 2).</p>
        
            <p></p><p><a href="#includeExamplesSummary">View the examples</a></p><p><span class="classHeaderTableLabel">See also</span></p><div class="seeAlso"><a href="XML.html" target="">XML</a><br/><a href="XMLList.html" target="">XMLList</a><br/><a href="QName.html" target="">QName</a><br/><a href="http://www.ecma-international.org/publications/standards/Ecma-357.htm" target="mm_external">ECMAScript for XML (E4X) specification (ECMA-357 edition 2)</a></div><br/><hr></div><a name="propertySummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Properties</div><div class="showHideLinks"><div id="hideInheritedProperty" class="hideInheritedProperty"><a class="showHideLink" href="#propertySummary" onclick="javascript:setInheritedVisible(false,'Property');"><img class="showHideLinkImage" src="images/expanded.gif"> Hide Inherited Public Properties</a></div><div id="showInheritedProperty" class="showInheritedProperty"><a class="showHideLink" href="#propertySummary" onclick="javascript:setInheritedVisible(true,'Property');"><img class="showHideLinkImage" src="images/collapsed.gif"> Show Inherited Public Properties</a></div></div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableProperty"><tr><th>&nbsp;</th><th colspan="2">Property</th><th>Defined By</th></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="Object.html#constructor" class="signatureLink">constructor</a> : <a href="Object.html">Object</a><div class="summaryTableDescription">A reference to the class object or constructor function for a given object instance.</div></td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#prefix" class="signatureLink">prefix</a> : <a href="String.html">String</a><div class="summaryTableDescription">The prefix of the namespace.</div></td><td class="summaryTableOwnerCol">Namespace</td></tr><tr class="hideInheritedProperty"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><a href="Object.html#prototype" class="signatureLink">prototype</a> : <a href="Object.html">Object</a><div class="summaryTableDescription">[static] A reference to the prototype object of a class or function object.</div></td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#uri" class="signatureLink">uri</a> : <a href="String.html">String</a><div class="summaryTableDescription">The Uniform Resource Identifier (URI) of the namespace.</div></td><td class="summaryTableOwnerCol">Namespace</td></tr></table></div><a name="methodSummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Methods </div><div class="showHideLinks"><div id="hideInheritedMethod" class="hideInheritedMethod"><a class="showHideLink" href="#methodSummary" onclick="javascript:setInheritedVisible(false,'Method');"><img class="showHideLinkImage" src="images/expanded.gif"> Hide Inherited Public Methods</a></div><div id="showInheritedMethod" class="showInheritedMethod"><a class="showHideLink" href="#methodSummary" onclick="javascript:setInheritedVisible(true,'Method');"><img class="showHideLinkImage" src="images/collapsed.gif"> Show Inherited Public Methods</a></div></div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableMethod"><tr><th>&nbsp;</th><th colspan="2">Method</th><th>Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#Namespace()" class="signatureLink">Namespace</a>(uriValue:<a href="specialTypes.html#*">*</a>)</div><div class="summaryTableDescription">Creates a Namespace object.</div></td><td class="summaryTableOwnerCol">Namespace</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#Namespace2()" class="signatureLink">Namespace</a>(prefixValue:<a href="specialTypes.html#*">*</a>, uriValue:<a href="specialTypes.html#*">*</a>)</div><div class="summaryTableDescription">Creates a Namespace object according to the values of the prefixValue and uriValue parameters.</div></td><td class="summaryTableOwnerCol">Namespace</td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="Object.html#hasOwnProperty()" class="signatureLink">hasOwnProperty</a>(name:<a href="String.html">String</a>):<a href="Boolean.html">Boolean</a></div><div class="summaryTableDescription">Indicates whether an object has a specified property defined.</div></td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="Object.html#isPrototypeOf()" class="signatureLink">isPrototypeOf</a>(theClass:<a href="Object.html">Object</a>):<a href="Boolean.html">Boolean</a></div><div class="summaryTableDescription">Indicates whether an instance of the Object class is in the prototype chain of the object specified 
  as the parameter.</div></td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="Object.html#propertyIsEnumerable()" class="signatureLink">propertyIsEnumerable</a>(name:<a href="String.html">String</a>):<a href="Boolean.html">Boolean</a></div><div class="summaryTableDescription">Indicates whether the specified property exists and is enumerable.</div></td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td></tr><tr class="hideInheritedMethod"><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img src="images/inheritedSummary.gif" alt="Inherited" title="Inherited" class="inheritedSummaryImage"></td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="Object.html#setPropertyIsEnumerable()" class="signatureLink">setPropertyIsEnumerable</a>(name:<a href="String.html">String</a>, isEnum:<a href="Boolean.html">Boolean</a> = true):<a href="specialTypes.html#void">void</a></div><div class="summaryTableDescription">Sets the availability of a dynamic property for loop operations.</div></td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#toString()" class="signatureLink">toString</a>():<a href="String.html">String</a></div><div class="summaryTableDescription">Equivalent to the Namespace.uri property.</div></td><td class="summaryTableOwnerCol">Namespace</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#valueOf()" class="signatureLink">valueOf</a>():<a href="String.html">String</a></div><div class="summaryTableDescription">Returns the URI value of the specified object.</div></td><td class="summaryTableOwnerCol">Namespace</td></tr></table></div><script language="javascript" type="text/javascript"><!--
                      showHideInherited();
                      --></script><div class="MainContent"><div class="detailSectionHeader">Property Detail</div><a name="propertyDetail"></a><a name="prefix"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">prefix</td><td class="detailHeaderType">property</td></tr></table><div class="detailBody"><code>prefix:<a href="String.html">String</a></code>&nbsp;&nbsp;[read-write] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>The prefix of the namespace.</p><br/><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get prefix():<a href="String.html">String</a></code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set prefix(value:<a href="String.html">String</a>):<a href="specialTypes.html#void">void</a></code><br/></div><a name="propertyDetail"></a><a name="uri"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">uri</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>uri:<a href="String.html">String</a></code>&nbsp;&nbsp;[read-write] <p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>The Uniform Resource Identifier (URI) of the namespace.</p><br/><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get uri():<a href="String.html">String</a></code><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function set uri(value:<a href="String.html">String</a>):<a href="specialTypes.html#void">void</a></code><br/></div><a name="constructorDetail"></a><div class="detailSectionHeader">Constructor Detail</div><a name="Namespace()"></a><a name="Namespace()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">Namespace</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">Constructor</td></tr></table><div class="detailBody"><code>public function Namespace(uriValue:<a href="specialTypes.html#*">*</a>)</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p>
          Creates a Namespace object.
 The values assigned to the
          <code>uri</code>
          and
          <code>prefix</code>
          properties 
 of the new Namespace object depend on the type of value passed for the
          <code>uriValue</code>
          parameter:
          <ul><li>
              If no value is passed, the
              <code>prefix</code>
              and
              <code>uri</code>
              properties are set to an empty string.
            </li><li>If the value is a Namespace object, a copy of the object is created.</li><li>
              If the value is a QName object, the
              <code>uri</code>
              property is set to the
              <code>uri</code>
              property of the QName object.
            </li></ul>
          
          <p>
            <b>Note:</b>
            This class shows two constructor entries because each form accepts 
    different parameters. The constructor behaves differently depending on the type and number of 
    parameters passed, as detailed in each entry. ActionSript 3.0 does not support method or constructor overloading.
          </p>
          
        </p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">uriValue</span>:<a href="specialTypes.html#*">*</a></code> &mdash; The Uniform Resource Identifier (URI) of the namespace.</td></tr></table></div><a name="Namespace2()"></a><a name="Namespace(,)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">Namespace</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">Constructor</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>public function Namespace(prefixValue:<a href="specialTypes.html#*">*</a>, uriValue:<a href="specialTypes.html#*">*</a>)</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p>
          Creates a Namespace object according to the values of the
          <code>prefixValue</code>
          and
          <code>uriValue</code>
          parameters.
 This constructor requires both parameters.
          <p>
            The value of the
            <code>prefixValue</code>
            parameter is assigned to the
            <code>prefix</code>
            property as follows:
          </p>
          
          <ul><li>
              If
              <code>undefined</code>
              is passed,
              <code>prefix</code>
              is set to
              <code>undefined</code>
              .
            </li><li>
              If the value is a valid XML name, as determined by the
              <code>isXMLName()</code>
              function, it is converted to a string and assigned to the
              <code>prefix</code>
              property.
            </li><li>
              If the value is not a valid XML name, the
              <code>prefix</code>
              property is set to
              <code>undefined</code>
              .
            </li></ul>
          
          <p>
            The value of the
            <code>uriValue</code>
            parameter is assigned to the
            <code>uri</code>
            property as follows:
          </p>
          
          <ul><li>
              If a QName object is passed, the
              <code>uri</code>
              property is set to the value of the QName object's
              <code>uri</code>
              property.
            </li><li>
              Otherwise, the
              <code>uriValue</code>
              parameter is converted to a string and assigned to the
              <code>uri</code>
              property.
            </li></ul>
          
          <p>
            <b>Note:</b>
            This class shows two constructor method entries because each form accepts 
    different parameters. The constructor behaves differently depending on the type and number of 
    arguments passed, as detailed in each entry. ActionSript 3.0 does not support method or constructor overloading.
          </p>
          
        </p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">prefixValue</span>:<a href="specialTypes.html#*">*</a></code> &mdash; The prefix to use for the namespace.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">uriValue</span>:<a href="specialTypes.html#*">*</a></code> &mdash; The Uniform Resource Identifier (URI) of the namespace.</td></tr></table></div><a name="methodDetail"></a><div class="detailSectionHeader">Method Detail</div><a name="toString()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">toString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function toString():<a href="String.html">String</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Equivalent to the
          <code>Namespace.uri</code>
          property.
        </p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="String.html">String</a></code> &mdash; The Uniform Resource Identifier (URI) of the namespace, as a string.</td></tr></table></div><a name="valueOf()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">valueOf</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> <a href="statements.html#AS3">AS3</a> function valueOf():<a href="String.html">String</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>Returns the URI value of the specified object.</p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="String.html">String</a></code> &mdash; The Uniform Resource Identifier (URI) of the namespace, as a string.</td></tr></table></div><a name="includeExamplesSummary"></a><div class="detailSectionHeader">Examples<span class="usage"><a href="ExampleInstruct.html"> How to use examples </a></span></div><div class="exampleHeader">NamespaceExample.as</div><br/><div class="detailBody">
        The following example shows how to work with namespaces defined in XML objects.
 This is accomplished with the following steps:
        <ol><li>The example defines three Namespace objects, each with a unique URI that defines a namespace.</li><li>
            The example defines an XML variable named
            <code>myXML</code>
            and assigns it to the return value of
            <code>getRSS()</code>
            .  The
            <code>getRSS()</code>
            method defines an XML object that contains several namespaces
 	and returns that XML object.
          </li><li>
            The example declares and evaluates an Array variable by calling the
            <code>parseRSS()</code>
            method with
            <code>myXML</code>
            passed to it.  In
            <code>parseRSS()</code>
            , the default XML namespace is defined as
            <code>rss</code>
            and the example defines an XMLList variable by assigning the list of
            <code>item</code>
            objects in
            <code>myXML</code>
            .  An array is created and populated with various nodes within
            <code>myXML.item</code>
            . The array is then returned.
          </li><li>
            The elements in the array are printed using a
            <code>for</code>
            loop and three calls to
            <code>trace()</code>
            .
          </li></ol>
        
        <div class="listing"><pre>package {
    import flash.display.Sprite;

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

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

            var items:XMLList = rssXML.item;

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

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

    import flash.display.Sprite;

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

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

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

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

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

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

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

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

    private function addLabel():void {
        label = new TextField();
        label.text = labelTxt;
        label.width = 50;
        label.height = 20;
        label.mouseEnabled = false;
        addChild(label);
    }
      
    private function addListeners():void {
        addEventListener(MouseEvent.MOUSE_UP, mouseOverHandler);
        addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
        addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
        addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
    }
 
    private function mouseOutHandler(e:Event):void {
        ns = out;
        draw();
    }
 
    private function mouseOverHandler(e:Event):void {
        ns = over;
        draw();
    }
 
    private function mouseDownHandler(e:Event):void {
        ns = down;
        draw();
    }
 
    private function draw():void {
        this.graphics.clear();
        this.graphics.beginFill(ns::bgColor);
        this.graphics.drawRect(0, 0, 60, 20);
    }
}</pre></div>
      </div><br/><br/><hr><br/><p></p><center class="copyright"> &copy; 2004-2008 Adobe Systems Incorporated. All rights reserved. <br/>Thu Oct 30 2008, 07:08 PM -07:00  </center><div style="display:none">Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace Namespace </div></div></body></html><!-- &copy; 2004-2008 Adobe Systems Incorporated. All rights reserved. <br/>Thu Oct 30 2008, 07:08 PM -07:00  -->
