﻿<!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="Sound,flash.media.Sound,NELLYMOSER,SPEEX,activityLevel,activityLevel,album,artist,bandwidth,bufferTime,bufferTime,bytesLoaded,bytesTotal,checkPolicyFile,codec,comment,currentFPS,deblocking,encodeQuality,fps,framesPerPacket,gain,genre,height,id3,index,index,isBuffering,keyFrameInterval,leftPeak,leftToLeft,leftToRight,length,loopback,motionLevel,motionTimeout,muted,muted,name,name,names,names,pan,position,quality,rate,rightPeak,rightToLeft,rightToRight,silenceLevel,silenceTimeout,smoothing,songName,soundTransform,soundTransform,soundTransform,track,url,useEchoSuppression,videoHeight,videoWidth,volume,width,year,areSoundsInaccessible,attachCamera,attachNetStream,clear,close,computeSpectrum,extract,getCamera,getMicrophone,load,play,scanHardware,setKeyFrameInterval,setLoopBack,setLoopback,setMode,setMotionLevel,setQuality,setSilenceLevel,setUseEchoSuppression,stopAll,stop"><title>flash.media.Sound (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 = 'Sound - 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?flash/media/Sound.html&amp;flash/media/class-list.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">Sound</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("Sound"); titleBar_setSubNav(false,true,false	,false,true,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')">flash.media</a></td></tr><tr><td class="classHeaderTableLabel">Class</td><td class="classSignature">public  class  Sound</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">Sound  <img src="../../images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> <a href="../../flash/events/EventDispatcher.html">EventDispatcher</a> <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 Sound class lets you work with sound in an application. The Sound class
  lets you create a Sound object, load and play an external MP3 file into that object, 
  close the sound stream, and access
  data about the sound, such as information about the number of bytes in the stream and
  ID3 metadata. More detailed control of the sound is performed through the sound source &mdash; 
  the SoundChannel or Microphone object for the sound &mdash; and through the properties
  in the SoundTransform class that control the output of the sound to the computer's speakers.
        <p>
          In Flash Player 10 and later and AIR 1.5 and later, you can also use this 
  class to work with sound that is generated dynamically. 
  In this case, the Sound object uses the function you assign to a
          <code>sampleData</code>
          event handler to
  poll for sound data. The sound is played as it is retrieved from a ByteArray object that
  you populate with sound data. You can use
          <code>Sound.extract()</code>
          to extract sound data from a 
  Sound object,
  after which you can manipulate it before writing it back to the stream for playback.
        </p>
        
               <p>To control sounds that are embedded in a SWF file, use the properties in the SoundMixer class.</p>
        
               <p>
                  <b>Note</b>
          : The ActionScript 3.0 Sound API differs from ActionScript 2.0.
  In ActionScript 3.0, you cannot take sound objects and arrange them in a hierarchy
  to control their properties.
        </p>
        
               <p>When you use this class, consider the following security model:</p>
        
               <ul>
                  <li>Loading and playing a sound is not allowed if the calling file is in a network sandbox
  and the sound file to be loaded is local.</li>
                  <li>By default, loading and playing a sound is not allowed if the calling file is local and 
  tries to load and play a remote sound. A user must grant explicit permission to allow this type of access.</li>
                  <li>
            Certain operations dealing with sound are restricted. The data in a loaded sound cannot
  be accessed by a file in a different domain unless you implement a cross-domain policy file.
  Sound-related APIs that fall under this restriction are
            <code>Sound.id3</code>
            ,
            <code>SoundMixer.computeSpectrum()</code>
            ,
            <code>SoundMixer.bufferTime</code>
            , 
  and the
            <code>SoundTransform</code>
            class.
          </li>
               </ul>
        
               <p>
          However, in Adobe AIR, content in the
          <code>application</code>
          security sandbox (content
  installed with the AIR application) are not restricted by these security limitations.
        </p>
        
               <p>For more information related to security, see the following:</p>
        
               <ul>
                  <li>
            The
            <a href="http://www.adobe.com/go/flashcs4_prog_as3_security_en" target="external">security chapter</a>
            in the
            <i>Programming ActionScript 3.0</i>
            book and the latest comments on LiveDocs
          </li>
                  <li>
            The Flash Player Developer Center Topic:
            <a href="http://www.adobe.com/go/devnet_security_en" target="external">Security</a>
                  </li>
               </ul>
        
            <p></p><p><a href="#includeExamplesSummary">View the examples</a></p><p><span class="classHeaderTableLabel">See also</span></p><div class="seeAlso"><a href="../../flash/net/NetStream.html" target="">flash.net.NetStream</a><br/><a href="Microphone.html" target="">Microphone</a><br/><a href="SoundChannel.html" target="">SoundChannel</a><br/><a href="SoundMixer.html" target="">SoundMixer</a><br/><a href="SoundTransform.html" target="">SoundTransform</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=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#bytesLoaded" class="signatureLink">bytesLoaded</a> : <a href="../../uint.html">uint</a><div class="summaryTableDescription">[read-only] Returns the currently available number of bytes in this sound object.</div></td><td class="summaryTableOwnerCol">Sound</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#bytesTotal" class="signatureLink">bytesTotal</a> : <a href="../../int.html">int</a><div class="summaryTableDescription">[read-only] Returns the total number of bytes in this sound object.</div></td><td class="summaryTableOwnerCol">Sound</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#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="#id3" class="signatureLink">id3</a> : <a href="../../flash/media/ID3Info.html">ID3Info</a><div class="summaryTableDescription">[read-only] Provides access to the metadata that is part of an MP3 file.</div></td><td class="summaryTableOwnerCol">Sound</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#isBuffering" class="signatureLink">isBuffering</a> : <a href="../../Boolean.html">Boolean</a><div class="summaryTableDescription">[read-only] Returns the buffering state of external MP3 files.</div></td><td class="summaryTableOwnerCol">Sound</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a href="#length" class="signatureLink">length</a> : <a href="../../Number.html">Number</a><div class="summaryTableDescription">[read-only] The length of the current sound in milliseconds.</div></td><td class="summaryTableOwnerCol">Sound</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="#url" class="signatureLink">url</a> : <a href="../../String.html">String</a><div class="summaryTableDescription">[read-only] The URL from which this sound was loaded.</div></td><td class="summaryTableOwnerCol">Sound</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="#Sound()" class="signatureLink">Sound</a>(stream:<a href="../../flash/net/URLRequest.html">URLRequest</a> = null, context:<a href="../../flash/media/SoundLoaderContext.html">SoundLoaderContext</a> = null)</div><div class="summaryTableDescription">Creates a new Sound object.</div></td><td class="summaryTableOwnerCol">Sound</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="../../flash/events/EventDispatcher.html#addEventListener()" class="signatureLink">addEventListener</a>(type:<a href="../../String.html">String</a>, listener:<a href="../../Function.html">Function</a>, useCapture:<a href="../../Boolean.html">Boolean</a> = false, priority:<a href="../../int.html">int</a> = 0, useWeakReference:<a href="../../Boolean.html">Boolean</a> = false):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Registers an event listener object with an EventDispatcher object so that the listener 
 receives notification of an event.</div></td><td class="summaryTableOwnerCol"><a href="../../flash/events/EventDispatcher.html">EventDispatcher</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#close()" class="signatureLink">close</a>():<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Closes the stream, causing any download of data to cease.</div></td><td class="summaryTableOwnerCol">Sound</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="../../flash/events/EventDispatcher.html#dispatchEvent()" class="signatureLink">dispatchEvent</a>(event:<a href="../../flash/events/Event.html">Event</a>):<a href="../../Boolean.html">Boolean</a></div><div class="summaryTableDescription">Dispatches an event into the event flow.</div></td><td class="summaryTableOwnerCol"><a href="../../flash/events/EventDispatcher.html">EventDispatcher</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#extract()" class="signatureLink">extract</a>(target:<a href="../../flash/utils/ByteArray.html">ByteArray</a>, length:<a href="../../Number.html">Number</a>, startPosition:<a href="../../Number.html">Number</a> = -1):<a href="../../Number.html">Number</a></div><div class="summaryTableDescription">Extracts raw sound data from a Sound object.</div></td><td class="summaryTableOwnerCol">Sound</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="../../flash/events/EventDispatcher.html#hasEventListener()" class="signatureLink">hasEventListener</a>(type:<a href="../../String.html">String</a>):<a href="../../Boolean.html">Boolean</a></div><div class="summaryTableDescription">Checks whether the EventDispatcher object has any listeners registered for a specific type 
 of event.</div></td><td class="summaryTableOwnerCol"><a href="../../flash/events/EventDispatcher.html">EventDispatcher</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#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=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#load()" class="signatureLink">load</a>(stream:<a href="../../flash/net/URLRequest.html">URLRequest</a>, context:<a href="../../flash/media/SoundLoaderContext.html">SoundLoaderContext</a> = null):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Initiates loading of an external MP3 file from the specified URL.</div></td><td class="summaryTableOwnerCol">Sound</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#play()" class="signatureLink">play</a>(startTime:<a href="../../Number.html">Number</a> = 0, loops:<a href="../../int.html">int</a> = 0, sndTransform:<a href="../../flash/media/SoundTransform.html">SoundTransform</a> = null):<a href="../../flash/media/SoundChannel.html">SoundChannel</a></div><div class="summaryTableDescription">Generates a new SoundChannel object to play back the sound.</div></td><td class="summaryTableOwnerCol">Sound</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="../../flash/events/EventDispatcher.html#removeEventListener()" class="signatureLink">removeEventListener</a>(type:<a href="../../String.html">String</a>, listener:<a href="../../Function.html">Function</a>, useCapture:<a href="../../Boolean.html">Boolean</a> = false):<a href="../../specialTypes.html#void">void</a></div><div class="summaryTableDescription">Removes a listener from the EventDispatcher object.</div></td><td class="summaryTableOwnerCol"><a href="../../flash/events/EventDispatcher.html">EventDispatcher</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="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#toString()" class="signatureLink">toString</a>():<a href="../../String.html">String</a></div><div class="summaryTableDescription">Returns the string representation of the specified object.</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#valueOf()" class="signatureLink">valueOf</a>():<a href="../../Object.html">Object</a></div><div class="summaryTableDescription">Returns the primitive value of the specified object.</div></td><td class="summaryTableOwnerCol"><a href="../../Object.html">Object</a></td></tr><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="../../flash/events/EventDispatcher.html#willTrigger()" class="signatureLink">willTrigger</a>(type:<a href="../../String.html">String</a>):<a href="../../Boolean.html">Boolean</a></div><div class="summaryTableDescription">Checks whether an event listener is registered with this EventDispatcher object or any of 
 its ancestors for the specified event type.</div></td><td class="summaryTableOwnerCol"><a href="../../flash/events/EventDispatcher.html">EventDispatcher</a></td></tr></table></div><a name="eventSummary"></a><div class="summarySection"><div class="summaryTableTitle">Events</div><div class="showHideLinks"><div id="hideInheritedEvent" class="hideInheritedEvent"><a class="showHideLink" href="#eventSummary" onclick="javascript:setInheritedVisible(false,'Event');"><img class="showHideLinkImage" src="../../images/expanded.gif"> Hide Inherited Events</a></div><div id="showInheritedEvent" class="showInheritedEvent"><a class="showHideLink" href="#eventSummary" onclick="javascript:setInheritedVisible(true,'Event');"><img class="showHideLinkImage" src="../../images/collapsed.gif"> Show Inherited Events</a></div></div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableEvent"><tr><th>&nbsp;</th><th colspan="2">Event</th><th> Summary </th><th>Defined By</th></tr><tr class="hideInheritedEvent"><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="../../flash/events/EventDispatcher.html#event:activate" class="signatureLink">activate</a></div></td><td class="summaryTableDescription summaryTableCol">[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active.</td><td class="summaryTableOwnerCol"><a href="../../flash/events/EventDispatcher.html">EventDispatcher</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#event:complete" class="signatureLink">complete</a></div></td><td class="summaryTableDescription summaryTableCol">Dispatched when data has loaded successfully.</td><td class="summaryTableOwnerCol">Sound</td></tr><tr class="hideInheritedEvent"><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="../../flash/events/EventDispatcher.html#event:deactivate" class="signatureLink">deactivate</a></div></td><td class="summaryTableDescription summaryTableCol">[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive.</td><td class="summaryTableOwnerCol"><a href="../../flash/events/EventDispatcher.html">EventDispatcher</a></td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#event:id3" class="signatureLink">id3</a></div></td><td class="summaryTableDescription summaryTableCol">Dispatched by a Sound object when ID3 data is available for an MP3 sound.</td><td class="summaryTableOwnerCol">Sound</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#event:ioError" class="signatureLink">ioError</a></div></td><td class="summaryTableDescription summaryTableCol">Dispatched when an input/output error occurs that causes a load operation to fail.</td><td class="summaryTableOwnerCol">Sound</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#event:open" class="signatureLink">open</a></div></td><td class="summaryTableDescription summaryTableCol">Dispatched when a load operation starts.</td><td class="summaryTableOwnerCol">Sound</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#event:progress" class="signatureLink">progress</a></div></td><td class="summaryTableDescription summaryTableCol">Dispatched when data is received as a load operation progresses.</td><td class="summaryTableOwnerCol">Sound</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#event:sampleData" class="signatureLink">sampleData</a></div></td><td class="summaryTableDescription summaryTableCol">Dispatched when the player requests new audio data.</td><td class="summaryTableOwnerCol">Sound</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="bytesLoaded"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">bytesLoaded</td><td class="detailHeaderType">property</td></tr></table><div class="detailBody"><code>bytesLoaded:<a href="../../uint.html">uint</a></code>&nbsp;&nbsp;[read-only] <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 currently available number of bytes in this sound object. This property is 
     usually useful only for externally loaded files.</p><br/><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get bytesLoaded():<a href="../../uint.html">uint</a></code><br/></div><a name="propertyDetail"></a><a name="bytesTotal"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">bytesTotal</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>bytesTotal:<a href="../../int.html">int</a></code>&nbsp;&nbsp;[read-only] <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 total number of bytes in this sound object.</p><br/><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get bytesTotal():<a href="../../int.html">int</a></code><br/></div><a name="propertyDetail"></a><a name="id3"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">id3</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>id3:<a href="../../flash/media/ID3Info.html">ID3Info</a></code>&nbsp;&nbsp;[read-only] <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>
          Provides access to the metadata that is part of an MP3 file.
          <p>
            MP3 sound files can contain ID3 tags, which provide metadata about the 
     file. If an MP3 sound that you load using the
            <code>Sound.load()</code>
            method contains ID3 tags, you can query these properties. Only ID3 tags 
     that use the UTF-8 character set are supported.
          </p>
          
          <p>
            
            
            
            ID3 2.0 tags, 
     specifically 2.3 and 2.4. The following tables list the standard ID3 2.0 tags 
     and the type of content the tags represent. The
            <code>Sound.id3</code>
            property provides
     access to these tags through the format
            <code>my_sound.id3.COMM</code>
            ,
            <code>my_sound.id3.TIME</code>
            , and so on. The first
     table describes tags that can be accessed either through the ID3 2.0 property name or
     the ActionScript property name. The second table describes ID3 tags that are supported but do not have
     predefined properties in ActionScript.
          </p>
          
          <table class="innertable" ><tr><td>
                    <b>ID3 2.0 tag</b>
                  </td><td>
                    <b>Corresponding Sound class property</b>
                  </td></tr><tr><td>COMM</td><td>Sound.id3.comment</td></tr><tr><td>TALB</td><td>Sound.id3.album</td></tr><tr><td>TCON</td><td>Sound.id3.genre</td></tr><tr><td>TIT2</td><td>Sound.id3.songName</td></tr><tr><td>TPE1</td><td>Sound.id3.artist</td></tr><tr><td>TRCK</td><td>Sound.id3.track</td></tr><tr><td>TYER</td><td>Sound.id3.year</td></tr></table>
          
          <p>
            The following table describes ID3 tags that are supported but do not have
  predefined properties in the Sound class. You access them by calling
            <code>mySound.id3.TFLT</code>
            ,
            <code>mySound.id3.TIME</code>
            , and so on.
          </p>
          
          <table class="innertable" ><tr><td>
                    <b>Property</b>
                  </td><td>
                    <b>Description</b>
                  </td></tr><tr><td>TFLT</td><td>File type</td></tr><tr><td>TIME</td><td>Time</td></tr><tr><td>TIT1</td><td>Content group description</td></tr><tr><td>TIT2</td><td>Title/song name/content description</td></tr><tr><td>TIT3</td><td>Subtitle/description refinement</td></tr><tr><td>TKEY</td><td>Initial key</td></tr><tr><td>TLAN</td><td>Languages</td></tr><tr><td>TLEN</td><td>Length</td></tr><tr><td>TMED</td><td>Media type</td></tr><tr><td>TOAL</td><td>Original album/movie/show title</td></tr><tr><td>TOFN</td><td>Original filename</td></tr><tr><td>TOLY</td><td>Original lyricists/text writers</td></tr><tr><td>TOPE</td><td>Original artists/performers</td></tr><tr><td>TORY</td><td>Original release year</td></tr><tr><td>TOWN</td><td>File owner/licensee</td></tr><tr><td>TPE1</td><td>Lead performers/soloists</td></tr><tr><td>TPE2</td><td>Band/orchestra/accompaniment</td></tr><tr><td>TPE3</td><td>Conductor/performer refinement</td></tr><tr><td>TPE4</td><td>Interpreted, remixed, or otherwise modified by</td></tr><tr><td>TPOS</td><td>Part of a set</td></tr><tr><td>TPUB</td><td>Publisher</td></tr><tr><td>TRCK</td><td>Track number/position in set</td></tr><tr><td>TRDA</td><td>Recording dates</td></tr><tr><td>TRSN</td><td>Internet radio station name</td></tr><tr><td>TRSO</td><td>Internet radio station owner</td></tr><tr><td>TSIZ</td><td>Size</td></tr><tr><td>TSRC</td><td>ISRC (international standard recording code)</td></tr><tr><td>TSSE</td><td>Software/hardware and settings used for encoding</td></tr><tr><td>TYER</td><td>Year</td></tr><tr><td>WXXX</td><td>URL link frame</td></tr></table>
          
          <p>When using this property, consider the Flash Player security model:</p>
          
          <ul><li>
              The
              <code>id3</code>
              property of a Sound object is always permitted for SWF files 
     that are in the same security sandbox as the sound file. For files in other sandboxes, there 
     are security checks.
            </li><li>
              When you load the sound, using the
              <code>load()</code>
              method of the Sound class, you can  
     specify a
              <code>context</code>
              parameter, which is a SoundLoaderContext object. If you set the
              <code>checkPolicyFile</code>
              property of the SoundLoaderContext object to
              <code>true</code>
              , Flash Player 
     checks for a URL policy file on the server from which the sound is loaded. If a 
     policy file exists and permits access from the domain of the loading SWF file, then the file is allowed 
     to access the
              <code>id3</code>
              property of the Sound object; otherwise it is not.
            </li></ul>
          
          <p>
            However, in Adobe AIR, content in the
            <code>application</code>
            security sandbox (content
     installed with the AIR application) are not restricted by these security limitations.
          </p>
          
          <p>For more information related to security, see the following:</p>
          
          <ul><li>
              The
              <a href="http://www.adobe.com/go/flashcs4_prog_as3_security_en" target="external">security chapter</a>
              in the
              <i>Programming ActionScript 3.0</i>
              book and the latest comments on LiveDocs
            </li><li>
              The Flash Player Developer Center Topic:
              <a href="http://www.adobe.com/go/devnet_security_en" target="external">Security</a>
            </li></ul>
          
        </p><br/><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get id3():<a href="../../flash/media/ID3Info.html">ID3Info</a></code><br/><p><span class="label">See also</span></p><div class="seeAlso"><a href="SoundLoaderContext.html#checkPolicyFile" target="">SoundLoaderContext.checkPolicyFile</a></div><br/><span class="label"> Example </span><br/><div class="detailBody">
          The following example reads the ID3 information from a sound file and displays
 it in a text field.
          <p>
            In the constructor, the sound file is loaded but it is not set to play. Here, it is 
 assumed that the file is in the SWF directory. The system must have permission 
 in order to read the ID3 tags of a loaded sound file. If there is ID3 information in 
 the file and the program is permitted to read it, an
            <code>Event.ID3</code>
            event will 
 be fired and the
            <code>id3</code>
            property of the sound file will be populated. 
 The
            <code>id3</code>
            property contains an
            <code>ID3Info</code>
            object with all 
 of the ID3 information.
          </p>
          
          <p>
            In the
            <code>id3Handler()</code>
            method, the file's ID3 tags
 are stored in
            <code>id3</code>
            , an ID3Info class object. A text field is 
 instantiated to display the list of the ID3 tags. The for loop iterates 
 through all the ID3 2.0 tags and appends the name and value to the content of 
 the text field. Using ID3 info (
            <code>ID3Info</code>
            ) properties, the artist, 
 song name, and album are also appended. ActionScript 3.0 
 and Flash Player 9 and later support ID3 2.0 tags, specifically 2.3 and 2.4.
 If you iterate through properties like in the for loop, only ID3 2.0 tags will appear. 
 However, the data from the earlier versions are also stored in the song's
            <code>id3</code>
            property and can be accessed using ID3 info class properties. 
 The tags for the ID3 1.0 are at the end of the file while the ID3 2.0 tags are in 
 the beginning of the file. (Sometimes, the files may have both earlier and later version 
 tags in the same place.) If a file encoded with both version 1.0 and 2.0 tags at the 
 beginning and the end of the file, the method
            <code>id3Handler()</code>
            will be invoked twice. 
 It first reads the 2.0 version and then the version 1.0. If only ID3 1.0 tag is available, 
 then the information is accessible via the ID3 info properties, like
            <code>id3.songname</code>
            . 
 For ID3 2.0,
            <code>id3.TITS</code>
            property will retrieve the song name using the new tag (TITS).
          </p>
          
          <p>Note that no error handling is written for this example and if the ID3 content is long,
 the result may go beyond the viewable area.</p>
          
          <div class="listing"><pre>package {
    import flash.display.Sprite;
    import flash.media.Sound;
    import flash.net.URLRequest;
    import flash.media.ID3Info;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.events.Event;

    public class Sound_id3Example extends Sprite {
        private var snd:Sound = new Sound();       
        private var myTextField:TextField = new TextField();

        public function Sound_id3Example() {
            snd.addEventListener(Event.ID3, id3Handler);
            snd.load(new URLRequest("mySound.mp3"));
        }
    
        private function id3Handler(event:Event):void {
            var id3:ID3Info = snd.id3;

            myTextField.autoSize = TextFieldAutoSize.LEFT;
            myTextField.border = true;

            myTextField.appendText("Received ID3 Info: \n");
              
            for (var propName:String in id3) {
                myTextField.appendText(propName + " = " + id3[propName] + "\n");
            }
 
            myTextField.appendText("\n" + "Artist: " + id3.artist + "\n");
            myTextField.appendText("Song name: " + id3.songName + "\n");
            myTextField.appendText("Album: " + id3.album + "\n\n"); 
 
            this.addChild(myTextField);
        }
    }
}</pre></div>
        </div></div><a name="propertyDetail"></a><a name="isBuffering"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">isBuffering</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>isBuffering:<a href="../../Boolean.html">Boolean</a></code>&nbsp;&nbsp;[read-only] <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 buffering state of external MP3 files. If the value is
          <code>true</code>
          , 
     any playback is 
     currently suspended while the object waits for more data.
        </p><br/><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get isBuffering():<a href="../../Boolean.html">Boolean</a></code><br/></div><a name="propertyDetail"></a><a name="length"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">length</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>length:<a href="../../Number.html">Number</a></code>&nbsp;&nbsp;[read-only] <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 length of the current sound in milliseconds.</p><br/><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get length():<a href="../../Number.html">Number</a></code><br/></div><a name="propertyDetail"></a><a name="url"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">url</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code>url:<a href="../../String.html">String</a></code>&nbsp;&nbsp;[read-only] <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 URL from which this sound was loaded. This property is applicable only to Sound 
     objects that were loaded using the
          <code>Sound.load()</code>
          method. For
     Sound objects that are associated with a sound asset from a SWF file's library, the
     value of the
          <code>url</code>
          property is
          <code>null</code>
          .
          <p>
            When you first call
            <code>Sound.load()</code>
            , the
            <code>url</code>
            property 
     initially has a value of
            <code>null</code>
            , because the final URL is not yet known.
     The
            <code>url</code>
            property will have a non-null value as soon as an
            <code>open</code>
            event is dispatched from the Sound object.
          </p>
          
          <p>
            The
            <code>url</code>
            property contains the final, absolute URL from which a sound was
     loaded. The value of
            <code>url</code>
            is usually the same as the value passed to the
            <code>stream</code>
            parameter of
            <code>Sound.load()</code>
            . 
     However, if you passed a relative URL to
            <code>Sound.load()</code>
            the value of the
            <code>url</code>
            property represents the absolute URL.
     Additionally, if the original URL request is redirected by an HTTP server, the value
     of the
            <code>url</code>
            property reflects the final URL from which the sound file was actually
     downloaded.  This reporting of an absolute, final URL is equivalent to the behavior of
            <code>LoaderInfo.url</code>
            .
          </p>
          
        </p><br/><br/><span class="label"> Implementation </span><br/><code>&nbsp;&nbsp;&nbsp;&nbsp;public function get url():<a href="../../String.html">String</a></code><br/><p><span class="label">See also</span></p><div class="seeAlso"><a href="Sound.html#load()" target="">load()</a><br/><a href="../../flash/display/LoaderInfo.html#url" target="">flash.display.LoaderInfo.url</a></div></div><a name="constructorDetail"></a><div class="detailSectionHeader">Constructor Detail</div><a name="Sound()"></a><a name="Sound(flash.net.URLRequest,flash.media.SoundLoaderContext)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">Sound</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">Constructor</td></tr></table><div class="detailBody"><code>public function Sound(stream:<a href="../../flash/net/URLRequest.html">URLRequest</a> = null, context:<a href="../../flash/media/SoundLoaderContext.html">SoundLoaderContext</a> = null)</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 new Sound object. If you pass a valid URLRequest object to the 
     Sound constructor, the constructor automatically calls the
          <code>load()</code>
          function 
     for the Sound object. 
     If you do not pass a valid URLRequest object to the Sound constructor,
     you must call the
          <code>load()</code>
          function for the Sound object yourself, 
     or the stream will not load.
          <p>
            Once
            <code>load()</code>
            is called on a Sound object, you can't later load 
     a different sound file into that Sound object. To load a different sound file,
     create a new Sound object.
          </p>
          In Flash Player 10 and later and AIR 1.5 and later, instead of using
          <code>load()</code>
          , 
     you can use the
          <code>sampleData</code>
          event handler to load sound dynamically into the Sound object.
        </p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">stream</span>:<a href="../../flash/net/URLRequest.html">URLRequest</a></code> (default = <code>null</code>)<code></code> &mdash; The URL that points to an external MP3 file.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">context</span>:<a href="../../flash/media/SoundLoaderContext.html">SoundLoaderContext</a></code> (default = <code>null</code>)<code></code> &mdash; An optional SoundLoader context object, which can define the buffer time 
  (the minimum number of milliseconds of MP3 data to hold in the Sound object's 
  buffer) and can specify whether the application should check for a cross-domain
  policy file prior to loading the sound.</td></tr></table></div><a name="methodDetail"></a><div class="detailSectionHeader">Method Detail</div><a name="close()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">close</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td></tr></table><div class="detailBody"><code> public function close():<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Closes the stream, causing any download of data to cease.
     No data may be read from the stream after the
          <code>close()</code>
          method is called.
        </p><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../flash/errors/IOError.html">IOError</a> </code> &mdash; The stream could not be closed, or
     the stream was not open.</td></tr></table><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          In the following example, when the user clicks on the Stop button,
 the
          <code>Sound.close()</code>
          method will be called and the sound will stop streaming.
          <p>
            In the constructor, a text field is created for the Start and Stop button. 
 When the user clicks on the text field, the
            <code>clickHandler()</code>
            method is invoked.
 It handles the starting and stopping of the sound file. Note that depending on 
 the network connection or when the user clicks the Stop button, much of the file could 
 already have been loaded and it may take a while for the sound file to stop playing. 
 A
            <code>try...catch</code>
            block is used to catch any IO error that may occur while 
 closing the stream. For example, if the sound is loaded from a local directory and 
 not streamed, error 2029 is caught, stating, "This URLStream object does not have an open stream."
          </p>
          
          <div class="listing"><pre>package {
    import flash.display.Sprite;
    import flash.net.URLRequest;
    import flash.media.Sound;    
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.events.MouseEvent;
    import flash.errors.IOError;
    import flash.events.IOErrorEvent;

    public class Sound_closeExample extends Sprite {
        private var snd:Sound = new Sound();
        private var button:TextField = new TextField();
        private var req:URLRequest = new URLRequest("http://av.adobe.com/podcast/csbu_dev_podcast_epi_2.mp3");
        
        public function Sound_closeExample() {
            button.x = 10;
            button.y = 10;
            button.text = "START";
            button.border = true;
            button.background = true;
            button.selectable = false;
            button.autoSize = TextFieldAutoSize.LEFT;

            button.addEventListener(MouseEvent.CLICK, clickHandler);

            this.addChild(button);
        }

        private function clickHandler(e:MouseEvent):void {

            if(button.text == "START") {

                snd.load(req);
                snd.play();        

                snd.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);

                button.text = "STOP";
            }
            else if(button.text == "STOP") {
                    
                try {
                    snd.close();
                    button.text = "Wait for loaded stream to finish.";
                }
                catch (error:IOError) {
                    button.text = "Couldn't close stream " + error.message;    
                }
            }
        }
        
        private function errorHandler(event:IOErrorEvent):void {
                button.text = "Couldn't load the file " + event.text;
        }
    }
}</pre></div>
        </div></div><a name="extract()"></a><a name="extract(flash.utils.ByteArray,Number,Number)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">extract</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function extract(target:<a href="../../flash/utils/ByteArray.html">ByteArray</a>, length:<a href="../../Number.html">Number</a>, startPosition:<a href="../../Number.html">Number</a> = -1):<a href="../../Number.html">Number</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>
          Extracts raw sound data from a Sound object.
          <p>
            This method is designed to be used when you are working 
      with dynamically generated audio, using a function you assign
      to the
            <code>sampleData</code>
            event for a different Sound object. 
      That is, you can use this method to extract sound data from a Sound object.
      Then you can write the data to the byte array that another Sound object is using
      to stream dynamic audio.
          </p>
          
          <p>
            The audio data is placed in the target byte array starting from the current position of the byte array.
      The audio data is always exposed as 44100 Hz Stereo. The sample type is a 32-bit floating-point value,
      which can be converted to a Number using
            <code>ByteArray.readFloat()</code>
            .
          </p>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">target</span>:<a href="../../flash/utils/ByteArray.html">ByteArray</a></code> &mdash; A ByteArray object in which the extracted sound samples are placed.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">length</span>:<a href="../../Number.html">Number</a></code> &mdash; The number of sound samples to extract. 
      A sample contains both the left and right channels &mdash; that is, two 32-bit floating-point values.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">startPosition</span>:<a href="../../Number.html">Number</a></code> (default = <code>-1</code>)<code></code> &mdash; 
              The sample at which extraction begins.
          If you don't specify a value, the first call to
              <code>Sound.extract()</code>
              starts at the beginning
          of the sound; subsequent calls without a value for
              <code>startPosition</code>
              progress sequentially through the file.
            </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../Number.html">Number</a></code> &mdash; The number of samples that are available in the Sound object.</td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="Sound.html#play()" target="">play()</a><br/><a href="Sound.html#event:sampleData" target="">sampleData</a></div><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example loads an mp3 file and uses the
          <code>extract()</code>
          method of the Sound class to access the audio data.
          <p>
            The mp3 data is loaded into the
            <code>sourceSnd</code>
            Sound object. When the
 application loads the mp3 data, it calls the
            <code>loaded()</code>
            function
 (the event handler for the
            <code>complete</code>
            event of the
            <code>sourceSnd</code>
            object). A second Sound object,
            <code>outputSound</code>
            , is used to play the 
 modified audio. The
            <code>outputSound</code>
            object has a
            <code>sampleData</code>
            event listener; so the object dispatches periodical
            <code>sampleData</code>
            events
 once you call the
            <code>play()</code>
            method of the object. 
 The
            <code>upOctave()</code>
            method returns a byte array of modified audio data
 based on the source audio data. It returns audio that is one octave higher by 
 skipping over every other audio sample in the source data. The event handler for 
 the
            <code>sampleData</code>
            event writes the returned byte array to the
            <code>data</code>
            property of the
            <code>outputSound</code>
            object. The
            <code>data</code>
            byte array is 
 appended to the output audio data for the
            <code>outputSound</code>
            object.
          </p>
          
          <p>To test this example, add a test.mp3 file to the same directory as the SWF file.</p>
          
          <div class="listing"><pre>var sourceSnd:Sound = new Sound();
