<?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; AUDIO</title>
	<atom:link href="http://drawlogic.com/category/audio/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>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>
		<item>
		<title>AS3 FVorbis Flash Ogg Vorbis Player</title>
		<link>http://drawlogic.com/2008/10/04/as3-fvorbis-flash-ogg-vorbis-player/</link>
		<comments>http://drawlogic.com/2008/10/04/as3-fvorbis-flash-ogg-vorbis-player/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 07:41:46 +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[HAXE]]></category>
		<category><![CDATA[LIBRARIES]]></category>
		<category><![CDATA[OPENSOURCE]]></category>
		<category><![CDATA[PROGRAMMING]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[CODE]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[ogg]]></category>
		<category><![CDATA[vorbis]]></category>

		<guid isPermaLink="false">http://drawk.wordpress.com/?p=283</guid>
		<description><![CDATA[This project is stacked with cool, but is also useful, an ogg/vorbis player in flash/as3.  Arek Korbik at barelyfocused implemented a port for a pure Ogg/Vorbis audio library called FVorbis.  Check out the demo (need flash player 10). Groovy. The name is: FVorbis. Which stands for more or less “Ogg and Vorbis in Flash”. That’s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.vorbis.com/" target="_blank"><img class="alignright" title="Ogg Vorbis" src="http://farm4.static.flickr.com/3220/2911729266_50500c4204_o.png" alt="" width="96" height="48" /></a>This project is stacked with cool, but is also useful, an <a href="http://barelyfocused.net/blog/2008/10/03/flash-vorbis-player/" target="_blank">ogg/vorbis player in flash/as3</a>.  Arek Korbik at <a href="http://barelyfocused.net/blog/2008/10/03/flash-vorbis-player/" target="_blank">barelyfocused</a> implemented a port for a pure Ogg/Vorbis audio library called FVorbis.  <a href="http://people.xiph.org/~arek/pg/hx/test.html" target="_blank">Check out the demo</a> (need flash player 10). Groovy.</p>
<blockquote><p>The name is: FVorbis. Which stands for more or less “Ogg and Vorbis in Flash”. That’s right, <strong>pure ActionScript 3 implementation of the Ogg and Vorbis libraries that require no kind of native support from the Flash Player</strong>. A simple Vorbis player implemented using the new FVorbis lib compiles to about <strong>46KB SWF file</strong>. And that’s it.</p></blockquote>
<p>To top it off the code is actually written in <a href="http://haxe.org/" target="_blank">haXe</a>, a favorite of the flasherati. This version was iterated from the <a title="Cortado source" href="https://code.fluendo.com/flumotion/trac/browser/cortado/trunk">Cortado’s JOrbis code.</a></p>
<p>Ogg Vorbis is a great open source audio format which is widely popular in game engines such as recent tools like <a href="http://unity3d.com/" target="_blank">Unity3D</a> (which will be launching their iPhone dev kit on Oct 22 btw but I digress), so it is great to see it starting to appear in flash. Thanks Arek.</p>
<ul>
<li><a title="example FVorbis player" href="http://people.xiph.org/%7Earek/pg/hx/test.html">Try the sample<br />
</a></li>
</ul>
<ul>
<li><a title="fogg.dev bzr branch" href="http://people.xiph.org/%7Earek/bzr/fogg.dev">Get the code (bzr)<br />
</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2008/10/04/as3-fvorbis-flash-ogg-vorbis-player/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Andre Michelle Brings It with Audiotools and Re-Makes Rebirth Alive and Better with AS3 Flash and Java</title>
		<link>http://drawlogic.com/2008/06/15/andre-michelle-brings-it-with-audiotools-and-makes-rebirth-alive-and-better/</link>
		<comments>http://drawlogic.com/2008/06/15/andre-michelle-brings-it-with-audiotools-and-makes-rebirth-alive-and-better/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 23:41:47 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[ACTIONSCRIPT3]]></category>
		<category><![CDATA[APPLICATIONS]]></category>
		<category><![CDATA[ARCHITECT]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[AUDIO]]></category>
		<category><![CDATA[BEST OF]]></category>
		<category><![CDATA[DEVELOPMENT]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[GAMEDEV]]></category>
		<category><![CDATA[INTERFACE]]></category>
		<category><![CDATA[PROGRAMMING]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[303]]></category>
		<category><![CDATA[909]]></category>
		<category><![CDATA[andre]]></category>
		<category><![CDATA[JAVA]]></category>
		<category><![CDATA[michelle]]></category>
		<category><![CDATA[mixer]]></category>
		<category><![CDATA[mod]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[roland]]></category>

		<guid isPermaLink="false">http://drawk.wordpress.com/?p=213</guid>
		<description><![CDATA[If you ever were a fan of Rebirth and Rebirth 2, this was a music kit that had two 303s, a 909 and an 808 kick drum (beastie says mmmmmm-m-m drop!).  Well Andre Michelle has re-ignited that awesomeness and upped it with the Audio Tools from hobnox!. This not only has the famed 808, 909 [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever were a fan of <a href="http://en.wikipedia.org/wiki/ReBirth_RB-338" target="_blank">Rebirth and Rebirth 2</a>, this was a music kit that had two 303s, a 909 and an 808 kick drum (beastie says mmmmmm-m-m drop!).  Well <a href="http://blog.andre-michelle.com/2008/hobnox-on-fox-news/" target="_blank">Andre Michelle</a><a href="http://blog.andre-michelle.com/2008/hobnox-on-fox-news/" target="_blank"> has re-ignited that awesomeness</a> and upped it with the <strong><a href="http://www.hobnox.com/index.1056.en.html" target="_blank">Audio Tools from hobnox</a></strong>!.</p>
<p>This not only has the famed 808, 909 and 303 (conveniently covered with stickers of love) but also sorts of channel mixers, pedals and sweet interface that mimics the inputs and outputs as well as customization on nearly every aspect of the audio creation with these tools. Use your mouse to move things around, connect ins and outs and move the whole setup around.</p>
<p><a href="http://www.hobnox.com/index.1056.en.html" target="_blank"><img src="http://farm4.static.flickr.com/3108/2582381572_d3650cbe04_o.png" alt="" width="450" height="391" /></a></p>
<p>This setup on about 80 bpm and a little tinkering is groovy.</p>
<p><a href="http://www.hobnox.com/index.1056.en.html" target="_blank"><img src="http://farm4.static.flickr.com/3123/2581599593_5fbe000d3b_o.png" alt="" width="450" height="308" /></a></p>
<p>I think I just found my new <span style="text-decoration:line-through;">batcave</span> <span style="text-decoration:line-through;">evil genius</span> code monkey theme music</p>
<p><a href="http://www.hobnox.com/index.1056.en.html" target="_blank"><img src="http://farm4.static.flickr.com/3040/2582442998_0dd85a710b_o.png" alt="" width="450" height="356" /></a></p>
<ul>
<li><a href="http://blog.andre-michelle.com/2008/hobnox-on-fox-news/" target="_blank">Andre Michelle&#8217;s Blog</a></li>
<li><a href="http://www.hobnox.com/index.1056.en.html" target="_blank">English version of hobnox Audio Tools Direct link</a></li>
<li><a href="http://en.wikipedia.org/wiki/ReBirth_RB-338" target="_blank">Rebirth nostalgia</a></li>
<li><a href="http://www.hobnox.com/index.1020.en.html?blg[blogid]=12" target="_blank">Audiotools blog</a></li>
</ul>
<p>Apparently Andre and Joa made some noise and now you can too.  Also I noticed that some of it is in java for the sound output.  I wonder if Adobe missed an opportunity here in audio with flash, which will change probably in Flash 10 due to the Make Some Noise Adobe campaign and Tinic Uro for listening.  But for now <a href="http://www.hobnox.com/index.1056.en.html" target="_blank">have some fun</a>. It is hard to find something that doesn&#8217;t sound good in the 80-90 bpm range.</p>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2008/06/15/andre-michelle-brings-it-with-audiotools-and-makes-rebirth-alive-and-better/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

