<?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; ACTIONSCRIPT</title>
	<atom:link href="http://drawlogic.com/tag/actionscript/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>AS3SWF Tool and Flash Shapes Under the Hood</title>
		<link>http://drawlogic.com/2009/09/09/as3swf-tool-and-flash-shapes-under-the-hood/</link>
		<comments>http://drawlogic.com/2009/09/09/as3swf-tool-and-flash-shapes-under-the-hood/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 17:19:15 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[as3swf]]></category>
		<category><![CDATA[avm2]]></category>
		<category><![CDATA[elastic]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[machine]]></category>
		<category><![CDATA[optimize]]></category>
		<category><![CDATA[output]]></category>
		<category><![CDATA[PERFORMANCE]]></category>
		<category><![CDATA[racetrack]]></category>
		<category><![CDATA[swf]]></category>
		<category><![CDATA[virtual]]></category>

		<guid isPermaLink="false">http://drawlogic.com/?p=638</guid>
		<description><![CDATA[Claus Wahlers has a great post on some lower level Flash handling for shapes.  He posts about a tool called as3swf which helps to look into the raw shapes and vector drawing calls in the flash engine. The output of this tool gives the raw machine code/assembly like procedural output that is very similar to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="as3swf" src="http://i81.photobucket.com/albums/j223/drawkbox/shape_rectangle_3.png" alt="" width="190" height="190" />Claus Wahlers has a <a href="http://wahlers.com.br/claus/blog/hacking-swf-1-shapes-in-flash/" target="_blank">great post on some lower level Flash handling for shapes</a>.  He posts about a tool called <a href="http://github.com/claus/as3swf/tree/master" target="_blank">as3swf</a> which helps to look into the raw shapes and vector drawing calls in the flash engine.</p>
<p>The output of this tool gives the raw machine code/assembly like procedural output that is very similar to other rendering engines. It actually makes me think of OpenGL a bit in the output switch based, procedural flow except this if for vector drawing rather than raster.</p>
<p><strong>Sample output</strong></p>
<pre style="font-family: Consolas,Monaco,'Courier New',Courier,monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: 18px; font-size-adjust: none; font-stretch: normal;">[83:DefineShape4] ID: 1
  FillStyles:
    [1] [SWFFillStyle] Type: 0 (solid), Color: 666666
  LineStyles:
    [1] [SWFLineStyle2] Width: 200, Color: ff0000
  ShapeRecords:
    [SWFShapeRecordStyleChange] MoveTo: 400,400, FillStyle1: 1, LineStyle: 1
    [SWFShapeRecordStraightEdge] Horizontal: 2000
    [SWFShapeRecordStraightEdge] Vertical: 2000
    [SWFShapeRecordStraightEdge] Horizontal: -2000
    [SWFShapeRecordStraightEdge] Vertical: -2000
    [SWFShapeRecordEnd]</pre>
<p>It is always good to know what is going on in lower levels to better code for projects that perform well.  Another great post on this is the<a href="http://drawlogic.com/2008/04/22/a-peek-into-the-as3-and-avm2-virtual-machine-and-elastic-racetrack/" target="_blank"> Elastic Racetrack of the AS3 and AVM2 virtual machine</a> which describes how the AVM2 handles drawing those low level shape calls in addition to handling script.</p>
<ul>
<li><a href="http://github.com/claus/as3swf/tree/master" target="_blank">as3swf </a>at github</li>
<li><a href="http://wahlers.com.br/claus/blog/hacking-swf-1-shapes-in-flash/" target="_blank">post on the tool </a>and more information on shapes in flash at a low level</li>
<li><a title="Permanent Link: Updated ‘Elastic Racetrack’ for Flash 9 and AVM2" rel="bookmark" href="http://www.craftymind.com/2008/04/18/updated-elastic-racetrack-for-flash-9-and-avm2/">‘Elastic Racetrack’ for Flash 9 and AVM2 </a>another lower level article how the flash player draws at runtime<a title="Permanent Link: Updated ‘Elastic Racetrack’ for Flash 9 and AVM2" rel="bookmark" href="http://www.craftymind.com/2008/04/18/updated-elastic-racetrack-for-flash-9-and-avm2/"><br />
</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2009/09/09/as3swf-tool-and-flash-shapes-under-the-hood/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AS3 Library for OAuth with Twitter for AIR Apps</title>
		<link>http://drawlogic.com/2009/07/08/as3-library-for-oauth-with-twitter-for-air-apps/</link>
		<comments>http://drawlogic.com/2009/07/08/as3-library-for-oauth-with-twitter-for-air-apps/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 12:01:49 +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[DEVELOPMENT]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[OPEN SOURCE]]></category>
		<category><![CDATA[STANDARDS]]></category>
		<category><![CDATA[SYNDICATION]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[CODE]]></category>
		<category><![CDATA[core]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://drawlogic.com/?p=592</guid>
		<description><![CDATA[AIR is very popular for creating twitter clients, Sönke Rohde just made it much easier to make AIR apps for twitter with an AS3 library for Twitter. This library is built on top of core oauth as3 library by iotashin.  Core OAuth as3 library is a standard OAuth library this can be used for your [...]]]></description>
			<content:encoded><![CDATA[<p>AIR is very popular for creating twitter clients, <a href="http://soenkerohde.com/2009/07/high-level-as3flex-library-for-oauth-with-twitter-from-air/" target="_blank">Sönke Rohde just made it much easier to make AIR apps for twitter</a> with an <a href="http://github.com/srohde/OAuth/tree/master" target="_blank">AS3 library for Twitter</a>. This library is built on top of <a href="http://www.iotashan.com/index.php/2008/04/28/oauth-actionscript-library/" target="_blank">core oauth as3 library</a> <a href="http://www.iotashan.com/index.php/2008/04/28/oauth-actionscript-library/" target="_blank">by iotashin</a>.  Core <a href="http://oauth.net/" target="_blank">OAuth</a> as3 library is a standard OAuth library this can be used for your own OAuth backends or connecting to other OAuth services as well.</p>
<p>A very nice feature of this library, in addition to being coded cleanly and as3 style, is the ability to have the Twitter OAuth page render inside of Flash.</p>
<p style="padding-left: 30px;">Instead of opening the Twitter authorization page in the browser the library also contains OAuthLoader which is a wrapper around HTMLLoader which enables to directly show the authorization page within an AIR window:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">// use this in the requestTokenHandler instead of navigateToURL</span>
<span style="color: #000000; font-weight: bold;">var</span> loader:OAuthLoader = <span style="color: #000000; font-weight: bold;">new</span> OAuthLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
loader.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span>request<span style="color: #66cc66;">&#41;</span>;
loader.<span style="color: #006600;">percentWidth</span> = <span style="color: #cc66cc;">100</span>;
loader.<span style="color: #006600;">percentHeight</span> = <span style="color: #cc66cc;">100</span>;
<span style="color: #000000; font-weight: bold;">var</span> w:Window = <span style="color: #000000; font-weight: bold;">new</span> Window<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
w.<span style="color: #0066CC;">width</span> = <span style="color: #cc66cc;">800</span>;
w.<span style="color: #0066CC;">height</span> = <span style="color: #cc66cc;">400</span>;
w.<span style="color: #006600;">title</span> = req.<span style="color: #0066CC;">url</span>;
w.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>loader<span style="color: #66cc66;">&#41;</span>;
w.<span style="color: #006600;">open</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<ul>
<li><a href="http://www.iotashan.com/">Shannon Hicks</a> <a href="http://www.iotashan.com/index.php/2008/04/28/oauth-actionscript-library/">core oauth as3 library</a></li>
<li><a href="http://github.com/srohde/OAuth/tree/master">High level AS3/Flex library for OAuth</a></li>
<li><a href="http://code.google.com/p/oauth-as3/" target="_blank">oauth-as3 Google Code page</a></li>
<li><a href="http://oauth.net/">OAuth</a></li>
<li><a href="http://apiwiki.twitter.com/OAuth-FAQ">Twitter OAuth FAQ</a></li>
<li><a href="http://apiwiki.twitter.com/Twitter-API-Documentation">Twitter API Documentation</a></li>
<li><a href="http://www.hueniverse.com/hueniverse/2007/10/beginners-gui-1.html">Getting Started with OAuth</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2009/07/08/as3-library-for-oauth-with-twitter-for-air-apps/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Blender to AS3 Exporter for Papervision 3D, Away 3D and Sandy Updated by Rozengain</title>
		<link>http://drawlogic.com/2009/06/14/blender-to-as3-exporter-for-papervision-3d-away-3d-and-sandy-updated-by-rozengain/</link>
		<comments>http://drawlogic.com/2009/06/14/blender-to-as3-exporter-for-papervision-3d-away-3d-and-sandy-updated-by-rozengain/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 20:27:29 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[3D ENGINES]]></category>
		<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[ACTIONSCRIPT3]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[AWAY3D]]></category>
		<category><![CDATA[blender]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[GAMEDEV]]></category>
		<category><![CDATA[GAMES]]></category>
		<category><![CDATA[PAPERVISION]]></category>
		<category><![CDATA[RENDERING]]></category>
		<category><![CDATA[SANDY]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[TOOLS]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[exporter]]></category>
		<category><![CDATA[papervision 3d]]></category>
		<category><![CDATA[pipeline]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://drawlogic.com/?p=567</guid>
		<description><![CDATA[Rozengain or Dennis Ippel of AKQA updated probably one of the tools I use the most for flash 3d and that is the blender to as3 exporter.  This simplifies loading in the meshes you have and lessens the bulk of the COLLADA format.  COLLADA is great but flash is still client side and fairly memory [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rozengain.com/blog/2009/06/12/blender-to-actionscript-exporter-updated-export-multiple-objects-at-once/" target="_blank">Rozengain or Dennis Ippel</a> of <a title="AKQA" href="http://www.akqa.com/">AKQA</a> updated probably one of the tools I use the most for flash 3d and that is the blender to as3 exporter.  This simplifies loading in the meshes you have and lessens the bulk of the COLLADA format.  COLLADA is great but flash is still client side and fairly memory intensive for 3d so loading in models directly to as3 is nice if flash is your presentation tool.</p>
<p><a href="http://www.rozengain.com/blog/2009/06/12/blender-to-actionscript-exporter-updated-export-multiple-objects-at-once/" target="_blank">AS3 Blender exporter</a> has been updated to allow multiple object export. Also in April is was <a href="http://www.rozengain.com/blog/2009/04/06/blender-to-actionscript-exporter-updated-quads-and-modifiers/" target="_blank">updated to export quads and modifiers</a>.</p>
<p><a href="http://www.rozengain.com/blog/2009/06/12/blender-to-actionscript-exporter-updated-export-multiple-objects-at-once/" target="_blank"><img class="alignnone" title="Rozengain AS3 Blender Exporter" src="http://i81.photobucket.com/albums/j223/drawkbox/blendexpnew.jpg" alt="" width="340" height="229" /></a></p>
<p><a href="http://www.rozengain.com/blog/2009/06/12/blender-to-actionscript-exporter-updated-export-multiple-objects-at-once/" target="_blank"><img class="alignnone" title="Blender to AS3 Pipeline" src="http://i81.photobucket.com/albums/j223/drawkbox/export-actionscript-blender.jpg" alt="" width="350" height="275" /></a></p>
<p>One concern you might have is statically binding the code within a main swf fileon compile and resulting file size compared to loading in the DAE dynamically.  But you can just load these in as you would external DAE COLLADA files as compiled swfs and since it is just code it is very compact.   This adds some duplication of code (such as tweening libraries or the 3d engine source as needed) but allows a more horizontal loading or lazy loading of meshes when needed.</p>
<p>This is just another option to get 3D models into the flash 3d engine of your choice in addition to COLLADA, some MD2 support and limited ASE support.</p>
<p>This is an awesome project that keeps getting better, thanks Rozengain.</p>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2009/06/14/blender-to-as3-exporter-for-papervision-3d-away-3d-and-sandy-updated-by-rozengain/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AS3 Flash Efficient Code Techniques, Vectors in Flash 10, Faster JPEG Encoding, Other Optimization Notes</title>
		<link>http://drawlogic.com/2009/05/22/as3-flash-efficient-code-techniques-vectors-in-flash-10-faster-jpeg-encoding-other-optimization-notes/</link>
		<comments>http://drawlogic.com/2009/05/22/as3-flash-efficient-code-techniques-vectors-in-flash-10-faster-jpeg-encoding-other-optimization-notes/#comments</comments>
		<pubDate>Fri, 22 May 2009 09:21:42 +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[CODE]]></category>
		<category><![CDATA[DEVELOPMENT]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[PERFORMANCE]]></category>
		<category><![CDATA[PROGRAMMING]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[VECTOR]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[efficient]]></category>
		<category><![CDATA[optmization]]></category>

		<guid isPermaLink="false">http://drawlogic.com/?p=558</guid>
		<description><![CDATA[Flash 10 will be ready for mainstream hopefully by the end of this year, or early &#8217;10 when the penetration numbers will be up in or around the 90% range via zeh fernando based on previous trajectories.   With that, Flash 10 has many great new things such as the Vector structure that allows a collection of [...]]]></description>
			<content:encoded><![CDATA[<p>Flash 10 will be ready for mainstream hopefully by the end of this year, or early &#8217;10 when the <a href="http://spreadsheets.google.com/pub?key=pjaKnZUqwo-1XaUCJLlBQeA&amp;gid=1">penetration numbers will be up in or around the 90% range</a> via <a href="http://zehfernando.com/2009/flash-penetration-stats-for-march-2009-now-live-graphs-updated/">zeh fernando based on previous trajectories</a>.  </p>
<p>With that, <strong>Flash 10 has many great new things such as the </strong><a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/Vector.html" target="_blank"><strong>Vector</strong></a><strong> structure that allows a collection of a certain type, which results in a faster collection because of the known type.</strong>  So anywhere where Arrays are used, that is a possible candidate for a performance increase within some code because you are asking the virtual machine to do less work on each loop (not having to dynamically find out the type).</p>
<p><a href="http://www.bytearray.org/?p=775" target="_blank">ByteArray</a> (Thibault Imbert) has demonstrated that for the JPEG encoding in corelib it is <a href="http://www.bytearray.org/?p=775" target="_blank">up to 2.5 times faster using Vectors than Arrays</a>.  Your mileage may vary heavily but it is almost a guaranteed speed boost due to less work.  This obviously has great possibilities for speeding up code that uses lots of arrays.  </p>
<p>Due to the performance boost the Vector does have some constraints in the typical give and take of coder flexibility with compiler and virtual machine overhead.  Vectors are more explicit and strongly typed which is why they are fast, but this is also limiting.</p>
<blockquote><p><strong>In addition to the data type restriction, the Vector class has other restrictions that distinguish it from the Array class:</strong></p>
<ul>
<li>A Vector is a dense array. Unlike an Array, which may have values in indices 0 and 7 even if there are no values in positions 1 through 6,<strong> a Vector must have a value (or </strong><code><strong>null</strong></code><strong>) in each index.</strong></li>
<li><strong>A Vector can optionally be fixed-length, </strong><strong>meaning the number of elements it contains can&#8217;t change</strong>.</li>
<li>Access to a Vector&#8217;s elements is bounds-checked. You can never read a value from an index greater than the final element (<code>length - 1</code>). You can never set a value with an index more than one beyond the current final index (in other words, you can only set a value at an existing index or at index <code>[length]</code>).</li>
</ul>
</blockquote>
<p> [ <a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/Vector.html" target="_blank">Vector docs</a>  ]</p>
<p><a href="http://www.bytearray.org/?p=775" target="_blank">ByteArray not only used Vectors heavily but did other optimizations</a> that are always good to do, even though optimization is evil when you are working with precious client side resources ensuring an optimized base starting point can be a good thing.</p>
<blockquote><p>So what did I do ?</p>
<ul>
<li>I used bitwise operators as much as possible.</li>
<li><strong>I replaced all Arrays with fixed length Vectors.</strong></li>
<li>I used pre-incrementation rather than post-incrementation (thanks <a title="Joa's wiki" href="http://wiki.joa-ebert.com/" target="_blank">Joa</a> for this one <img src='http://drawlogic.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ).</li>
<li>I casted to int all my Vector indices access.</li>
<li>Other minor stuff you always do to optimize your code </li>
</ul>
</blockquote>
<p><strong>Other sources as well for even more optimization or shall I say efficient AS3:</strong></p>
<ul>
<li><a href="http://lab.polygonal.de/2008/06/18/using-object-pools/" target="_blank">Polygonal Labs Using Object Pools</a></li>
<li><a href="http://blog.joa-ebert.com/2008/05/07/tweening-and-object-pools/" target="_blank">Joa Ebert Tweening and Object Pools</a></li>
<li><a href="http://wiki.joa-ebert.com/index.php/Category:Code_Optimization" target="_blank">Joa Ebert Optmization Wiki</a></li>
<li><a href="http://www.insideria.com/2009/04/51-actionscript-30-and-flex-op.html" target="_blank">Sean Moore Efficient AS3 roundup (great list of resources for more at the bottom)</a></li>
<li><a href="http://www.lostinactionscript.com/blog/index.php/2008/09/28/tips-on-how-to-write-efficient-as3/" target="_blank">Lost in Actionscript Efficient AS3 Tips</a></li>
<li><a href="http://www.bigspaceship.com/blog/labs/as3-optimization-tip" target="_blank">Big SpaceShip Mouse Leave Tip</a> (flash can hog resources so when it isn&#8217;t in focus then let is stop tasking the processor)</li>
<li><a href="http://www.gskinner.com/blog/archives/2009/05/idle_cpu_usage.html" target="_blank">Grant Skinner Idle CPU in AIR FPS Tip</a> (set fps to a lower amount when it is out of focus)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2009/05/22/as3-flash-efficient-code-techniques-vectors-in-flash-10-faster-jpeg-encoding-other-optimization-notes/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>amfast Python Remoting and Services Library for Flash, Flex and other AMF</title>
		<link>http://drawlogic.com/2009/05/18/amfast-python-remoting-and-services-library-for-flash-flex-and-other-amf/</link>
		<comments>http://drawlogic.com/2009/05/18/amfast-python-remoting-and-services-library-for-flash-flex-and-other-amf/#comments</comments>
		<pubDate>Mon, 18 May 2009 07:18:12 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[ACTIONSCRIPT3]]></category>
		<category><![CDATA[AMF]]></category>
		<category><![CDATA[APPLICATIONS]]></category>
		<category><![CDATA[ARCHITECT]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[DEVELOPMENT]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[GAMEDEV]]></category>
		<category><![CDATA[GAMES]]></category>
		<category><![CDATA[LIBRARIES]]></category>
		<category><![CDATA[OPEN SOURCE]]></category>
		<category><![CDATA[PYTHON]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[tracking]]></category>
		<category><![CDATA[AMF0]]></category>
		<category><![CDATA[AMF3]]></category>
		<category><![CDATA[messaging]]></category>
		<category><![CDATA[remoting]]></category>
		<category><![CDATA[services]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://drawlogic.com/?p=548</guid>
		<description><![CDATA[pyamf is pretty sweet for Flash remoting with Pythonic server side, but now we have two nicely done and integrated remoting kits for python on the server side. amfast is a new remoting library  that looks to be as sweet as pyamf (where sweet == fast and useful).  I am checking out amfast now but [...]]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://pyamf.org/" target="_blank">pyamf </a></strong>is pretty sweet for Flash remoting with Pythonic server side, but now we have two nicely done and integrated remoting kits for python on the server side.</p>
<p><strong><a href="http://code.google.com/p/amfast/" target="_blank">amfast </a></strong>is a new remoting library  that looks to be as sweet as pyamf (where sweet == fast and useful).  I am checking out <a href="http://code.google.com/p/amfast/" target="_blank">amfast </a>now but the speed boost alone might be worth it.  For instance, working with real-time games, when you need static content you need to grab that quickly sometimes via a content service.  The faster that link the better. It also has <a href="http://twistedmatrix.com/trac/" target="_blank">Twisted</a> integration which is great for networking and <a href="http://www.sqlalchemy.org/" target="_blank">SQLAlchemy </a>integration which is in my opinion the best ORM for python (pyamf has twisted, django, pylons, sqlalchemy as well)</p>
<p><a href="http://code.google.com/p/amfast/" target="_blank">amfast </a>is well documented and has some great examples.  If you have the Python addiction, check it.</p>
<blockquote>
<h3>Description</h3>
<ul>
<li>AmFast is a Flash remoting framework for Python.</li>
<li>AmFast can use AMF to communicate between Python and Flash, Flex, and any other system that supports AMF.</li>
<li>AMF is a binary object serialization protocol used by Actionscript based applications.</li>
</ul>
<h3>Server Features</h3>
<ul>
<li>Support for NetConnection and RemoteObject RPC.</li>
<li><strong>Support for Producer/Consumer &#8216;push&#8217; messaging with HTTP polling, HTTP long-polling, and real-time HTTP streaming channels.</strong></li>
<li>Support for authentication with NetConnection and RemoteObject.</li>
<li>Flexible Target mapping system to map message destinations to invokable Target objects.</li>
<li>Support for ChannelSets with multiple Channels to expose resources in different ways.</li>
<li>Built in Channels for <a rel="nofollow" href="http://cherrypy.org/">CherryPy</a>, <a rel="nofollow" href="http://twistedmatrix.com/trac/">Twisted Web</a>, and plain WSGI.</li>
<li>Support for configurable Endpoints. Use AmFast&#8217;s built-in AMF encoder/decoder C-extension, or use an external AMF encoder/decoder, such as <a rel="nofollow" href="http://pyamf.org/">PyAmf</a> for a pure-Python implementation.</li>
</ul>
<h3>AMF Encoder/Decoder Features</h3>
<ul>
<li>AMF0/AMF3 encoder/decoder written in C as a Python extension for speed.</li>
<li><strong>More than 10x faster than the <a rel="nofollow" href="http://pyamf.org/">PyAmf</a> encoder/decoder (even when using <a rel="nofollow" href="http://pyamf.org/">PyAmf&#8217;s</a> optional C-extension).</strong></li>
<li>Map custom classes with ClassDef objects for <strong>complete control over serialization/de-serialization</strong>.</li>
<li>Full support for IExternalizable objects.</li>
<li>Data persistence with <a rel="nofollow" href="http://www.sqlalchemy.org/">SqlAlchemy</a> including remotely-loadable lazy-loaded attributes.</li>
<li><strong>Actionscript code generation from ClassDef objects.</strong></li>
</ul>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2009/05/18/amfast-python-remoting-and-services-library-for-flash-flex-and-other-amf/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>AS3 3D Physics Engine JiglibFlash Updated, Now Renderers With Papervision 3D, Away 3D and Sandy</title>
		<link>http://drawlogic.com/2009/04/14/as3-3d-physics-engine-jiglibflash-updated-now-renderers-with-papervision-3d-away-3d-and-sandy/</link>
		<comments>http://drawlogic.com/2009/04/14/as3-3d-physics-engine-jiglibflash-updated-now-renderers-with-papervision-3d-away-3d-and-sandy/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 03:06:49 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[3D ENGINES]]></category>
		<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[ACTIONSCRIPT3]]></category>
		<category><![CDATA[ARCHITECT]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[AWAY3D]]></category>
		<category><![CDATA[GAMEDEV]]></category>
		<category><![CDATA[jiglibflash]]></category>
		<category><![CDATA[PHYSICS]]></category>
		<category><![CDATA[wow]]></category>

		<guid isPermaLink="false">http://drawlogic.com/?p=521</guid>
		<description><![CDATA[JiglibFlash has been updated on a few fronts&#8230; Recently added include, you can now use RADIANS or DEGREES to manipulate objects in the engine, also adding standard yaw, pitch and roll methods.   There is a mouse interaction now available with a MouseConstraint class to allow the user to drag a 3d element with the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jiglibflash.com/blog/2009/04/14/radians-vs-degress-new-class-and-other-news/" target="_blank">JiglibFlash has been updated</a> on a <a href="http://www.jiglibflash.com/blog/2009/04/06/3d-physic-engine-jiglibflash-is-updated-with-away-3d-papervision-3d-and-sandy-3d-support/" target="_blank">few</a> <a href="http://www.jiglibflash.com/blog/2009/04/14/radians-vs-degress-new-class-and-other-news/" target="_blank">fronts</a>&#8230;</p>
<p>Recently added include, you can now use RADIANS or DEGREES to manipulate objects in the engine, also adding standard yaw, pitch and roll methods.  </p>
<p><strong>There is a mouse interaction now available with a MouseConstraint class to allow the user to drag a 3d element</strong> with the mouse which is great for gaming and interactive 3d physics scenes.</p>
<blockquote><p><strong>New class: MouseConstraint</strong></p>
<p>There has been a new class to the Papervision3D plug-in called <a href="http://code.google.com/p/jiglibflash/source/browse/trunk/fp9/src/jiglib/plugin/papervision3d/constraint/MouseConstraint.as">MouseConstraint</a> and a <a href="http://code.google.com/p/jiglibflash/source/browse/trunk/fp9/examples/papervision3d/MouseConstraintTest.as">new example</a> to the Papervision3D examples folder. The class basically allows you to attach a world constraint to an object and simulate dragging.</p></blockquote>
<p><strong>The best update though is you can now use any of the</strong><a href="http://www.jiglibflash.com/blog/2009/04/06/3d-physic-engine-jiglibflash-is-updated-with-away-3d-papervision-3d-and-sandy-3d-support/" target="_blank"><strong> major open source flash 3d engines as the renderer</strong></a><strong>: Papervision 3D, Away3D or Sandy.</strong></p>
<ul>
<li><a href="http://code.google.com/p/jiglibflash/wiki/New_API_Very_Short_Tutorial" target="_blank">JiglibFlash Tutorial</a></li>
<li><a href="http://www.jiglibflash.com/blog/" target="_blank">JiglibFlash Blog</a></li>
</ul>
<p><strong>AS3 Flash 3D Physics Engines</strong></p>
<ul>
<li><a href="http://www.jiglibflash.com" target="_blank">JiglibFlash</a></li>
<li><a href="http://seraf.mediabox.fr/wow-engine/as3-3d-physics-engine-wow-engine/">WOW-Engine</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2009/04/14/as3-3d-physics-engine-jiglibflash-updated-now-renderers-with-papervision-3d-away-3d-and-sandy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 Version of OpenCV for Facial Detection, Web Cam Object Detection, Head Tracking, 3D Library Integration and more with Open Computer Vision Library for Flash</title>
		<link>http://drawlogic.com/2009/03/16/as3-version-of-opencv-for-facial-detection-web-cam-object-detection-head-tracking-3d-library-integration-and-more-with-open-computer-vision-library/</link>
		<comments>http://drawlogic.com/2009/03/16/as3-version-of-opencv-for-facial-detection-web-cam-object-detection-head-tracking-3d-library-integration-and-more-with-open-computer-vision-library/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 21:47:32 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[3d]]></category>
		<category><![CDATA[3D ENGINES]]></category>
		<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[ACTIONSCRIPT3]]></category>
		<category><![CDATA[ADOBE]]></category>
		<category><![CDATA[ALCHEMY]]></category>
		<category><![CDATA[APPLICATIONS]]></category>
		<category><![CDATA[ARCHITECT]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[BEST OF]]></category>
		<category><![CDATA[CODE]]></category>
		<category><![CDATA[ENGINE]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[GAMEDEV]]></category>
		<category><![CDATA[GAMES]]></category>
		<category><![CDATA[LIBRARIES]]></category>
		<category><![CDATA[MOTION]]></category>
		<category><![CDATA[OPEN SOURCE]]></category>
		<category><![CDATA[PAPERVISION]]></category>
		<category><![CDATA[PERFORMANCE]]></category>
		<category><![CDATA[PROGRAMMING]]></category>
		<category><![CDATA[RENDERING]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[TOOLS]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[detection]]></category>
		<category><![CDATA[face]]></category>
		<category><![CDATA[flash 10]]></category>
		<category><![CDATA[head]]></category>
		<category><![CDATA[libspark]]></category>
		<category><![CDATA[marilena]]></category>
		<category><![CDATA[opencv]]></category>
		<category><![CDATA[recognition]]></category>
		<category><![CDATA[tracking]]></category>
		<category><![CDATA[visual]]></category>

		<guid isPermaLink="false">http://drawlogic.com/?p=425</guid>
		<description><![CDATA[Libspark from Japan is a treasure trove of great flash advancements, they seem to realize the great things that can come from porting in existing solid libraries from C/C++ etc into flash and have been scoring lately including augmented reality in flash porting the ARToolkit to FLARToolkit.  Recently a port of openCV for as3 called [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.libspark.org/" target="_blank">Libspark</a> from Japan is a treasure trove of great flash advancements, they seem to realize the great things that can come from porting in existing solid libraries from C/C++ etc into flash and have been scoring lately including augmented reality in flash porting the <a href="http://www.hitl.washington.edu/artoolkit/" target="_blank">ARToolkit</a> to FLARToolkit.  Recently a port of <a href="http://www.libspark.org/wiki/mash/Marilena" target="_blank">openCV for as3 called Marilena</a> was found and it is for object detection and decent facial recognition (it is a computer vision library from intel) considering the processing power needed to do this.</p>
<p><strong>Face Detection:</strong> Here is the <a href="http://maaash.jp/lab/Marilena_sample/" target="_blank">sample included with Marilena</a> showing facial detection on an image.</p>
<p><a href="http://maaash.jp/lab/Marilena_sample/" target="_blank"><img class="alignnone size-full wp-image-436" title="marilena1" src="http://drawlogic.com/wp-content/uploads/2009/03/marilena1.jpg" alt="marilena1" width="520" height="163" /></a></p>
<p>Lots of recent action has blown up on this front from <a href="http://mrdoob.com/blog/post/643" target="_blank">Mr doob</a>, <a href="http://www.quasimondo.com/" target="_blank">quasimondo </a>(optimizing the <a href="http://www.libspark.org/wiki/mash/Marilena" target="_blank">Marilena</a> classes for better performance) and <a href="http://www.boffswana.com/news/?p=498" target="_blank">Boffwswana</a>. Also there is a kit called <a href="http://code.google.com/p/deface/" target="_blank">deface</a> by sshipman that is the first foray into this a year ago doing similar things but it was just a bit before it&#8217;s time and a bit slow in previous versions of flash,<a href="http://suckatmath.com/personal/facedetect/facedetect.html" target="_blank"> it performs decent now in this sample</a>. Flash 10 performance of the AVM2 and future directions with Alchemy will lead to more interesting stuff just like this.</p>
<p><strong><a href="http://mrdoob.com/blog/post/643" target="_blank">Mr. doob</a> head tracking sample, be sure to check <a href="http://mrdoob.com/blog/post/643" target="_blank">lots of other examples there</a><br />
</strong></p>
<p><strong><a href="http://mrdoob.com/blog/post/643" target="_blank"><img class="alignnone size-full wp-image-428" title="mrdoob_facedriven3d" src="http://drawlogic.com/wp-content/uploads/2009/03/mrdoob_facedriven3d.png" alt="mrdoob_facedriven3d" width="350" height="222" /></a><br />
</strong></p>
<p><strong><a href="http://www.boffswana.com/news/?p=498" target="_blank">Boffswana </a>example of head tracking <a href="http://www.youtube.com/watch?v=Jd3-eiid-Uw" target="_blank">Johnny Lee Wii style</a> </strong>with only a webcam and flash, no wiimote needed since it uses facial detection to check where you are and how close you are in the screen and then moves accordingly.</p>
<p><a href="http://www.boffswana.com/news/?p=498" target="_blank"><img class="alignnone size-full wp-image-427" title="bofswana" src="http://drawlogic.com/wp-content/uploads/2009/03/bofswana.jpg" alt="bofswana" width="505" height="379" /></a></p>
<p><a href="http://mrdoob.com/blog/post/643" target="_blank"></a></p>
<p>This is stemming from the recent explosion of the <a href="http://www.libspark.org/wiki/saqoosha/FLARToolKit/en" target="_blank">FLARToolkit </a>and <a href="http://drawlogic.com/2008/11/17/as3-augmented-reality-in-flash-and-papervision-3d-flartoolkit/" target="_blank">augmented reality in flash</a> as well as the gimmicks used by Nintendo with the <a href="http://www.youtube.com/watch?v=Jd3-eiid-Uw" target="_blank">wii and Johnny Lee&#8217;s great head tracking advancements</a>. Porting great libraries to flash seems to be the phase we are entering now judging by the recent excitement around Adobe Alchemy and the LLVM along with the lead from the libspark.org contributors. We have also seen this heavily last year in ports of Box2D for 2d physics and other toolkits using established working code and porting that to flash now that is is mostly capable of handling the performance.</p>
<p><a href="http://sourceforge.net/projects/opencv/" target="_blank">OpenCV</a> (Open Computer Vision Library by Intel) is quite a powerful platform that allows you to do all this and now it is available in flash. There are other great libraries for nearly all platforms now. I have done some previous work with <a href="http://code.google.com/p/aforge/" target="_blank">Aforge which is also a port of OpenCV</a> mainly for<a href="http://drawlogic.com/2007/10/17/motion-detection-in-flash-as2-and-as3-and-c/" target="_blank"> motion detection</a>. This was always around but not until the recent performance updates and the innovation that has come with Alchemy and the thinking that goes along with that (porting in libraries to flash from C/C++ etc), has allowed this to flourish in flash and thus the web.</p>
<p>The amazing new things we can do with flash by porting in existing libraries is only going to get more intense as alchemy and flash 10 are even more mainstream.  It is almost as if Flash will eventually just become a web renderer and simplified front end to many great toolkits that exist in more native environments like C/C++ but with the speed and distribution access of the web with Flash.  Exciting times ahead.</p>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2009/03/16/as3-version-of-opencv-for-facial-detection-web-cam-object-detection-head-tracking-3d-library-integration-and-more-with-open-computer-vision-library/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>AS3 Data Structures for Game Developers Ported to haXe as hx3ds Which Performs Faster</title>
		<link>http://drawlogic.com/2009/03/13/as3-data-structures-for-game-developers-ported-to-haxe-as-hx3ds-which-performs-faster/</link>
		<comments>http://drawlogic.com/2009/03/13/as3-data-structures-for-game-developers-ported-to-haxe-as-hx3ds-which-performs-faster/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 04:27:56 +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[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[GAMEDEV]]></category>
		<category><![CDATA[GAMES]]></category>
		<category><![CDATA[HAXE]]></category>
		<category><![CDATA[LIBRARIES]]></category>
		<category><![CDATA[OPEN SOURCE]]></category>
		<category><![CDATA[PERFORMANCE]]></category>
		<category><![CDATA[PROGRAMMING]]></category>
		<category><![CDATA[STANDARDS]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[array2]]></category>
		<category><![CDATA[array3]]></category>
		<category><![CDATA[bitvector]]></category>
		<category><![CDATA[DATA]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[queue]]></category>
		<category><![CDATA[structures]]></category>
		<category><![CDATA[VECTOR]]></category>

		<guid isPermaLink="false">http://drawlogic.com/?p=419</guid>
		<description><![CDATA[Polygonal labs, maker of some of the best demos, information and tools for AS3 since inception updated the killer AS3 Data Structures for Game Developers and ported it to haXe. Of course along the way making many improvements and showing great information on how and why the haXe version is faster which mainly boils down [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://lab.polygonal.de/ds/" target="_blank"><img class="alignright" title="Data Structures for Game Developers" src="http://i81.photobucket.com/albums/j223/drawkbox/ds_logo-1.gif" alt="" width="140" height="100" /></a>Polygonal labs, maker of some of the best demos, information and tools for AS3 since inception <a href="http://lab.polygonal.de/2009/03/12/hx3ds/" target="_blank">updated the killer AS3 Data Structures for Game Developers and ported it to haXe</a>.</p>
<p>Of course along the way making many improvements and showing great information on how and why the haXe version is faster which mainly boils down to a more strict virtual machine but flexible still with generics.</p>
<p><a href="http://haxe.org/" target="_blank">haXe </a>is fast because it is a very highly optimized <span style="text-decoration: line-through;">virtual machine</span> language with compiler (and could be called a virtual machine to target other VMs similar to LLVM with the ability to target the Neko VM, AVM2 or Javascript, it is more than just a language) by <a href="http://ncannasse.fr/" target="_blank">Nicolas Cannasse</a> that may one day overtake directly coding for the AVM2 or maybe we will even see haXe have more influence on flash soon for performance gains.  Some of the Alchemy LLVM virtual machine work is similar in nature to what haXe does and helps the language become an abstraction and translates into highly optimized code from very powerful and productive language syntax.</p>
<p>Anyways, I ramble, be sure to check out <a href="http://lab.polygonal.de/ds/" target="_blank">Data Structures for Game Developers by Polygonal Labs </a>now ported for<a href="http://lib.haxe.org/p/hx3ds" target="_blank"> haXe as hx3ds</a> if you are doing any sort of work in AS3 or haXe for AS3 it will be worth your while and provide a very common and useful data structures capabilities into your production that is highly optimized from one of the best AS3 developers.</p>
<blockquote><p>As the name suggests, <strong>hx3ds</strong> is a port of <strong>as3ds</strong> for haXe and is now available at <a href="http://lib.haxe.org/p/hx3ds">lib.haxe.org</a>. hx3ds only supports the flash player 10 target, as it makes extensive use of the Vector class. If you need data structures that compile across all platforms, take a look at <a href="http://lib.haxe.org/p/colhx">colhx</a> instead.</p>
<p><strong>Here’s a list of new features:</strong></p>
<ul>
<li>orders of magnitude faster</li>
<li>collections now support clone() and shuffle() operations</li>
<li>object pooling framework</li>
<li>revised graph, tree and linked list classes</li>
<li>memory manager for the virtual memory API (more on this soon)</li>
</ul>
</blockquote>
<blockquote>
<h3>The Structures Included</h3>
<h4>Multi-Dimensional Arrays</h4>
<p>The library contains a two-dimensional and three-dimensional array. They are both implemented by a single linear array rather than nested arrays. This is the fastest method in flash to simulate multi-dimensional arrays and outperforms the nested array method because multiple array lookups are slower compared to one lookup combined with a simple arithmetic expression (which you can also often precompute in the outer loop). The most obvious application would be a tilemap in 2d or a layered tilemap in 3d.</p>
<h4>Queue</h4>
<p>This is also called a FIFO structure (First In &#8211; First Out). The queue comes in two variations, which have the same methods, but differ in their implementations: There is the arrayed queue, which obviously uses an array internally, and the linked queue, which is build upon a linked list. They are both very similar, except that the arrayed version has a fixed size and is faster.<br />
A common application would be a command queue &#8211; imagine you have a unit in a strategy game and apply many commands which the unit should follow. All commands are enqueued and afterwards dequeued and processed in order.</p>
<h4>Stack</h4>
<p>Also commonly know as a FILO structure (First In &#8211; Last Out). Like the queue, this comes in two flavors: arrayed and linked. A stack is often not used directly, but a very important concept in programming. Please note, that a queue and a stack are not real structures, because they just define how data is accessed rather then stored.</p>
<h4>Tree</h4>
<p>A node-based structure. Every tree starts from a single node, called the root node. The root node can contain any number of child nodes, and every child node can again contain children. A tree node with no children is called a leaf node. In fact if you draw the nodes of a tree it looking like a real tree with branches. The AS3 display architecture is also a tree structure, so you could use this to manage your display objects and update them by traversing through the tree. Also, this is useful for decision trees, BVHs, storing a plot line or storing data recursively by applying the composite pattern.</p>
<h4>Binary Tree</h4>
<p>This is just a specialized kind of tree where each node is only allowed to have up to two children, called the left and right node. Binary trees are very often used for parsing input data, for example arithmetic expressions or when building a scripting system.</p>
<h4>Binary Search Tree (BST) and Hash Table</h4>
<p>Both structures store data that can be retrieved quickly by using a key. The method however differers greatly: The BST uses a recursive approach to split up large amounts of data into smaller sets. A hash table stores sparse key-based data using a hash-key in a small amount of space.</p>
<h4>Linked Lists</h4>
<p>A linked list is similar to an array. The main difference is that in an array, each cell contains just the data and is accessed by an index. A linked list consists of several node objects, which in addition to storing the data, manage a reference to the next node (singly linked) or to the next and previous node (doubly linked) in the list. Think of it as a more natural approach to work with sequential data.<br />
Other benefits are that you can insert and remove data quickly by just calling the appropriate method on the node itself &#8211; you don’t have to manage array indexes. Also in AS3 object access is faster than array access, so it competes very well in terms of performance when iterating over the list.</p>
<h4>Heap and Priority Queue</h4>
<p>A Heap is a special kind of binary tree in which every node is bigger than its child nodes. Whatever you throw into a heap, it’s automatically sorted so the item with the ‘most significant’ value (depending on the comparison function) is always the front item. A priority queue is build upon the heap structure, and can manage prioritized data &#8211; which can be used in limitless ways.</p>
<h4>Graph</h4>
<p>A graph is a loose node-based structure. Nodes are connected with arcs, and every node can point to any other node. They can also point to each other creating a bi-directional connection. It is essential for path finding, AI, soft-body dynamics with mass-springs systems and a lot more.</p>
<h4>Bit Vector</h4>
<p>A bit vector is some kind of array in which you can store boolean values (true/false &#8211; 1/0) as close as possible without wasting memory. I currently can’t think of a reasonable application, because usually you should have enough memory &#8211; but it’s nice to have because it shows basic bit masking operations.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2009/03/13/as3-data-structures-for-game-developers-ported-to-haxe-as-hx3ds-which-performs-faster/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>AS3 Wonderfl Site Compiles Code to Flash Dynamically with Community</title>
		<link>http://drawlogic.com/2009/02/02/as3-wonderfl-site-compiles-code-to-flash-dynamically-with-community/</link>
		<comments>http://drawlogic.com/2009/02/02/as3-wonderfl-site-compiles-code-to-flash-dynamically-with-community/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 13:18:13 +0000</pubDate>
		<dc:creator>drawk</dc:creator>
				<category><![CDATA[ACTIONSCRIPT]]></category>
		<category><![CDATA[ACTIONSCRIPT3]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[CODEPROJECT]]></category>
		<category><![CDATA[DEVELOPMENT]]></category>
		<category><![CDATA[MULTI-USER]]></category>
		<category><![CDATA[PROGRAMMING]]></category>
		<category><![CDATA[TECHNOLOGY]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[FLEX]]></category>

		<guid isPermaLink="false">http://drawlogic.com/?p=373</guid>
		<description><![CDATA[Don&#8217;t know how I missed this but just this last month a new site has launched called wonderfl that allows quick as3 compilation side by side that is encouraged by community and similar to a demo scene. This could be great for generating new ideas much like machima and demo scenes have done in the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wonderfl.kayac.com/" target="_blank"><img class="alignright" title="wonderfl as3" src="http://wonderfl.kayac.com/img/common/img_h1.gif" alt="" width="261" height="33" /></a></p>
<p>Don&#8217;t know how I missed this but just this last month a new site has launched called <a href="http://wonderfl.kayac.com/" target="_blank">wonderfl that allows quick as3 compilation</a> side by side that is encouraged by community and similar to a demo scene.</p>
<p>This could be great for generating new ideas much like machima and demo scenes have done in the past.  This stype of stuff goes down with the flash community anyways but being able to do it on a site and fork and evolve scripts and game it is a great idea.</p>
<p><a href="http://wonderfl.kayac.com/code/71344f9a655053d9f793a32c68f00921c67f1977" target="_blank">Effects </a>with <a href="http://wonderfl.kayac.com/code/a900fa3106d6ca19fa1b228c40848c01561a5075" target="_blank">filters</a>, <a href="http://wonderfl.kayac.com/code/217889fb7ae0a82d8781facdcfb861a6714db78a" target="_blank">bitmaps</a>, pixel manipulation, pixel bender and papervision would benefit greatly from the type of innovation that could happen here quickly in small doses. See what you can throw down, maybe some <a href="http://wonderfl.kayac.com/code/8c7d39a41b725a0acd263236128ba2c39e137d24" target="_blank">fireworks</a>.</p>
<p>
<div style="text-align:center;width:465px;"><iframe title="forked from: forked from: forked from: PS2 Firework (Particles and Motion blur) - wonderfl build flash online" src="http://wonderfl.kayac.com/blogparts/4ced8b6dac0ea564ebfbec167addc654c83fb6d2" width="465" height="490" style="border:1px black solid;"></iframe><a href="http://wonderfl.kayac.com/code/4ced8b6dac0ea564ebfbec167addc654c83fb6d2" title="forked from: forked from: forked from: PS2 Firework (Particles and Motion blur) - wonderfl build flash online">forked from: forked from: forked from: PS2 Firework (Particles and Motion blur) - wonderfl build flash online</a></div>
</p>
]]></content:encoded>
			<wfw:commentRss>http://drawlogic.com/2009/02/02/as3-wonderfl-site-compiles-code-to-flash-dynamically-with-community/feed/</wfw:commentRss>
		<slash:comments>1</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>