var outputSnd:Sound = new Sound();
var urlReq:URLRequest = new URLRequest("test.mp3");

sourceSnd.load(urlReq);
sourceSnd.addEventListener(Event.COMPLETE, loaded);

function loaded(event:Event):void
{
    outputSnd.addEventListener(SampleDataEvent.SAMPLE_DATA, processSound);
    outputSnd.play();
}

function processSound(event:SampleDataEvent):void
{
    var bytes:ByteArray = new ByteArray();
    sourceSnd.extract(bytes, 4096);
    event.data.writeBytes(upOctave(bytes));
}

function upOctave(bytes:ByteArray):ByteArray
{
    var returnBytes:ByteArray = new ByteArray();
    bytes.position = 0;
    while(bytes.bytesAvailable &gt; 0)
    {
        returnBytes.writeFloat(bytes.readFloat());
        returnBytes.writeFloat(bytes.readFloat());
        if (bytes.bytesAvailable &gt; 0)
        {
            bytes.position += 8;
        }
    }
    return returnBytes;
}</pre></div>
        </div></div><a name="load()"></a><a name="load(flash.net.URLRequest,flash.media.SoundLoaderContext)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">load</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function load(stream:<a href="../../flash/net/URLRequest.html">URLRequest</a>, context:<a href="../../flash/media/SoundLoaderContext.html">SoundLoaderContext</a> = null):<a href="../../specialTypes.html#void">void</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>AIR 1.0, Flash Player 9</td></tr></table><p></p><p></p><p>
          Initiates loading of an external MP3 file from the specified URL. If you provide
     a valid URLRequest object to the Sound constructor, the constructor calls
          <code>Sound.load()</code>
          for you. You only need to call
          <code>Sound.load()</code>
          yourself if you
     don't pass a valid URLRequest object to the Sound constructor or you pass a
          <code>null</code>
          value.
          <p>
            Once
            <code>load()</code>
            is called on a Sound object, you can't later load 
     a different sound file into that Sound object. To load a different sound file,
     create a new Sound object.
          </p>
          When using this method, consider the following security model:
          <ul><li>
              Calling
              <code>Sound.load()</code>
              is not allowed if the calling file is in the 
     local-with-file-system sandbox and the sound is in a network sandbox.
            </li><li>Access from the local-trusted or local-with-networking sandbox requires permission 
     from a website through a URL policy file.</li><li>
              You cannot connect to commonly reserved ports. For a complete list of blocked
     ports, see "Restricting Networking APIs" in the
              
              
              <span>
                
                <a href="http://www.adobe.com/go/flashcs4_prog_as3_security_en" target="external">security chapter</a>
                
              </span>
              of the
              <i>Programming ActionScript 3.0</i>
              book.
            </li><li>
              You can prevent a SWF file from using this method by setting the
              <code>allowNetworking</code>
              parameter of the
              <code>object</code>
              and
              <code>embed</code>
              tags in the HTML page that contains the SWF content.
            </li></ul>
          
          <p>In Flash Player 10 and later, if you use a multipart Content-Type (for example "multipart/form-data") 
  that contains an upload (indicated by a "filename" parameter in a "content-disposition" header within the POST body),
  the POST operation is subject to the security rules applied to uploads:</p>
          
          <ul><li>The POST operation must be performed in response to a user-initiated action, such as a mouse click or key press.</li><li>If the POST operation is cross-domain (the POST target is not on the same server as the SWF file 
  that is sending the POST request),
  the target server must provide a URL policy file that permits cross-domain access.</li></ul>
          
          <p>Also, for any multipart Content-Type, the syntax must be valid (according to the RFC2046 standards).
     If the syntax appears to be invalid, the POST operation is subject to the security rules applied to uploads.</p>
          
          <p>
            In Adobe AIR, content in the
            <code>application</code>
            security sandbox (content
     installed with the AIR application) are not restricted by these security limitations.
          </p>
          
          <p>For more security-related information, see the following:</p>
          
          <ul><li>
              The
              <a href="http://www.adobe.com/go/flashcs4_prog_as3_security_en" target="external">security chapter</a>
              in the
              <i>Programming ActionScript 3.0</i>
              book and the latest comments on LiveDocs
            </li><li>
              The "Understanding AIR Security" section of the "Getting started with Adobe AIR" chapter in the
              <i>Developing AIR Applications</i>
              book.
            </li><li>
              The Flash Player Developer Center Topic:
              <a href="http://www.adobe.com/go/devnet_security_en" target="external">Security</a>
            </li></ul>
          
        </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">stream</span>:<a href="../../flash/net/URLRequest.html">URLRequest</a></code> &mdash; A URL that points to an external MP3 file.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">context</span>:<a href="../../flash/media/SoundLoaderContext.html">SoundLoaderContext</a></code> (default = <code>null</code>)<code></code> &mdash; An optional SoundLoader context object, which can define the buffer time 
  (the minimum number of milliseconds of MP3 data to hold in the Sound object's 
  buffer) and can specify whether the application should check for a cross-domain
  policy file prior to loading the sound.</td></tr></table></p><br/><span class="label">Throws</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../flash/errors/IOError.html">IOError</a> </code> &mdash; A network error caused the load to fail.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20"></td><td><code><a href="../../SecurityError.html">SecurityError</a> </code> &mdash; 
              Local untrusted files may not communicate with
     the Internet. You can work around this by reclassifying this file
     as
              <span>local-with-networking or</span>
              trusted.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20"></td><td><code><a href="../../SecurityError.html">SecurityError</a> </code> &mdash; 
              If you are trying to connect to a commonly reserved port. 
      For a complete list of blocked ports, see "Restricting Networking APIs" in the 
      security chapter of the
              <i>Programming ActionScript 3.0</i>
              book.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20"></td><td><code><a href="../../flash/errors/IOError.html">IOError</a> </code> &mdash; 
              The
              <code>digest</code>
              property of the
              <code>stream</code>
              object is not
              <code>null</code>
              . You should only set the
              <code>digest</code>
              property of a URLRequest object
     when calling the
              <code>URLLoader.load()</code>
              method when loading a SWZ file (an Adobe 
     platform component).
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20"></td><td><code><a href="../../SecurityError.html">SecurityError</a> </code> &mdash; 
              If you are trying to connect to a commonly reserved port. 
      For a complete list of blocked ports, see "Restricting Networking APIs" in the 
      security chapter of the
              <i>Programming ActionScript 3.0</i>
              book.
            </td></tr></table><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example displays the loading progress of a sound file.
          <p>
            In the constructor a
            <code>URLRequest</code>
            object is created to identify the location 
 of the sound file, which is a podcast from Adobe. The file is loaded in a
            <code>try...catch</code>
            block in order to catch any error that may occur while loading the file. If an IO error 
 occurred, the
            <code>errorHandler()</code>
            method also is invoked and the error message 
 is written in the text field intended for the progress report. While a load operation is in 
 progress, a
            <code>ProgressEvent.PROGRESS</code>
            event is dispatched and the
            <code>progressHandler()</code>
            method is called. Here,
            <code>ProgressEvent.PROGRESS</code>
            event is used as a timer for 
 calculating the load progress.
          </p>
          
          <p>
            The
            <code>progressHandler()</code>
            method divides the
            <code>bytesLoaded</code>
            value 
 passed with the
            <code>ProgressEvent</code>
            object by the
            <code>bytesTotal</code>
            value to 
 arrive at a percentage of the sound data that is being loaded. It then displays these values 
 in the text field. (Note that if the file is small, cached, or the file is in the local directory, 
 the progress may not be noticeable.)
          </p>
          
          <div class="listing"><pre>package {
    import flash.display.Sprite;
    import flash.net.URLRequest;
    import flash.media.Sound;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.events.ProgressEvent;
    import flash.events.IOErrorEvent;
    
    public class Sound_loadExample extends Sprite {
        private var snd:Sound = new Sound();
        private var statusTextField:TextField  = new TextField();

        public function Sound_loadExample(){

            statusTextField.autoSize = TextFieldAutoSize.LEFT;
            var req:URLRequest = new URLRequest("http://av.adobe.com/podcast/csbu_dev_podcast_epi_2.mp3");
            
            try {
            snd.load(req);
            
            snd.play();
            }
            catch (err:Error) {
                trace(err.message);
            }
 
            snd.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
            snd.addEventListener(ProgressEvent.PROGRESS, progressHandler);
                     
            this.addChild(statusTextField);
        }
    
        private function progressHandler(event:ProgressEvent):void {
            var loadTime:Number = event.bytesLoaded / event.bytesTotal;
            var LoadPercent:uint = Math.round(100 * loadTime);
              
            statusTextField.text = "Sound file's size in bytes: " + event.bytesTotal + "\n" 
                                 + "Bytes being loaded: " + event.bytesLoaded + "\n" 
                                 + "Percentage of sound file that is loaded " + LoadPercent + "%.\n";
        }
 
        private function errorHandler(errorEvent:IOErrorEvent):void {
            statusTextField.text = "The sound could not be loaded: " + errorEvent.text;
        }
    }
}</pre></div>
        </div></div><a name="play()"></a><a name="play(Number,int,flash.media.SoundTransform)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">play</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function play(startTime:<a href="../../Number.html">Number</a> = 0, loops:<a href="../../int.html">int</a> = 0, sndTransform:<a href="../../flash/media/SoundTransform.html">SoundTransform</a> = null):<a href="../../flash/media/SoundChannel.html">SoundChannel</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>Generates a new SoundChannel object to play back the sound. This method
     returns a SoundChannel object, which you access to stop the sound and to monitor volume. 
     (To control the volume, panning, and balance, access the SoundTransform object assigned
     to the sound channel.)</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">startTime</span>:<a href="../../Number.html">Number</a></code> (default = <code>0</code>)<code></code> &mdash; The initial position in milliseconds at which playback should 
     start.</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">loops</span>:<a href="../../int.html">int</a></code> (default = <code>0</code>)<code></code> &mdash; 
              Defines the number of times a sound loops back to the
              <code>startTime</code>
              value
     before the sound channel stops playback.
            </td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">sndTransform</span>:<a href="../../flash/media/SoundTransform.html">SoundTransform</a></code> (default = <code>null</code>)<code></code> &mdash; The initial SoundTransform object assigned to the sound channel.</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../flash/media/SoundChannel.html">SoundChannel</a></code> &mdash; 
              A SoundChannel object, which you use to control the sound. 
     This method returns
              <code>null</code>
              if you have no sound card 
     or if you run out of available sound channels. The maximum number of 
     sound channels available at once is 32.
            </td></tr></table><p><span class="label">See also</span></p><div class="seeAlso"><a href="SoundChannel.html#stop()" target="">SoundChannel.stop()</a><br/><a href="SoundMixer.html#stopAll()" target="">SoundMixer.stopAll()</a></div><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          In the following example, once the file is loaded, the user using a
 graphic bar can select the starting position (starting time) of the sound file.
          <p>
            The constructor calls the
            <code>Sound.load()</code>
            method to start loading the sound data. 
 Next it calls the
            <code>Sound.play()</code>
            method which will start playing the sound as soon 
 as enough data has loaded. The
            <code>Sound.play()</code>
            method returns a SoundChannel object 
 that can be used to control the playback of the sound. The text field displays the instructions. 
 To make sure the content of where the user wants the sound to start, has already been loaded, 
 the
            <code>bar</code>
            Sprite object is created and displayed after the file has finished loading. 
 An
            <code>Event.COMPLETE</code>
            event is dispatched when the file is successfully loaded, which 
 triggers the
            <code>completeHandler()</code>
            method. The
            <code>completeHandler()</code>
            method 
 then creates the bar and adds it to the display list. (A sprite object is used instead of a shape 
 object to support interactivity.) When the user clicks on the bar, the
            <code>clickHandler()</code>
            method is triggered.
          </p>
          
          <p>
            In the
            <code>clickHandler()</code>
            method, the position of x coordinate of the user's click,
            <code>event.localX</code>
            , is used to determine where the user wants the file to start. 
 Since the bar is 100 pixels and it starts at x coordinate 100 pixels, it is easy to determine 
 the percentage of the position. Also, since the file is loaded, the
            <code>length</code>
            property of the sound file will have the length of the complete file in milliseconds. 
 Using the length of the sound file and the position in the line, a starting position 
 for the sound file is determined. After stopping the sound from playing, the sound file 
 restarts at the selected starting position, which is past as the
            <code>startTime</code>
            parameter to the
            <code>play()</code>
            method.
          </p>
          
          <div class="listing"><pre>package {
    import flash.display.Sprite;
    import flash.display.Graphics;
    import flash.events.MouseEvent;
    import flash.media.Sound;;
    import flash.net.URLRequest;
    import flash.media.SoundChannel;
    import flash.events.ProgressEvent;
    import flash.events.Event;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.events.IOErrorEvent;
    
    public class Sound_playExample1 extends Sprite {
        private var snd:Sound = new Sound();
        private var channel:SoundChannel = new SoundChannel();
        private var infoTextField:TextField = new TextField();
    
        public function Sound_playExample1() {

            var req:URLRequest = new URLRequest("MySound.mp3");
            
            infoTextField.autoSize = TextFieldAutoSize.LEFT;
            infoTextField.text = "Please wait for the file to be loaded.\n" 
                                + "Then select from the bar to decide where the file should start.";
            
            snd.load(req);               
            channel = snd.play();

            snd.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
            snd.addEventListener(Event.COMPLETE, completeHandler);


            this.addChild(infoTextField);
        }

        private function completeHandler(event:Event):void {                
            infoTextField.text = "File is ready.";

            var bar:Sprite = new Sprite();

            bar.graphics.lineStyle(5, 0xFF0000);
            bar.graphics.moveTo(100, 100);
            bar.graphics.lineTo(200, 100);

            bar.addEventListener(MouseEvent.CLICK, clickHandler);

            this.addChild(bar);
        }
    
        private function clickHandler(event:MouseEvent):void {
            
                var position:uint = event.localX;
                var percent:uint = Math.round(position) - 100;   
                var cue:uint = (percent / 100) * snd.length;

                channel.stop();
                channel = snd.play(cue);    
        }

        private function errorHandler(errorEvent:IOErrorEvent):void {
            infoTextField.text = "The sound could not be loaded: " + errorEvent.text;
        }
    }
}</pre></div>
        </div><br/><div class="detailBody">
          In the following example, depending on whether the user single or double clicks on
 a button the sound will play once or twice.
          <p>
            In the constructor, the sound is loaded and a simple rectangle
            <code>button</code>
            sprite object 
 is created. (A sprite object is used instead of a shape object to support interactivity.)
 Here, it is assumed that the sound file is in the same directory as the SWF file. (There 
 is no error handling code for this example.)
          </p>
          
          <p>
            Two event listeners are set up to respond to single mouse clicks and double clicks.
 If the user clicks once, the
            <code>clickHandler()</code>
            method is invoked, which plays the sound. 
 If the user double clicks on the button, the
            <code>doubleClickHandler()</code>
            method is invoked, 
 which will play the sound file twice. The second argument of the
            <code>play()</code>
            method is set 
 to
            <code>1</code>
            , which means the sound will loop back once to the starting time of the 
 sound and play again. The starting time, first argument, is set to
            <code>0</code>
            , meaning 
 the file will play from the beginning.
          </p>
          
          <div class="listing"><pre>package {
    import flash.display.Sprite;
    import flash.events.MouseEvent;
    import flash.media.Sound;
    import flash.net.URLRequest;

    public class Sound_playExample2 extends Sprite {
        private var button:Sprite = new Sprite(); 
        private var snd:Sound = new Sound();
            
        public function Sound_playExample2() {

            var req:URLRequest = new URLRequest("click.mp3");
            snd.load(req);               
     
            button.graphics.beginFill(0x00FF00);
            button.graphics.drawRect(10, 10, 50, 30);
            button.graphics.endFill();
     
            button.addEventListener(MouseEvent.CLICK, clickHandler);
            button.addEventListener(MouseEvent.DOUBLE_CLICK, doubleClickHandler);
     
            this.addChild(button);
        }

        private function clickHandler(event:MouseEvent):void {
            snd.play();            
        }

        private function doubleClickHandler(event:MouseEvent):void {
            snd.play(0, 2);        
        }
    }
}</pre></div>
        </div><br/><div class="detailBody">
          The following example displays the loading and playing progress of a sound file.
          <p>
            In the constructor, the file is loaded in a
            <code>try...catch</code>
            block in order to catch 
 any error that may occur while loading the file. A listener is added to the sound object that 
 will respond to an
            <code>IOErrorEvent</code>
            event by calling the
            <code>errorHandler()</code>
            method. 
 Another listener is added for the main application that will respond to an
            <code>Event.ENTER_FRAME</code>
            event, which is used as the timing mechanism for showing playback progress. Finally, a third listener
 is added for the sound channel that will respond to an
            <code>Event.SOUND_COMPLETE</code>
            event (when
 the sound has finished playing), by calling the
            <code>soundCompleteHandler()</code>
            method.
 The
            <code>soundCompleteHandler()</code>
            method also removes the event listener for the
            <code>Event.ENTER_FRAME</code>
            event.
          </p>
          
          <p>
            The
            <code>enterFrameHandler()</code>
            method divides the
            <code>bytesLoaded</code>
            value 
 passed with the
            <code>ProgressEvent</code>
            object by the
            <code>bytesTotal</code>
            value to 
 arrive at a percentage of the sound data that is being loaded. The percentage of sound data that is 
 being played could be determined by dividing the value of sound channel's
            <code>position</code>
            property
 by the length of the sound data. However, if the sound data is not fully loaded, the
            <code>length</code>
            property of the sound object shows only the size of the sound data that is currently loaded.
 An estimate of the eventual size of the full sound file is calculated by dividing the value 
 of the current sound object's
            <code>length</code>
            by the value of the
            <code>bytesLoaded</code>
            property divided by the value of the
            <code>bytesTotal</code>
            property.
          </p>
          
          <p>
            Note that if the file is small, cached, or the file is in the local directory, the load progress 
 may not be noticeable. Also the lag time between when the sound data starts loading and the loaded 
 data starts playing is determined by the value of the
            <code>SoundLoaderContext.buffertime</code>
            property, which is by default 1000 milliseconds and can be reset.
          </p>
          
          <div class="listing"><pre>package {
    import flash.display.Sprite;
    import flash.net.URLRequest;
    import flash.media.Sound;
    import flash.media.SoundChannel;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.events.Event;
    import flash.events.IOErrorEvent;
    
    public class Sound_playExample3 extends Sprite {
        private var snd:Sound = new Sound();
        private var channel:SoundChannel;
        private var statusTextField:TextField  = new TextField();

        public function Sound_playExample3(){

            statusTextField.autoSize = TextFieldAutoSize.LEFT;

           var req:URLRequest = new URLRequest("http://av.adobe.com/podcast/csbu_dev_podcast_epi_2.mp3");
            
            try {
                snd.load(req);
            
                channel = snd.play();
            }
            catch (err:Error) {
                trace(err.message);
            }
                    
            snd.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
            addEventListener(Event.ENTER_FRAME, enterFrameHandler);
            channel.addEventListener(Event.SOUND_COMPLETE, soundCompleteHandler);
                    
            this.addChild(statusTextField);
        }
    
        private function enterFrameHandler(event:Event):void {    
            var loadTime:Number = snd.bytesLoaded / snd.bytesTotal;
            var loadPercent:uint = Math.round(100 * loadTime);
            var estimatedLength:int = Math.ceil(snd.length / (loadTime));
            var playbackPercent:uint = Math.round(100 * (channel.position / estimatedLength));
      
            statusTextField.text = "Sound file's size is " + snd.bytesTotal + " bytes.\n" 
                                   + "Bytes being loaded: " + snd.bytesLoaded + "\n" 
                                   + "Percentage of sound file that is loaded " + loadPercent + "%.\n"
                                   + "Sound playback is " + playbackPercent + "% complete.";     
        }
 
        private function errorHandler(errorEvent:IOErrorEvent):void {
            statusTextField.text = "The sound could not be loaded: " + errorEvent.text;
        }

        private function soundCompleteHandler(event:Event):void {
            statusTextField.text = "The sound has finished playing.";
            removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
        }
    }
}</pre></div>
        </div></div><div class="detailSectionHeader"> Event Detail </div><a name="event:complete"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">complete</td><td class="detailHeaderType"> Event </td></tr></table><div class="detailBody"><span class="label">Event Object Type: </span><a href="../../flash/events/Event.html"><code>flash.events.Event</code></a><br/><span class="label">property Event.type  =  </span><a href="../../flash/events/Event.html#COMPLETE"><code>flash.events.Event.COMPLETE</code></a><br/><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>Dispatched when data has loaded successfully.</p>
          The
          <code>Event.COMPLETE</code>
          constant defines the value of the
          <code>type</code>
          property of a
          <code>complete</code>
          event object.
          <p>This event has the following properties:</p>
          
          <table class="innertable" ><tr><th>Property</th><th>Value</th></tr><tr><td>
                    <code>bubbles</code>
                  </td><td>
                    <code>false</code>
                  </td></tr><tr><td>
                    <code>cancelable</code>
                  </td><td>
                    <code>false</code>
                    ; there is no default behavior to cancel.
                  </td></tr><tr><td>
                    <code>currentTarget</code>
                  </td><td>The object that is actively processing the Event 
 object with an event listener.</td></tr><tr><td>
                    <code>target</code>
                  </td><td>The network object that has completed loading.</td></tr></table>
          
        <p><span class="label">See also</span></p><div class="seeAlso"><a href="Sound.html#load()" target="">load()</a></div></div><a name="event:id3"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">id3</td><td class="detailHeaderType"> Event </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Event Object Type: </span><a href="../../flash/events/Event.html"><code>flash.events.Event</code></a><br/><span class="label">property Event.type  =  </span><a href="../../flash/events/Event.html#ID3"><code>flash.events.Event.ID3</code></a><br/><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>Dispatched by a Sound object when ID3 data is available for an MP3 sound.</p>
          The
          <code>Event.ID3</code>
          constant defines the value of the
          <code>type</code>
          property of an
          <code>id3</code>
          event object.
          <p>This event has the following properties:</p>
          
          <table class="innertable" ><tr><th>Property</th><th>Value</th></tr><tr><td>
                    <code>bubbles</code>
                  </td><td>
                    <code>false</code>
                  </td></tr><tr><td>
                    <code>cancelable</code>
                  </td><td>
                    <code>false</code>
                    ; there is no default behavior to cancel.
                  </td></tr><tr><td>
                    <code>currentTarget</code>
                  </td><td>The object that is actively processing the Event 
 object with an event listener.</td></tr><tr><td>
                    <code>target</code>
                  </td><td>
                    The Sound object loading the MP3 for which ID3 data is now available. 
 The
                    <code>target</code>
                    is not always the object in the display list 
 that registered the event listener. Use the
                    <code>currentTarget</code>
                    property to access the object in the display list that is currently processing the event.
                  </td></tr></table>
          
        <p><span class="label">See also</span></p><div class="seeAlso"><a href="Sound.html#id3" target="">Sound.id3</a></div></div><a name="event:ioError"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">ioError</td><td class="detailHeaderType"> Event </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Event Object Type: </span><a href="../../flash/events/IOErrorEvent.html"><code>flash.events.IOErrorEvent</code></a><br/><span class="label">property IOErrorEvent.type  =  </span><a href="../../flash/events/IOErrorEvent.html#IO_ERROR"><code>flash.events.IOErrorEvent.IO_ERROR</code></a><br/><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>Dispatched when an input/output error occurs that causes a load operation to fail.</p>
          Defines the value of the
          <code>type</code>
          property of an
          <code>ioError</code>
          event object.
          <p>This event has the following properties:</p>
          
          <table class="innertable" ><tr><th>Property</th><th>Value</th></tr><tr><td>
                    <code>bubbles</code>
                  </td><td>
                    <code>false</code>
                  </td></tr><tr><td>
                    <code>cancelable</code>
                  </td><td>
                    <code>false</code>
                    ; there is no default behavior to cancel.
                  </td></tr><tr><td>
                    <code>currentTarget</code>
                  </td><td>The object that is actively processing the Event 
 object with an event listener.</td></tr><tr><td>
                    <code>errorID</code>
                  </td><td>A reference number associated with the specific error (AIR only).</td></tr><tr><td>
                    <code>target</code>
                  </td><td>The network object experiencing the input/output error.</td></tr><tr><td>
                    <code>text</code>
                  </td><td>Text to be displayed as an error message.</td></tr></table>
          
        <p><span class="label">See also</span></p><div class="seeAlso"><a href="Sound.html#load()" target="">load()</a></div></div><a name="event:open"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">open</td><td class="detailHeaderType"> Event </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Event Object Type: </span><a href="../../flash/events/Event.html"><code>flash.events.Event</code></a><br/><span class="label">property Event.type  =  </span><a href="../../flash/events/Event.html#OPEN"><code>flash.events.Event.OPEN</code></a><br/><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>Dispatched when a load operation starts.</p>
          The
          <code>Event.OPEN</code>
          constant defines the value of the
          <code>type</code>
          property of an
          <code>open</code>
          event object.
          <p>This event has the following properties:</p>
          
          <table class="innertable" ><tr><th>Property</th><th>Value</th></tr><tr><td>
                    <code>bubbles</code>
                  </td><td>
                    <code>false</code>
                  </td></tr><tr><td>
                    <code>cancelable</code>
                  </td><td>
                    <code>false</code>
                    ; there is no default behavior to cancel.
                  </td></tr><tr><td>
                    <code>currentTarget</code>
                  </td><td>The object that is actively processing the Event 
 object with an event listener.</td></tr><tr><td>
                    <code>target</code>
                  </td><td>The network object that has opened a connection.</td></tr></table>
          
        <p><span class="label">See also</span></p><div class="seeAlso"><a href="Sound.html#load()" target="">load()</a></div></div><a name="event:progress"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">progress</td><td class="detailHeaderType"> Event </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Event Object Type: </span><a href="../../flash/events/ProgressEvent.html"><code>flash.events.ProgressEvent</code></a><br/><span class="label">property ProgressEvent.type  =  </span><a href="../../flash/events/ProgressEvent.html#PROGRESS"><code>flash.events.ProgressEvent.PROGRESS</code></a><br/><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>Dispatched when data is received as a load operation progresses.</p>
          Defines the value of the
          <code>type</code>
          property of a
          <code>progress</code>
          event object.
          <p>This event has the following properties:</p>
          
          <table class="innertable" ><tr><th>Property</th><th>Value</th></tr><tr><td>
                    <code>bubbles</code>
                  </td><td>
                    <code>false</code>
                  </td></tr><tr><td>
                    <code>bytesLoaded</code>
                  </td><td>The number of items or bytes loaded at the time the listener processes the event.</td></tr><tr><td>
                    <code>bytesTotal</code>
                  </td><td>The total number of items or bytes that ultimately will  be loaded if the loading process succeeds.</td></tr><tr><td>
                    <code>cancelable</code>
                  </td><td>
                    <code>false</code>
                    ; there is no default behavior to cancel.
                  </td></tr><tr><td>
                    <code>currentTarget</code>
                  </td><td>The object that is actively processing the Event 
 object with an event listener.</td></tr><tr><td>
                    <code>target</code>
                  </td><td>The object reporting progress.</td></tr></table>
          
        <p><span class="label">See also</span></p><div class="seeAlso"><a href="Sound.html#load()" target="">load()</a></div></div><a name="event:sampleData"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">sampleData</td><td class="detailHeaderType"> Event </td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><span class="label">Event Object Type: </span><a href="../../flash/events/SampleDataEvent.html"><code>flash.events.SampleDataEvent</code></a><br/><span class="label">property SampleDataEvent.type  =  </span><a href="../../flash/events/Event.html#SAMPLE_DATA"><code>flash.events.Event.SAMPLE_DATA</code></a><br/><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Language Version:&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b>Runtime Versions:&nbsp;</b></td><td>Flash Player 10, AIR 1.5</td></tr></table><p></p><p></p><p>Dispatched when the player requests new audio data.</p><br/><span class="label"> Example </span><br/><br/><div class="detailBody">
          The following example plays a simple sine wave.
          <div class="listing"><pre>var mySound:Sound = new Sound();
