<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>*drawlogic &#187; sound</title>
	<atom:link href="http://drawlogic.com/tag/sound/feed/" rel="self" type="application/rss+xml" />
	<link>http://drawlogic.com</link>
	<description>interactive and game development technologies for the web - flash, flex, unity3d, silverlight, javascript</description>
	<lastBuildDate>Thu, 17 May 2012 13:12:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Director 11.5 Released with ByteArray Support</title>
		<link>http://drawlogic.com/2009/03/28/director-115-released-with-bytearray-support/</link>
		<comments>http://drawlogic.com/2009/03/28/director-115-released-with-bytearray-support/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 03:06:34 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[3D ENGINES]]></category>
		<category><![CDATA[ADOBE]]></category>
		<category><![CDATA[DEVELOPMENT]]></category>
		<category><![CDATA[DIRECTOR]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[GAMEDEV]]></category>
		<category><![CDATA[GAMES]]></category>
		<category><![CDATA[MARKET]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[unity3d]]></category>
		<category><![CDATA[bytearray]]></category>
		<category><![CDATA[NEWS]]></category>
		<category><![CDATA[sound]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://drawlogic.com/?p=500</guid>
		<description><![CDATA[ Director 11.5 was quietly released last week at GDC with a few nice upgrades. The sound library is updated to Dolby surround 5.1.  Director 11 now supports ByteArray and binary data handling.  It also states support for Flash 9 swfs. Previously Director 11 did not work well/atall with AS3/Flash 9 swfs which made it nearly useless. [...]]]></description>
			<content:encoded><![CDATA[<p> <img class="alignright" title="Director 11.5" src="http://i81.photobucket.com/albums/j223/drawkbox/director.png" alt="" width="206" height="114" /><strong><a href="http://www.adobe.com/products/director/upgrade/" target="_blank">Director 11.5 was quietly released</a> last week at GDC with a few nice upgrades.</strong></p>
<ul>
<li>The sound library is updated to Dolby surround 5.1. </li>
<li>Director 11 now supports ByteArray and binary data handling. </li>
<li>It also states support for Flash 9 swfs.  Previously Director 11 did not work well/atall with AS3/Flash 9 swfs which made it nearly useless.</li>
<li>Streaming support for audio and video with RTMP (red5, flash media server, etc)</li>
<li>Updated video support</li>
<li>Bitmap and audio filters for video</li>
</ul>
<p>I still think Director is on decline unless they open up the development platform, lose Lingo and allow a real IDE to develop with.  So frustrating being restrained to that IDE that is not very flexible and cumbersome to extend and code in when you compare it with cutting edge IDEs like Unity3D or open source flash IDEs like FlashDevelop. It has been completely removed from our workflow for some time due to new Flash 2.5D engines such as papervision 3d, away 3d and sandy or for more immersive hardware rendered 3d, unity3d. </p>
<p> </p>
<table style="text-align: left; " border="0">
<thead class="headerBlock">
<tr>
<th colspan="4" scope="row">Adobe Director version comparison chart</th>
</tr>
<tr>
<th class="ts" scope="col">Product features</th>
<th class="ts" scope="col">Director 11.5</th>
<th class="ts" scope="col">Director 11</th>
<th class="ts" scope="col">Director MX 2004</th>
</tr>
</thead>
<tbody class="stripe">
<tr>
<th scope="row"> Support for 5.1 surround sound</th>
<td class="yes">Yes</td>
<td class="no">No</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> Real-time audio mixing</th>
<td class="yes">Yes</td>
<td class="no">No</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> Audio effects and DSP filters</th>
<td class="yes">Yes</td>
<td class="no">No</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> H.264 MPEG-4, FLV, and F4V video support</th>
<td class="yes">Yes</td>
<td class="no">No</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> Streaming support for audio and video with RTMP</th>
<td class="yes">Yes</td>
<td class="no">No</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> Ability to apply audio filters on a video</th>
<td class="yes">Yes</td>
<td class="no">No</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> Ability to apply bitmap filters on a video</th>
<td class="yes">Yes</td>
<td class="no">No</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> Google SketchUp file import</th>
<td class="yes">Yes</td>
<td class="no">No</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> Enhanced physics engine with support for dynamic concave rigid bodies</th>
<td class="yes">Yes</td>
<td class="no">No</td>
<td class="no">No</td>
</tr>
</tbody>
<tbody class="stripe">
<tr>
<th scope="row"> ByteArray datatype for binary data handling</th>
<td class="yes">Yes</td>
<td class="no">No</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> Multiple undo/redo for text editors</th>
<td class="yes">Yes</td>
<td class="no">No</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> Text rendering and performance optimization</th>
<td class="yes">Yes</td>
<td class="no">No</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> Cross-domain policy support for Adobe Shockwave® Player</th>
<td class="yes">Yes</td>
<td class="no">No</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> Mac OS X Leopard support</th>
<td class="yes">Yes</td>
<td class="no">No</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> Unicode support</th>
<td class="yes">Yes</td>
<td class="yes">Yes</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> Microsoft DirectX 9 support</th>
<td class="yes">Yes</td>
<td class="yes">Yes</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> Advanced physics engine with included  NVIDIA®  PhysX™ support</th>
<td class="yes">Yes</td>
<td class="yes">Yes</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> JavaScript dictionary</th>
<td class="yes">Yes</td>
<td class="yes">Yes</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> Code snippets</th>
<td class="yes">Yes</td>
<td class="yes">Yes</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> Bitmap filters</th>
<td class="yes">Yes</td>
<td class="yes">Yes</td>
<td class="no">No</td>
</tr>
</tbody>
<tbody class="stripe">
<tr>
<th scope="row"> Microsoft® Windows Vista® support</th>
<td class="yes">Yes</td>
<td class="yes">Yes</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> Support for Intel® based Macs</th>
<td class="yes">Yes</td>
<td class="yes">Yes</td>
<td class="no">No</td>
</tr>
<tr>
<th scope="row"> Cross-platform projector publishing</th>
<td class="yes">Yes</td>
<td class="yes">Yes</td>
<td class="yes">Yes</td>
</tr>
<tr>
<th scope="row"> Web publishing with Adobe Shockwave Player</th>
<td class="yes">Yes</td>
<td class="yes">Yes</td>
<td class="yes">Yes</td>
</tr>
<tr>
<th scope="row"> Support for more than 40 video, audio, and image file formats, including SWF</th>
<td class="yes">Yes</td>
<td class="yes">Yes</td>
<td class="yes" style="text-align: left; ">Yes</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2009/03/28/director-115-released-with-bytearray-support/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>AS3 SoundManager Class for Flash Updated for Tweener</title>
		<link>http://drawlogic.com/2009/01/16/as3-soundmanager-class-for-flash-updated-for-tweener/</link>
		<comments>http://drawlogic.com/2009/01/16/as3-soundmanager-class-for-flash-updated-for-tweener/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 21:24:14 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[ACTIONSCRIPT3]]></category>
		<category><![CDATA[ARCHITECT]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[AUDIO]]></category>
		<category><![CDATA[DEVELOPMENT]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[GAMEDEV]]></category>
		<category><![CDATA[GAMES]]></category>
		<category><![CDATA[OPEN SOURCE]]></category>
		<category><![CDATA[PROGRAMMING]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[manager]]></category>
		<category><![CDATA[sound]]></category>
		<category><![CDATA[tweener]]></category>
		<category><![CDATA[tweenlite]]></category>

		<guid isPermaLink="false">http://drawlogic.com/?p=351</guid>
		<description><![CDATA[I use a SoundManager class for games and interactives that require it which I picked up at evolve by Matt Przybylski.  But I sometimes need to use Tweener rather than TweenLite depending on what the project uses already. So here is the class updated with Tweener.  Just grab the latest Tweener to work with this.  [...]]]></description>
			<content:encoded><![CDATA[<p>I use a SoundManager class for games and interactives that require it which I picked up at <a href="http://evolve.reintroducing.com/2008/07/15/news/as3-soundmanager/" target="_blank">evolve </a>by <span class="comment-author">Matt Przybylski</span>.  But I sometimes need to use Tweener rather than TweenLite depending on what the project uses already. So here is the class updated with Tweener.  Just grab the latest <a href="http://code.google.com/p/tweener/" target="_blank">Tweener </a>to work with this.  Sound is one of those things like tweening, it is easier to reuse code if everyone uses common libraries.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package game.<span style="color: #006600;">util</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> caurina.<span style="color: #006600;">transitions</span>.<span style="color: #006600;">properties</span>.<span style="color: #006600;">SoundShortcuts</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">media</span>.<span style="color: #0066CC;">Sound</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">media</span>.<span style="color: #006600;">SoundChannel</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">media</span>.<span style="color: #006600;">SoundLoaderContext</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">media</span>.<span style="color: #006600;">SoundTransform</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Dictionary</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">getQualifiedClassName</span>;
	<span style="color: #0066CC;">import</span> caurina.<span style="color: #006600;">transitions</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #808080; font-style: italic;">/**
	 * The SoundManager is a singleton that allows you to have various ways to control sounds in your project.
	 *
&nbsp;
	 * The SoundManager can load external or library sounds, pause/mute/stop/control volume for one or more sounds at a time,
	 * fade sounds up or down, and allows additional control to sounds not readily available through the default classes.
	 *
&nbsp;
	 * This class is dependent on TweenLite (http://www.tweenlite.com) to aid in easily fading the volume of the sound.
	 *
	 * @author Matt Przybylski [http://www.reintroducing.com]
	 * @version 1.0
	 *
	 * @author Ryan Christensen (http://drawlogic.com)
	 * @version 1.1 - added Tweener support and removed TweenLite support
	 */</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SoundManager
	<span style="color: #66cc66;">&#123;</span>
<span style="color: #808080; font-style: italic;">//- PRIVATE &amp;amp; PROTECTED VARIABLES -------------------------------------------------------------------------</span>
		<span style="color: #808080; font-style: italic;">// singleton instance</span>
		<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> _instance:SoundManager;
		<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> _allowInstance:<span style="color: #0066CC;">Boolean</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _soundsDict:Dictionary;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _sounds:<span style="color: #0066CC;">Array</span>;
<span style="color: #808080; font-style: italic;">//- PUBLIC &amp;amp; INTERNAL VARIABLES ---------------------------------------------------------------------------</span>
<span style="color: #808080; font-style: italic;">//- CONSTRUCTOR -------------------------------------------------------------------------------------------</span>
		<span style="color: #808080; font-style: italic;">// singleton instance of SoundManager</span>
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> getInstance<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:SoundManager
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>SoundManager._instance == <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				SoundManager._allowInstance = <span style="color: #000000; font-weight: bold;">true</span>;
				SoundManager._instance = <span style="color: #000000; font-weight: bold;">new</span> SoundManager<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
				SoundManager._allowInstance = <span style="color: #000000; font-weight: bold;">false</span>;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #b1b100;">return</span> SoundManager._instance;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> SoundManager<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">this</span>._soundsDict = <span style="color: #000000; font-weight: bold;">new</span> Dictionary<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">this</span>._sounds = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span>SoundManager._allowInstance<span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #0066CC;">throw</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Error</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Error: Use SoundManager.getInstance() instead of the new keyword.&quot;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">//- PRIVATE &amp;amp; PROTECTED METHODS ---------------------------------------------------------------------------</span>
<span style="color: #808080; font-style: italic;">//- PUBLIC &amp; INTERNAL METHODS -----------------------------------------------------------------------------</span>
		<span style="color: #808080; font-style: italic;">/**
		 * Adds a sound from the library to the sounds dictionary for playing in the future.
		 *
		 * @param $linkageID The class name of the library symbol that was exported for AS
		 * @param $name The string identifier of the sound to be used when calling other methods on the sound
		 *
		 * @return Boolean A boolean value representing if the sound was added successfully
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> addLibrarySound<span style="color: #66cc66;">&#40;</span>$linkageID:<span style="color: #66cc66;">*</span>, $name:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Boolean</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> <span style="color: #0066CC;">this</span>._sounds.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>._sounds<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">name</span> == $name<span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">false</span>;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #000000; font-weight: bold;">var</span> sndObj:<span style="color: #0066CC;">Object</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> snd:<span style="color: #0066CC;">Sound</span> = <span style="color: #000000; font-weight: bold;">new</span> $linkageID;
			sndObj.<span style="color: #0066CC;">name</span> = $name;
			sndObj.<span style="color: #0066CC;">sound</span> = snd;
			sndObj.<span style="color: #006600;">channel</span> = <span style="color: #000000; font-weight: bold;">new</span> SoundChannel<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			sndObj.<span style="color: #0066CC;">position</span> = <span style="color: #cc66cc;">0</span>;
			sndObj.<span style="color: #006600;">paused</span> = <span style="color: #000000; font-weight: bold;">true</span>;
			sndObj.<span style="color: #006600;">volume</span> = <span style="color: #cc66cc;">1</span>;
			sndObj.<span style="color: #006600;">startTime</span> = <span style="color: #cc66cc;">0</span>;
			sndObj.<span style="color: #006600;">loops</span> = <span style="color: #cc66cc;">0</span>;
			sndObj.<span style="color: #006600;">pausedByAll</span> = <span style="color: #000000; font-weight: bold;">false</span>;
			<span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>$name<span style="color: #66cc66;">&#93;</span> = sndObj;
			<span style="color: #0066CC;">this</span>._sounds.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>sndObj<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">/**
		 * Adds an external sound to the sounds dictionary for playing in the future.
		 *
		 * @param $path A string representing the path where the sound is on the server
		 * @param $name The string identifier of the sound to be used when calling other methods on the sound
		 * @param $buffer The number, in milliseconds, to buffer the sound before you can play it (default: 1000)
		 * @param $checkPolicyFile A boolean that determines whether Flash Player should try to download a cross-domain policy file from the loaded sound's server before beginning to load the sound (default: false)
		 *
		 * @return Boolean A boolean value representing if the sound was added successfully
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> addExternalSound<span style="color: #66cc66;">&#40;</span>$path:<span style="color: #0066CC;">String</span>, $name:<span style="color: #0066CC;">String</span>, $buffer:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">1000</span>, $checkPolicyFile:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Boolean</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> <span style="color: #0066CC;">this</span>._sounds.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>._sounds<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">name</span> == $name<span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">false</span>;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #000000; font-weight: bold;">var</span> sndObj:<span style="color: #0066CC;">Object</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> snd:<span style="color: #0066CC;">Sound</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Sound</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span>$path<span style="color: #66cc66;">&#41;</span>, <span style="color: #000000; font-weight: bold;">new</span> SoundLoaderContext<span style="color: #66cc66;">&#40;</span>$buffer, $checkPolicyFile<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
			sndObj.<span style="color: #0066CC;">name</span> = $name;
			sndObj.<span style="color: #0066CC;">sound</span> = snd;
			sndObj.<span style="color: #006600;">channel</span> = <span style="color: #000000; font-weight: bold;">new</span> SoundChannel<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			sndObj.<span style="color: #0066CC;">position</span> = <span style="color: #cc66cc;">0</span>;
			sndObj.<span style="color: #006600;">paused</span> = <span style="color: #000000; font-weight: bold;">true</span>;
			sndObj.<span style="color: #006600;">volume</span> = <span style="color: #cc66cc;">1</span>;
			sndObj.<span style="color: #006600;">startTime</span> = <span style="color: #cc66cc;">0</span>;
			sndObj.<span style="color: #006600;">loops</span> = <span style="color: #cc66cc;">0</span>;
			sndObj.<span style="color: #006600;">pausedByAll</span> = <span style="color: #000000; font-weight: bold;">false</span>;
			<span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>$name<span style="color: #66cc66;">&#93;</span> = sndObj;
			<span style="color: #0066CC;">this</span>._sounds.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>sndObj<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">/**
		 * Removes a sound from the sound dictionary.  After calling this, the sound will not be available until it is re-added.
		 *
		 * @param $name The string identifier of the sound to remove
		 *
		 * @return void
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> removeSound<span style="color: #66cc66;">&#40;</span>$name:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> <span style="color: #0066CC;">this</span>._sounds.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>._sounds<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">name</span> == $name<span style="color: #66cc66;">&#41;</span>
				<span style="color: #66cc66;">&#123;</span>
					<span style="color: #0066CC;">this</span>._sounds<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">null</span>;
					<span style="color: #0066CC;">this</span>._sounds.<span style="color: #0066CC;">splice</span><span style="color: #66cc66;">&#40;</span>i, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span>
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #0066CC;">delete</span> <span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>$name<span style="color: #66cc66;">&#93;</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">/**
		 * Removes all sounds from the sound dictionary.
		 *
		 * @return void
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> removeAllSounds<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&amp;</span>lt; <span style="color: #0066CC;">this</span>._sounds.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #0066CC;">this</span>._sounds<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">null</span>;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #0066CC;">this</span>._sounds = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">this</span>._soundsDict = <span style="color: #000000; font-weight: bold;">new</span> Dictionary<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">/**
		 * Plays or resumes a sound from the sound dictionary with the specified name.
		 *
		 * @param $name The string identifier of the sound to play
		 * @param $volume A number from 0 to 1 representing the volume at which to play the sound (default: 1)
		 * @param $startTime A number (in milliseconds) representing the time to start playing the sound at (default: 0)
		 * @param $loops An integer representing the number of times to loop the sound (default: 0)
		 *
		 * @return void
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> playSound<span style="color: #66cc66;">&#40;</span>$name:<span style="color: #0066CC;">String</span>, $volume:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">1</span>, $startTime:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>, $loops:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> snd:<span style="color: #0066CC;">Object</span> = <span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>$name<span style="color: #66cc66;">&#93;</span>;
			snd.<span style="color: #006600;">volume</span> = $volume;
			snd.<span style="color: #006600;">startTime</span> = $startTime;
			snd.<span style="color: #006600;">loops</span> = $loops;
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>snd.<span style="color: #006600;">paused</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				snd.<span style="color: #006600;">channel</span> = snd.<span style="color: #0066CC;">sound</span>.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span>snd.<span style="color: #0066CC;">position</span>, snd.<span style="color: #006600;">loops</span>, <span style="color: #000000; font-weight: bold;">new</span> SoundTransform<span style="color: #66cc66;">&#40;</span>snd.<span style="color: #006600;">volume</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #b1b100;">else</span>
			<span style="color: #66cc66;">&#123;</span>
				snd.<span style="color: #006600;">channel</span> = snd.<span style="color: #0066CC;">sound</span>.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span>$startTime, snd.<span style="color: #006600;">loops</span>, <span style="color: #000000; font-weight: bold;">new</span> SoundTransform<span style="color: #66cc66;">&#40;</span>snd.<span style="color: #006600;">volume</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
			snd.<span style="color: #006600;">paused</span> = <span style="color: #000000; font-weight: bold;">false</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">/**
		 * Stops the specified sound.
		 *
		 * @param $name The string identifier of the sound
		 *
		 * @return void
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> stopSound<span style="color: #66cc66;">&#40;</span>$name:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> snd:<span style="color: #0066CC;">Object</span> = <span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>$name<span style="color: #66cc66;">&#93;</span>;
			snd.<span style="color: #006600;">paused</span> = <span style="color: #000000; font-weight: bold;">true</span>;
			snd.<span style="color: #006600;">channel</span>.<span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			snd.<span style="color: #0066CC;">position</span> = snd.<span style="color: #006600;">channel</span>.<span style="color: #0066CC;">position</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">/**
		 * Pauses the specified sound.
		 *
		 * @param $name The string identifier of the sound
		 *
		 * @return void
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> pauseSound<span style="color: #66cc66;">&#40;</span>$name:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> snd:<span style="color: #0066CC;">Object</span> = <span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>$name<span style="color: #66cc66;">&#93;</span>;
			snd.<span style="color: #006600;">paused</span> = <span style="color: #000000; font-weight: bold;">true</span>;
			snd.<span style="color: #0066CC;">position</span> = snd.<span style="color: #006600;">channel</span>.<span style="color: #0066CC;">position</span>;
			snd.<span style="color: #006600;">channel</span>.<span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">/**
		 * Plays all the sounds that are in the sound dictionary.
		 *
		 * @param $useCurrentlyPlayingOnly A boolean that only plays the sounds which were currently playing before a pauseAllSounds() or stopAllSounds() call (default: false)
		 *
		 * @return void
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> playAllSounds<span style="color: #66cc66;">&#40;</span>$useCurrentlyPlayingOnly:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> <span style="color: #0066CC;">this</span>._sounds.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #000000; font-weight: bold;">var</span> id:<span style="color: #0066CC;">String</span> = <span style="color: #0066CC;">this</span>._sounds<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">name</span>;
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>$useCurrentlyPlayingOnly<span style="color: #66cc66;">&#41;</span>
				<span style="color: #66cc66;">&#123;</span>
					<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>id<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">pausedByAll</span><span style="color: #66cc66;">&#41;</span>
					<span style="color: #66cc66;">&#123;</span>
						<span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>id<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">pausedByAll</span> = <span style="color: #000000; font-weight: bold;">false</span>;
						<span style="color: #0066CC;">this</span>.<span style="color: #006600;">playSound</span><span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span>;
					<span style="color: #66cc66;">&#125;</span>
				<span style="color: #66cc66;">&#125;</span>
				<span style="color: #b1b100;">else</span>
				<span style="color: #66cc66;">&#123;</span>
					<span style="color: #0066CC;">this</span>.<span style="color: #006600;">playSound</span><span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span>
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">/**
		 * Stops all the sounds that are in the sound dictionary.
		 *
		 * @param $useCurrentlyPlayingOnly A boolean that only stops the sounds which are currently playing (default: true)
		 *
		 * @return void
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">stopAllSounds</span><span style="color: #66cc66;">&#40;</span>$useCurrentlyPlayingOnly:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> <span style="color: #0066CC;">this</span>._sounds.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #000000; font-weight: bold;">var</span> id:<span style="color: #0066CC;">String</span> = <span style="color: #0066CC;">this</span>._sounds<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">name</span>;
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>$useCurrentlyPlayingOnly<span style="color: #66cc66;">&#41;</span>
				<span style="color: #66cc66;">&#123;</span>
					<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span><span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>id<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">paused</span><span style="color: #66cc66;">&#41;</span>
					<span style="color: #66cc66;">&#123;</span>
						<span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>id<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">pausedByAll</span> = <span style="color: #000000; font-weight: bold;">true</span>;
						<span style="color: #0066CC;">this</span>.<span style="color: #006600;">stopSound</span><span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span>;
					<span style="color: #66cc66;">&#125;</span>
				<span style="color: #66cc66;">&#125;</span>
				<span style="color: #b1b100;">else</span>
				<span style="color: #66cc66;">&#123;</span>
					<span style="color: #0066CC;">this</span>.<span style="color: #006600;">stopSound</span><span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span>
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">/**
		 * Pauses all the sounds that are in the sound dictionary.
		 *
		 * @param $useCurrentlyPlayingOnly A boolean that only pauses the sounds which are currently playing (default: true)
		 *
		 * @return void
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> pauseAllSounds<span style="color: #66cc66;">&#40;</span>$useCurrentlyPlayingOnly:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> <span style="color: #0066CC;">this</span>._sounds.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #000000; font-weight: bold;">var</span> id:<span style="color: #0066CC;">String</span> = <span style="color: #0066CC;">this</span>._sounds<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">name</span>;
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>$useCurrentlyPlayingOnly<span style="color: #66cc66;">&#41;</span>
				<span style="color: #66cc66;">&#123;</span>
					<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span><span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>id<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">paused</span><span style="color: #66cc66;">&#41;</span>
					<span style="color: #66cc66;">&#123;</span>
						<span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>id<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">pausedByAll</span> = <span style="color: #000000; font-weight: bold;">true</span>;
						<span style="color: #0066CC;">this</span>.<span style="color: #006600;">pauseSound</span><span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span>;
					<span style="color: #66cc66;">&#125;</span>
				<span style="color: #66cc66;">&#125;</span>
				<span style="color: #b1b100;">else</span>
				<span style="color: #66cc66;">&#123;</span>
					<span style="color: #0066CC;">this</span>.<span style="color: #006600;">pauseSound</span><span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span>
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">/**
		 * Fades the sound to the specified volume over the specified amount of time.
		 *
		 * @param $name The string identifier of the sound
		 * @param $targVolume The target volume to fade to, between 0 and 1 (default: 0)
		 * @param $fadeLength The time to fade over, in seconds (default: 1)
		 *
		 * @return void
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> fadeSound<span style="color: #66cc66;">&#40;</span>$name:<span style="color: #0066CC;">String</span>, $targVolume:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>, $fadeLength:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> fadeChannel:SoundChannel = <span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>$name<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">channel</span>;
			SoundShortcuts.<span style="color: #006600;">init</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>fadeChannel, <span style="color: #66cc66;">&#123;</span> _sound_volume: $targVolume, <span style="color: #0066CC;">time</span>: $fadeLength, transition:<span style="color: #ff0000;">&quot;linear&quot;</span> <span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">//TweenLite.to(fadeChannel, $fadeLength, {volume: $targVolume});</span>
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">/**
		 * Mutes the volume for all sounds in the sound dictionary.
		 *
		 * @return void
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> muteAllSounds<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> <span style="color: #0066CC;">this</span>._sounds.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #000000; font-weight: bold;">var</span> id:<span style="color: #0066CC;">String</span> = <span style="color: #0066CC;">this</span>._sounds<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">name</span>;
				<span style="color: #0066CC;">this</span>.<span style="color: #006600;">setSoundVolume</span><span style="color: #66cc66;">&#40;</span>id, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">/**
		 * Resets the volume to their original setting for all sounds in the sound dictionary.
		 *
		 * @return void
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> unmuteAllSounds<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> <span style="color: #0066CC;">this</span>._sounds.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #000000; font-weight: bold;">var</span> id:<span style="color: #0066CC;">String</span> = <span style="color: #0066CC;">this</span>._sounds<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">name</span>;
				<span style="color: #000000; font-weight: bold;">var</span> snd:<span style="color: #0066CC;">Object</span> = <span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>id<span style="color: #66cc66;">&#93;</span>;
				<span style="color: #000000; font-weight: bold;">var</span> curTransform:SoundTransform = snd.<span style="color: #006600;">channel</span>.<span style="color: #006600;">soundTransform</span>;
				curTransform.<span style="color: #006600;">volume</span> = snd.<span style="color: #006600;">volume</span>;
				snd.<span style="color: #006600;">channel</span>.<span style="color: #006600;">soundTransform</span> = curTransform;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">/**
		 * Sets the volume of the specified sound.
		 *
		 * @param $name The string identifier of the sound
		 * @param $volume The volume, between 0 and 1, to set the sound to
		 *
		 * @return void
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setSoundVolume<span style="color: #66cc66;">&#40;</span>$name:<span style="color: #0066CC;">String</span>, $volume:<span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> snd:<span style="color: #0066CC;">Object</span> = <span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>$name<span style="color: #66cc66;">&#93;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> curTransform:SoundTransform = snd.<span style="color: #006600;">channel</span>.<span style="color: #006600;">soundTransform</span>;
			curTransform.<span style="color: #006600;">volume</span> = $volume;
			snd.<span style="color: #006600;">channel</span>.<span style="color: #006600;">soundTransform</span> = curTransform;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">/**
		 * Gets the volume of the specified sound.
		 *
		 * @param $name The string identifier of the sound
		 *
		 * @return Number The current volume of the sound
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getSoundVolume<span style="color: #66cc66;">&#40;</span>$name:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>$name<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">channel</span>.<span style="color: #006600;">soundTransform</span>.<span style="color: #006600;">volume</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">/**
		 * Gets the position of the specified sound.
		 *
		 * @param $name The string identifier of the sound
		 *
		 * @return Number The current position of the sound, in milliseconds
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getSoundPosition<span style="color: #66cc66;">&#40;</span>$name:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>$name<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">channel</span>.<span style="color: #0066CC;">position</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">/**
		 * Gets the duration of the specified sound.
		 *
		 * @param $name The string identifier of the sound
		 *
		 * @return Number The length of the sound, in milliseconds
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getSoundDuration<span style="color: #66cc66;">&#40;</span>$name:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>$name<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">sound</span>.<span style="color: #0066CC;">length</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">/**
		 * Gets the sound object of the specified sound.
		 *
		 * @param $name The string identifier of the sound
		 *
		 * @return Sound The sound object
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getSoundObject<span style="color: #66cc66;">&#40;</span>$name:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Sound</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>$name<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">sound</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">/**
		 * Identifies if the sound is paused or not.
		 *
		 * @param $name The string identifier of the sound
		 *
		 * @return Boolean The boolean value of paused or not paused
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> isSoundPaused<span style="color: #66cc66;">&#40;</span>$name:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Boolean</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>$name<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">paused</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">/**
		 * Identifies if the sound was paused or stopped by calling the stopAllSounds() or pauseAllSounds() methods.
		 *
		 * @param $name The string identifier of the sound
		 *
		 * @return Number The boolean value of pausedByAll or not pausedByAll
		 */</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> isSoundPausedByAll<span style="color: #66cc66;">&#40;</span>$name:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Boolean</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #0066CC;">this</span>._soundsDict<span style="color: #66cc66;">&#91;</span>$name<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">pausedByAll</span>;
		<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">//- EVENT HANDLERS ----------------------------------------------------------------------------------------</span>
<span style="color: #808080; font-style: italic;">//- GETTERS &amp;amp; SETTERS -------------------------------------------------------------------------------------</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> sounds<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Array</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #0066CC;">this</span>._sounds;
		<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">//- HELPERS -----------------------------------------------------------------------------------------------</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">String</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> getQualifiedClassName<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
<span style="color: #808080; font-style: italic;">//- END CLASS ---------------------------------------------------------------------------------------------</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2009/01/16/as3-soundmanager-class-for-flash-updated-for-tweener/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