function sineWaveGenerator(event:SampleDataEvent):void {
    for ( var c:int=0; c&lt;8192; c++ ) {
        event.data.writeFloat(Math.sin((Number(c+event.position)/Math.PI/2))*0.25);
        event.data.writeFloat(Math.sin((Number(c+event.position)/Math.PI/2))*0.25);
    }
}

mySound.addEventListener(Event.SAMPLE_DATA,sineWaveGenerator);
mySound.play();</pre></div>
        </div><p><span class="label">See also</span></p><div class="seeAlso"><a href="Sound.html#extract()" target="">extract()</a><br/><a href="Sound.html#play()" target="">play()</a><br/><a href="../../flash/events/SampleDataEvent.html" target="">flash.events.SampleDataEvent</a></div></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">SoundExample.as</div><br/><div class="detailBody">
        The following example displays 
 information about sound events that take place as an MP3 file is opened and played. To run this example, 
 place a file named MySound.mp3 in the same directory as your SWF file.
        <div class="listing"><pre>package {
    import flash.display.Sprite;
    import flash.events.*;
    import flash.media.Sound;
    import flash.media.SoundChannel;
    import flash.net.URLRequest;

    public class SoundExample extends Sprite {
        private var url:String = "MySound.mp3";
        private var song:SoundChannel;

        public function SoundExample() {
            var request:URLRequest = new URLRequest(url);
            var soundFactory:Sound = new Sound();
            soundFactory.addEventListener(Event.COMPLETE, completeHandler);
            soundFactory.addEventListener(Event.ID3, id3Handler);
            soundFactory.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
            soundFactory.addEventListener(ProgressEvent.PROGRESS, progressHandler);
            soundFactory.load(request);
            song = soundFactory.play();
        }

        private function completeHandler(event:Event):void {
            trace("completeHandler: " + event);
        }

        private function id3Handler(event:Event):void {
            trace("id3Handler: " + event);
        }

        private function ioErrorHandler(event:Event):void {
            trace("ioErrorHandler: " + event);
        }

        private function progressHandler(event:ProgressEvent):void {
            trace("progressHandler: " + event);
        }
    }
}</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">Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound Sound </div><div style="display:none">flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound flash.media.Sound </div></div></body></html><!-- &copy; 2004-2008 Adobe Systems Incorporated. All rights reserved. <br/>Thu Oct 30 2008, 07:08 PM -07:00  -->
