<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Flash Platform and ActionScript Tutorials</title><link>http://www.thetechlabs.com</link><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/the_tech_labs" /><description>The Tech Labs</description><language>en</language><lastBuildDate>Fri, 12 Mar 2010 08:37:03 PST</lastBuildDate><generator>http://wordpress.org/?v=abc</generator><sy:updatePeriod xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">hourly</sy:updatePeriod><sy:updateFrequency xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">1</sy:updateFrequency><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/the_tech_labs" /><feedburner:info uri="the_tech_labs" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><image><link>http://www.thetechlabs.com</link><url>http://www.thetechlabs.com/wp-content/uploads/2009/03/thetechlabs_feed.jpg</url><title>The Tech Labs - Flash Platform and ActionScript Tutorials</title></image><feedburner:emailServiceId>the_tech_labs</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fthe_tech_labs" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fthe_tech_labs" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fthe_tech_labs" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/the_tech_labs" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fthe_tech_labs" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fthe_tech_labs" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fthe_tech_labs" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2Fthe_tech_labs" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2Fthe_tech_labs" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2Fthe_tech_labs" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsalloy.com/?rss=http%3A%2F%2Ffeeds.feedburner.com%2Fthe_tech_labs" src="http://www.newsalloy.com/subrss3.gif">Subscribe with NewsAlloy</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Fthe_tech_labs" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fthe_tech_labs" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://download.attensa.com/app/get_attensa.html?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fthe_tech_labs" src="http://www.attensa.com/blogs/attensa/WindowsLiveWriter/BadgeredintoBadges_10C02/attensa_feed_button5.gif">Subscribe with Attensa for Outlook</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fthe_tech_labs" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fthe_tech_labs" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.flurry.com/pushRssFeed.do?r=fb&amp;url=http%3A%2F%2Ffeeds.feedburner.com%2Fthe_tech_labs" src="http://www.flurry.com/images/flurry_rss_logo2.gif">Subscribe with Flurry</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2Fthe_tech_labs" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2Fthe_tech_labs" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><item><title>PhotoScape Download</title><link>http://feedproxy.google.com/~r/the_tech_labs/~3/WL9YL7FCCcE/</link><category>Free Software</category><category>image editing</category><category>photoscape</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">John Triggerman</dc:creator><pubDate>Thu, 04 Mar 2010 08:27:21 PST</pubDate><guid isPermaLink="false">http://www.thetechlabs.com/?p=1727</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<h2>PhotoScape &#8211; Image Editing Software</h2>
<p>&nbsp;</p>
<p>PhotoScape Download: PhotoScape is an easy-to-use, feature-rich image editing software that supports all the most common image formats. PhotoScape Download: whether you&#8217;re a beginner or an intermediate user, PhotoScape is ideal to fix and enhance all sorts of images. PhotoScape comes with pre-build templates for you to create photo collages, web comics and fumetti. It also has a standard set of red-eye removal, light and shadow and contrast features. PhotoScape is very intuitive, fast and only lacks the most advanced of image editing features. This software is expanding its features continuously!</p>
<p><center><script type="text/javascript">// <![CDATA[
  google_ad_client = "pub-9074158431949562"; /* TechLabs001 */ google_ad_slot = "7799230523"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script><br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
</script></center></p>
<p>&nbsp;</p>
<h3 style="text-align: center;"><a href="http://www.thetechlabs.com/flash-software/download-photoscape/">Download PhotoScape</a></h3>
 The Tech Labs Tutorial - Free Adobe Air, Flash and Flex Tutorials<img src="http://www.thetechlabs.com/?ak_action=api_record_view&id=1727&type=feed" alt="" />

<p><h2>Related posts:</h2><ul><small><li><a href='http://www.thetechlabs.com/free-software-download/daz-studio-download/' rel='bookmark' title='Permanent Link: DAZ Studio Download'>DAZ Studio Download</a></li></small>
<small><li><a href='http://www.thetechlabs.com/free-software-download/corel-draw-download/' rel='bookmark' title='Permanent Link: Corel DRAW Download'>Corel DRAW Download</a></li></small>
<small><li><a href='http://www.thetechlabs.com/free-software-download/swishmax-download/' rel='bookmark' title='Permanent Link: SWiSHmax Download'>SWiSHmax Download</a></li></small>
<small><li><a href='http://www.thetechlabs.com/free-software-download/autocad-download/' rel='bookmark' title='Permanent Link: AutoCAD Download'>AutoCAD Download</a></li></small>
</ul></p>
<p><a href="http://feedads.g.doubleclick.net/~a/c97dqnFz1l_Wpc_2rCl31eqkQyA/0/da"><img src="http://feedads.g.doubleclick.net/~a/c97dqnFz1l_Wpc_2rCl31eqkQyA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/c97dqnFz1l_Wpc_2rCl31eqkQyA/1/da"><img src="http://feedads.g.doubleclick.net/~a/c97dqnFz1l_Wpc_2rCl31eqkQyA/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=WL9YL7FCCcE:N1SKNuDqslk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?i=WL9YL7FCCcE:N1SKNuDqslk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=WL9YL7FCCcE:N1SKNuDqslk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?i=WL9YL7FCCcE:N1SKNuDqslk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=WL9YL7FCCcE:N1SKNuDqslk:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=WL9YL7FCCcE:N1SKNuDqslk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?i=WL9YL7FCCcE:N1SKNuDqslk:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=WL9YL7FCCcE:N1SKNuDqslk:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=cGdyc7Q-1BI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=WL9YL7FCCcE:N1SKNuDqslk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=WL9YL7FCCcE:N1SKNuDqslk:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=WL9YL7FCCcE:N1SKNuDqslk:DN0H40_Ym5U"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=DN0H40_Ym5U" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=WL9YL7FCCcE:N1SKNuDqslk:V-t1I-SPZMU"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=V-t1I-SPZMU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/the_tech_labs/~4/WL9YL7FCCcE" height="1" width="1"/>]]></content:encoded><description>&lt;h2&gt;PhotoScape &amp;#8211; Image Editing Software&lt;/h2&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;PhotoScape Download: PhotoScape is an easy-to-use, feature-rich image editing software that supports all the most common image formats. PhotoScape Download: whether you&amp;#8217;re a beginner or an intermediate user, PhotoScape is ideal to fix and enhance all sorts of images. PhotoScape comes with pre-build templates for you to create photo collages, web comics and fumetti. It also has a standard set of red-eye removal, light and shadow and contrast features. PhotoScape is very intuitive, fast and only lacks the most advanced of image editing features. This software is expanding its features continuously!&lt;/p&gt;
&lt;p&gt;&lt;center&gt;&lt;script type="text/javascript"&gt;// &lt;![CDATA[
  google_ad_client = "pub-9074158431949562"; /* TechLabs001 */ google_ad_slot = "7799230523"; google_ad_width = 300; google_ad_height = 250;
// ]]&amp;gt;&lt;/script&gt;&lt;br /&gt;
&lt;script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"&gt;
&lt;/script&gt;&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3 style="text-align: center;"&gt;&lt;a href="http://www.thetechlabs.com/flash-software/download-photoscape/"&gt;Download PhotoScape&lt;/a&gt;&lt;/h3&gt;
 The Tech Labs Tutorial - Free Adobe Air, Flash and Flex Tutorials&lt;img src="http://www.thetechlabs.com/?ak_action=api_record_view&amp;id=1727&amp;type=feed" alt="" /&gt;

&lt;p&gt;&lt;h2&gt;Related posts:&lt;/h2&gt;&lt;ul&gt;&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/free-software-download/daz-studio-download/' rel='bookmark' title='Permanent Link: DAZ Studio Download'&gt;DAZ Studio Download&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/free-software-download/corel-draw-download/' rel='bookmark' title='Permanent Link: Corel DRAW Download'&gt;Corel DRAW Download&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/free-software-download/swishmax-download/' rel='bookmark' title='Permanent Link: SWiSHmax Download'&gt;SWiSHmax Download&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/free-software-download/autocad-download/' rel='bookmark' title='Permanent Link: AutoCAD Download'&gt;AutoCAD Download&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;/ul&gt;&lt;/p&gt;&lt;div style="display:block"&gt;&lt;small&gt;&lt;em&gt;by John Triggerman &lt;br /&gt;&amp;copy;2010 &lt;a href="http://www.thetechlabs.com"&gt;Flash Platform and ActionScript Tutorials&lt;/a&gt;. All Rights Reserved.&lt;/em&gt;&lt;/small&gt;&lt;/div&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.thetechlabs.com/free-software-download/photoscape-download/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://www.thetechlabs.com/free-software-download/photoscape-download/</feedburner:origLink></item><item><title>Away3D Shoot’em’Up Tutorial – Sound Effects</title><link>http://feedproxy.google.com/~r/the_tech_labs/~3/YLsd9TByJXg/</link><category>3D</category><category>Flex</category><category>Games</category><category>Latest</category><category>Tutorials</category><category>frameworks</category><category>oop</category><category>sound effects</category><category>web-development</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">John Triggerman</dc:creator><pubDate>Mon, 15 Feb 2010 06:59:08 PST</pubDate><guid isPermaLink="false">http://www.thetechlabs.com/?p=1692</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>In this article we add some sound effects to the game.</p>
<h3>Result</h3>
<p style="text-align: center;"><object width="545" height="400" data="http://www.thetechlabs.com/wp-content/uploads/2010/02/SoundEffects.swf" type="application/x-shockwave-flash"><param name="src" value="http://www.thetechlabs.com/wp-content/uploads/2010/02/SoundEffects.swf" /></object></p>
<p style="text-align: center;"><a title="Download Source Files" href="http://www.thetechlabs.com/wp-content/uploads/2010/02/SoundEffects-Source.zip" target="_self"><img class="size-full wp-image-466 aligncenter" title="Download Source Files" src="http://www.thetechlabs.com/wp-content/uploads/2009/04/sourcefiles.jpg" alt="Download Source Files" width="246" height="93" /></a></p>
<h3>Requirements</h3>
<p><a rel="nofollow" href="http://www.adobe.com/products/flex/?promoid=BPDEQ" target="_blank">Adobe Flex v3.02</a></p>
<p><a rel="nofollow" href="http://away3d.com/downloads" target="_blank">Away3D v3.3.3 source code</a></p>
<p><a rel="nofollow" href="http://flintparticles.org/" target="_blank">Flint 2.1.0 source code</a></p>
<h3>Pre-Requisites</h3>
<p>You should read the previous articles in this series.</p>
<p><a href="http://www.thetechlabs.com/tutorials/3d/create-from-scratch-a-away3d-shootemup-game-part-1/" target="_blank">Create from Scratch a Away3D Shoot&#8217;em&#8217;Up Game: Part 1</a><br />
<a href="http://www.thetechlabs.com/tutorials/3d/create-from-scratch-a-away3d-shoot%E2%80%99em%E2%80%99up-game-part-2/" target="_blank">Create from Scratch a Away3D Shoot&#8217;em&#8217;Up Game: Part 2</a><br />
<a href="http://www.thetechlabs.com/tutorials/3d/create-from-scratch-a-away3d-shoot%E2%80%99em%E2%80%99up-game-part-3/" target="_blank">Create from Scratch a Away3D Shoot&#8217;em&#8217;Up Game: Part 3</a><br />
<a href="http://www.thetechlabs.com/tutorials/3d/create-from-scratch-a-away3d-shoot%E2%80%99em%E2%80%99up-game-part-4/" target="_blank">Create from Scratch a Away3D Shoot&#8217;em&#8217;Up Game: Part 4</a></p>
<h3>Sound Effects</h3>
<p>I remember playing Unreal when it was first released. The sniper rifle was one of my <span lang="en-au">favourite</span> weapons in multiplayer, but it sounded weak. Thankfully a patch was released that, among other things, gave the sniper rifle a much meatier sound effect. My frag count went up just because I loved the new sound so much.</p>
<p>Sound effects can add a whole new dimension to a game, and here we will look at how to get some sounds into our shoot&#8217;em&#8217;up.</p>
<h3>ResourceManager.as</h3>
<pre>package
{
	import away3d.materials.BitmapMaterial;
	import away3d.materials.TransformBitmapMaterial;

	import mx.core.BitmapAsset;
	import mx.core.SoundAsset;

	public class ResourceManager
	{
		[Embed (source="../media/building1.png")]
		public static const Building1:Class;
		public static const Building1_BitmapAsset:BitmapAsset = new Building1();
		public static const Building1_Tex:BitmapMaterial = new BitmapMaterial(Building1_BitmapAsset.bitmapData, {smooth:true});

		[Embed (source="../media/building2.png")]
		public static const Building2:Class;
		public static const Building2_BitmapAsset:BitmapAsset = new Building2();
		public static const Building2_Tex:BitmapMaterial = new BitmapMaterial(Building2_BitmapAsset.bitmapData, {smooth:true});

		[Embed (source="../media/building3.png")]
		public static const Building3:Class;
		public static const Building3_BitmapAsset:BitmapAsset = new Building3();
		public static const Building3_Tex:BitmapMaterial = new BitmapMaterial(Building3_BitmapAsset.bitmapData, {smooth:true});

		[Embed (source="../media/roof1.png")]
		public static const Roof1:Class;
		public static const Roof1_BitmapAsset:BitmapAsset = new Roof1();
		public static const Roof1_Tex:BitmapMaterial = new BitmapMaterial(Roof1_BitmapAsset.bitmapData, {smooth:true});

		[Embed (source="../media/background1.png")]
		public static const Background1:Class;
		public static const Background1_BitmapAsset:BitmapAsset = new Background1();
		public static const Background1_Tex:TransformBitmapMaterial = new TransformBitmapMaterial(Background1_BitmapAsset.bitmapData, {smooth:true});

		[Embed (source="../media/player.png")]
		public static const Player:Class;
		public static const Player_BitmapAsset:BitmapAsset = new Player();
		public static const Player_Tex:BitmapMaterial = new BitmapMaterial(Player_BitmapAsset.bitmapData);

		[Embed (source="../media/enemy.png")]
		public static const Enemy:Class;
		public static const Enemy_BitmapAsset:BitmapAsset = new Enemy();
		public static const Enemy_Tex:BitmapMaterial = new BitmapMaterial(Enemy_BitmapAsset.bitmapData);

		[Embed (source="../media/bullet.png")]
		public static const Bullet:Class;
		public static const Bullet_BitmapAsset:BitmapAsset = new Bullet();
		public static const Bullet_Tex:BitmapMaterial = new BitmapMaterial(Bullet_BitmapAsset.bitmapData);

		[Embed(source="../media/gun1.mp3")]
		public static var Gun1Sound:Class;
		public static var Gun1FX:SoundAsset = new Gun1Sound() as SoundAsset;

		[Embed(source="../media/explosion.mp3")]
		public static var ExplosionSound:Class;
		public static var ExplosionFX:SoundAsset = new ExplosionSound() as SoundAsset;
	}
}
</pre>
<p>Sounds are embedded into the SWF file just like images. Here we embed two MP3 files, and create new SoundAssets from the embedded resources. It&#8217;s these SoundAsset objects that we will use to play the sound effects. Because Flash has built in support for MP3, we don&#8217;t have to worry about decoding the files before they are played.</p>
<p>As you might have guessed from the names of the sound files, these two sound effects will be played when there is an explosion, and when a weapon is fired. The weapons have been very simple to this point, with the Player creating a new instance of the Weapon class directly when it is time to shoot. This setup does not easily allow the player to have different types of weapons, or to be able to create multiple weapons with every shot. Since the sound effects will be played when the weapons are fired, we first need to create a more flexible system for the weapons.</p>
<p>The Weapon class used to include a logic property, which was a reference to a function to be called during the enterFrame function. My idea for this was to allow the Weapon class to create multiple varieties of weapons, where the function pointed to by the logic property would define how the weapon behaved, and the startup function would initialise the necessary properties. When I looked at this again I realised that the Weapon class would end up having numerous properties that related to only one type of weapon e.g. the simple weapon would have a direction property, and a homing missile might have the a nearest enemy property. This would quickly clutter the Weapon class.</p>
<p>By designing the Weapon class in a way that allowed it to create multiple weapon variations I had hoped to save myself some typing by not having to create a whole bunch of subclasses. It&#8217;s a lesson I keep learning over and over: shortcuts will bite you in the ass later on. So here the Weapon class is stripped down to include just the basic functionality common to all weapons.</p>
<h3>Weapon.as</h3>
<pre>package
{
	import away3d.core.math.Number3D;
	import away3d.materials.BitmapMaterial;
	import away3d.primitives.Plane;

	public class Weapon extends MeshObject
	{
		protected static const WEAPON_X_LIMIT:Number = 70;
		protected static const WEAPON_Y_LIMIT:Number = 60;
		protected var damage:int = 0;

		public function Weapon()
		{
			super();
		}

		public override function shutdown():void
		{
			super.shutdown();
		}

		public function startupWeapon(engineManager:EngineManager, material:BitmapMaterial, position:Number3D, sizeX:Number, sizeY:Number, damage:int):Weapon
		{
			var plane:Plane = new Plane(
				{material:material,
				width:sizeX,
				height:sizeY,
				yUp:false});
			super.startupMeshObject(engineManager, plane);
			this.model.position = position;
			this.damage = damage;

			return this;
		}

		public override function enterFrame(dt:Number):void
		{
			if (this.model.x &gt; WEAPON_X_LIMIT ||
				this.model.x &lt; -WEAPON_X_LIMIT || 				this.model.y &gt; WEAPON_Y_LIMIT ||
				this.model.y &lt; -WEAPON_Y_LIMIT)
				this.shutdown();
		}

		public override function collision(other:MeshObject):void
		{
			if (other.collisionName == CollisionIdentifiers.ENEMY ||
				other.collisionName == CollisionIdentifiers.PLAYER)
				(other as DamageableObject).damage(this.damage);
			this.shutdown();
		}
	}
}</pre>
<p>A new class, BasicWeapon, is created to define weapons that just move in a straight line. Even though it might not seem like a big deal, splitting the Weapon class in two will make the code a lot more manageable as more weapon types are added.</p>
<h3>BasicWeapon.as</h3>
<pre>package
{
	import away3d.core.math.Number3D;

	public class BasicWeapon extends Weapon
	{
		protected static const WEAPON_SIZE:Number = 2;
		protected var speed:Number = 0;
		protected var direction:Number3D = null;

		public function BasicWeapon()
		{
			super();
		}

		protected function startupBasicWeapon(engineManager:EngineManager, position:Number3D, damage:int, xDir:Number, yDir:Number, speed:Number):BasicWeapon
		{
			this.startupWeapon(engineManager, ResourceManager.Bullet_Tex, position, WEAPON_SIZE, WEAPON_SIZE, damage);
			this.direction = new Number3D(xDir, yDir, 0);
			this.direction.normalize();
			this.speed = speed;
			return this;
		}

		public function startupBasicPlayerWeapon(engineManager:EngineManager, position:Number3D, damage:int, xDir:Number, yDir:Number, speed:Number):BasicWeapon
		{
			startupBasicWeapon(engineManager, position, damage, xDir, yDir, speed);
			this.collisionName = CollisionIdentifiers.PLAYERWEAPON;
			return this;
		}

		public function startupBasicEnemyWeapon(engineManager:EngineManager, position:Number3D, damage:int, xDir:Number, yDir:Number, speed:Number):BasicWeapon
		{
			startupBasicWeapon(engineManager, position, damage, xDir, yDir, speed);
			this.collisionName = CollisionIdentifiers.ENEMYWEAPON;
			return this;
		}

		public override function enterFrame(dt:Number):void
		{
			this.model.x += speed * dt;

			super.enterFrame(dt);
		}

	}
}
</pre>
<p>In order to easily define a selection of weapons for the player and the enemies to fire at each other, we need to separate the code for the weapon creation out of the Player class. Instead this code will be placed in a new class called WeaponManager.</p>
<h3>WeaponManager.as</h3>
<pre>package
{
	import away3d.core.math.Number3D;

	import flash.utils.Dictionary;

	public class WeaponManager
	{
		protected var engineManager:EngineManager = null;
		protected var weaponDatabase:Dictionary = new Dictionary();

		public function WeaponManager()
		{
			super();
		}

		public function startupWeaponManager(engineManager:EngineManager):WeaponManager
		{
			this.engineManager = engineManager;

			var weapon1:Dictionary = new Dictionary();
			weaponDatabase[1] = weapon1;

			weapon1[1] = weapon1Level1;
			weapon1[2] = weapon1Level2;

			return this;
		}

		public function createWeapon(weapon:int, weaponLevel:int, position:Number3D):Number
		{
			if (isValidWeapon(weapon, weaponLevel))
			{
				return weaponDatabase[weapon][weaponLevel](position);
			}

			return 0;
		}

		public function isValidWeapon(weapon:int, weaponLevel:int):Boolean
		{
			if (weaponDatabase[weapon] != null)
			{
				if (weaponDatabase[weapon][weaponLevel] != null)
					return true;
			}

			return false;
		}

		public function weapon1Level1(weaponPosition:Number3D):Number
		{
			var timeToNextShot:Number = 0.4;
			var damage:int = 1;
			var xDir:Number = 1;
			var yDir:Number = 0;
			var speed:Number = 100;
			new BasicWeapon().startupBasicPlayerWeapon(this.engineManager, weaponPosition, damage, xDir, yDir, speed);

			new SoundEffect().startupSoundEffect(this.engineManager, ResourceManager.Gun1FX);

			return timeToNextShot;
		}

		public function weapon1Level2(weaponPosition:Number3D):Number
		{
			var timeToNextShot:Number = 0.4;

			var damage:int = 1;
			var xDir:Number = 1;
			var yDir:Number = 0;
			var yDir2:Number = 1;
			var yDir3:Number = -1;
			var speed:Number = 100;
			new BasicWeapon().startupBasicPlayerWeapon(this.engineManager, weaponPosition, damage, xDir, yDir, speed);
			new BasicWeapon().startupBasicPlayerWeapon(this.engineManager, weaponPosition, damage, xDir, yDir2, speed);
			new BasicWeapon().startupBasicPlayerWeapon(this.engineManager, weaponPosition, damage, xDir, yDir3, speed);

			new SoundEffect().startupSoundEffect(this.engineManager, ResourceManager.Gun1FX);

			return timeToNextShot;
		}

	}
}
</pre>
<p>Each weapon is defined by a number and a level. So weapon number 1 level 1 are simple bullets that move in a straight line. Weapon 1 level 2 might be three bullets fired out by the player.</p>
<p>The weaponDatabase property is a dictionary of weapon numbers mapped to another dictionary. This second dictionary contains the weapon levels mapped to functions. So by calling weaponDatabase[1][2]() you are calling the function that is mapped to weapon number 1 level 2.</p>
<p>For convenience we will refer to a weapon definition as the combination of the weapon number and level, and the functions that are called to create these weapon definitions will be referred to as weapon definition functions.</p>
<p>For this demo we have two weapon definitions, and to them we have mapped two weapon definition functions: weapon1level1 and weapon1level2. The code to populate the weaponDatabase property is in the startupWeaponManager function.</p>
<pre>var weapon1:Dictionary = new Dictionary();
weaponDatabase[1] = weapon1;
</pre>
<p>First we create a new Dictionarty to reperent the weapon number, and assign it to the weaponDatabase dictionary.</p>
<pre>weapon1[1] = weapon1Level1;
weapon1[2] = weapon1Level2;
</pre>
<p>Next the two weapon definition functions are mapped to the appropiate weapon levels.</p>
<pre>public function weapon1Level1(weaponPosition:Number3D):Number
{
	var timeToNextShot:Number = 0.4;
	var damage:int = 1;
	var xDir:Number = 1;
	var yDir:Number = 0;
	var speed:Number = 100;
	new BasicWeapon().startupBasicPlayerWeapon(this.engineManager, weaponPosition, damage, xDir, yDir, speed);

	new SoundEffect().startupSoundEffect(this.engineManager, ResourceManager.Gun1FX);

	return timeToNextShot;
}
</pre>
<p>The weapon definition functions are quite simple. The variables that will be supplied to the Weapon startup function (the BasicWeapon startupBasicPlayerWeapon function in this case) are defined so they can be clearly identified, and then the weapon itself is created. This code is the equivalent of what used to be in the Player class when the Player created the weapons directly. These functions return the time that should elapse before the player or an enemy fires again.</p>
<p>You will also note that we are creating a new SoundEffect object along with the weapon. The SoundEffect class will be discussed later.</p>
<pre>public function createWeapon(weapon:int, weaponLevel:int, position:Number3D):Number
{
	if (isValidWeapon(weapon, weaponLevel))
	{
		return weaponDatabase[weapon][weaponLevel](position);
	}

	return 0;
}

public function isValidWeapon(weapon:int, weaponLevel:int):Boolean
{
	if (weaponDatabase[weapon] != null)
	{
		if (weaponDatabase[weapon][weaponLevel] != null)
			return true;
	}

	return false;
}
</pre>
<p>The createWeapon and isValidWeapon functions provide an easy way to call the weapon definition functions by supplying the weapon number and weapon level, as well as the position that the weapon should be initially created at.</p>
<p>We have only two weapon definitions here, but you can imagine how much code there would be if we had 10 weapons each with 10 levels. That code would make the Player class a complete mess, so it makes sense to separate it out into the WeaponManager class.</p>
<h3>Player.as</h3>
<pre>package
{
	import away3d.core.math.Number3D;
	import away3d.events.MouseEvent3D;
	import away3d.primitives.*;

	import flash.events.*;
	import flash.geom.*;
	import flash.media.*;

	import mx.core.*;

	public class Player extends DamageableObject
	{
		protected static const PLAYER_X_LIMIT:Number = 52;
		protected static const PLAYER_Y_LIMIT:Number = 38;
		protected static const PLAYER_WIDTH:Number = 16;
		protected static const PLAYER_HEIGHT:Number = 5;
		protected static const COLLISION_PLANE_WIDTH:Number = 150;
		protected static const COLLISION_PLANE_HEIGHT:Number = 100;
		protected static const PLAYER_SHIELDS:int = 10;
		protected var collisionPlane:MeshObject = null;
		protected var shooting:Boolean = false;
		protected var timeToNextShot:Number = 0;

		public function Player()
		{
			super();
		}

		public function startupPlayer(engineManager:EngineManager):Player
		{
			var plane:Plane = new Plane(
				{material:ResourceManager.Player_Tex,
				width:PLAYER_WIDTH,
				height:PLAYER_HEIGHT,
				yUp:false});
			super.startupMeshObject(engineManager, plane);

			var collisionPlaneMesh:Plane = new Plane(
				{material:new NullMaterial(),
				width:COLLISION_PLANE_WIDTH,
				height:COLLISION_PLANE_HEIGHT,
				yUp:false});
			collisionPlane = new MeshObject().startupMeshObject(engineManager, collisionPlaneMesh);
			collisionPlaneMesh.addEventListener(MouseEvent3D.MOUSE_MOVE, this.mouseMove3D);

			this.collisionName = CollisionIdentifiers.PLAYER;
			this.shields = PLAYER_SHIELDS;

			Application.application.pbarLife.setProgress(this.shields, PLAYER_SHIELDS);

			return this;
		}

		override public function shutdown():void
		{
			collisionPlane.model.removeEventListener(MouseEvent3D.MOUSE_MOVE, this.mouseMove3D);
			collisionPlane.shutdown();
			collisionPlane = null;
			super.shutdown();
		}

		override public function enterFrame(dt:Number):void
		{
			super.enterFrame(dt);

			timeToNextShot -= dt;
			timeToNextShot = timeToNextShot&lt;0?0:timeToNextShot; 			if (timeToNextShot == 0 &amp;&amp; shooting) 			{ 				var weaponPosition:Number3D = new Number3D(); 				weaponPosition.add(this.model.position, new Number3D(PLAYER_WIDTH / 2, 0, 0)); 				 				timeToNextShot = this.engineManager.MyApplicationManager.MyWeaponManager.createWeapon( 					this.engineManager.MyApplicationManager.MyPlayerWeapon, 					this.engineManager.MyApplicationManager.MyPlayerWeaponLevel,  					weaponPosition); 			} 				 			if (this.model.x &gt; PLAYER_X_LIMIT)
				this.model.x = PLAYER_X_LIMIT;
			if (this.model.x &lt; -PLAYER_X_LIMIT) 				this.model.x = -PLAYER_X_LIMIT; 			 			if (this.model.y &gt; PLAYER_Y_LIMIT)
				this.model.y = PLAYER_Y_LIMIT;
			if (this.model.y &lt; -PLAYER_Y_LIMIT)
				this.model.y = -PLAYER_Y_LIMIT;
		}

		public function mouseMove3D(event:MouseEvent3D):void
		{
			if (this.model)
			{
				this.model.x = event.sceneX;
				this.model.y = event.sceneY;
			}
		}

		public override function collision(other:MeshObject):void
		{

		}

		public override function mouseDown(event:MouseEvent):void
		{
			shooting = true;
		}

		public override function damage(amount:int):void
		{
			super.damage(amount);
			Application.application.pbarLife.setProgress(this.shields, PLAYER_SHIELDS);
		}

		public override function mouseUp(event:MouseEvent):void
		{
			shooting = false;
		}

		protected override function die():void
		{
			engineManager.MyApplicationManager.levelEnded();
			super.die();
		}
	}
}
</pre>
<p>With the weapon creation code now in the WeaponManager class, the Player has to be modified to call the createWeapon function instead of creating the weapon directly. The weapon number and weapon level properties are kept in the ApplicationManager.</p>
<pre>timeToNextShot = this.engineManager.MyApplicationManager.MyWeaponManager.createWeapon(
		this.engineManager.MyApplicationManager.MyPlayerWeapon,
		this.engineManager.MyApplicationManager.MyPlayerWeaponLevel,
		weaponPosition);
</pre>
<h3>ApplicationManager.as</h3>
<pre>package
{
	import mx.core.Application;

	public class ApplicationManager extends BaseObject
	{
		protected static const TIME_BETWEEN_BUILDINGS:Number = 2;
		protected static const TIME_BETWEEN_ENEMIES:Number = 1;
		protected static const TIME_TO_LEVEL_END:Number = 1;
		protected var timeToEndGame:Number = TIME_TO_LEVEL_END;
		protected var timeToNextBuilding:Number = 0;
		protected var timeToNextEnemy:Number = TIME_BETWEEN_ENEMIES;
		protected var levelHasEnded:Boolean = false;
		protected var myPlayerWeapon:int = 1;
		protected var myPlayerWeaponLevel:int = 1;
		protected var myWeaponManager:WeaponManager = null;
		public var myScore:int = 0;

		public function get MyWeaponManager():WeaponManager
		{
			return myWeaponManager;
		}

		public function get MyScore():int
		{
			return myScore;
		}

		public function get MyPlayerWeapon():int
		{
			return myPlayerWeapon;
		}

		public function get MyPlayerWeaponLevel():int
		{
			return myPlayerWeaponLevel;
		}

		public function set score(value:int):void
		{
			myScore = value;
			Application.application.lblScore.text = myScore;
		}

		public function ApplicationManager()
		{
			super();
		}

		public function startupApplicationManager(engineManager:EngineManager):ApplicationManager
		{
			this.startupBaseObject(engineManager);
			this.engineManager.addCollidingPair(CollisionIdentifiers.ENEMY, CollisionIdentifiers.PLAYER);
			this.engineManager.addCollidingPair(CollisionIdentifiers.ENEMY, CollisionIdentifiers.PLAYERWEAPON);
			this.myWeaponManager = new WeaponManager().startupWeaponManager(this.engineManager);

			return this;
		}

		public function startLevel1():void
		{
			timeToNextBuilding = 0;
			score = 0;

			new BackgroundPlane().startupBackgroundPlane(engineManager);
			new Player().startupPlayer(engineManager);

			// prepopulate the city
			for (var i:int = 0; i &lt; 5; ++i)
			{
				var building:BackgroundBuilding = new BackgroundBuilding();
				building.startupBackgroundBuilding(engineManager);
				building.enterFrame((i + 1) * 2);
			}
		}

		public function levelEnded():void
		{
			levelHasEnded = true;
		}

		public override function shutdown():void
		{
			super.shutdown();
		}

		public override function enterFrame(dt:Number):void
		{
			timeToNextBuilding -= dt;
			if (timeToNextBuilding &lt;= 0)
			{
				timeToNextBuilding = TIME_BETWEEN_BUILDINGS;
				new BackgroundBuilding().startupBackgroundBuilding(engineManager);
			}

			timeToNextEnemy -= dt;
			if (timeToNextEnemy &lt;= 0)
			{
				timeToNextEnemy = TIME_BETWEEN_ENEMIES;
				new Enemy().startupBasicEnemy(engineManager);
			}

			if (levelHasEnded)
			{
				timeToEndGame -= dt;
				if (timeToEndGame &lt;= 0)
				{
					engineManager.nextStateChange = "MainMenu";
				}
			}
		}
	}
}</pre>
<p>The ApplicationManager creates the WeaponManager in the startupApplicationManager function, and holds the players weapon definition in the MyPlayerWeapon and MyPlayerWeaponLevel properties.</p>
<p>For a tutorial on adding sound effects we have focused a lot on how the weapons are created. But fear not, now that we have cleaned up the weapon definitions and the code to create these<br />
weapons, we can now add some sound effects.</p>
<h3>SoundEffect.as</h3>
<pre>package
{
	import flash.events.Event;
	import flash.media.SoundChannel;

	import mx.core.SoundAsset;

	public class SoundEffect extends BaseObject
	{
		protected var channel:SoundChannel = null;

		public function SoundEffect()
		{
			super();
		}

		public function startupSoundEffect(engineManager:EngineManager, sound:SoundAsset):SoundEffect
		{
			super.startupBaseObject(engineManager);

			channel = sound.play();
			channel.addEventListener(Event.SOUND_COMPLETE, soundComplete);
			return this;
		}

		override public function shutdown():void
		{
			if (channel != null)
			{
				channel.removeEventListener(Event.SOUND_COMPLETE, soundComplete);
				channel.stop();
				channel = null;
			}

			super.shutdown();
		}

		public function soundComplete(event:Event):void
		{
			shutdown();
		}

	}
}</pre>
<p>Playing sound effects is actually very simple. The SoundAsset class (created in the ResourceManager) has a play function which returns a SoundChannel object. The function of the SoundEffect class is to play the SoundAsset, and stop the sound when the SoundEffect is shutdown.</p>
<pre>public function startupSoundEffect(sound:SoundAsset):SoundEffect
{
	super.startupBaseObject();

	channel = sound.play();
	channel.addEventListener(Event.SOUND_COMPLETE, soundComplete);
	return this;
}
</pre>
<p>The startupSoundEffect takes the SoundAsset to be played, stores the SoundChannel that is returned when the SoundAsset is played, and watches for when the sound has finished playing.</p>
<pre>public function soundComplete(event:Event):void
{
	shutdown();
}
</pre>
<p>The soundComplete function is called when the sound has finished playing. It just calls shutdown.</p>
<pre>override public function shutdown():void
{
	if (channel != null)
	{
		channel.removeEventListener(Event.SOUND_COMPLETE, soundComplete);
		channel.stop();
		channel = null;
	}

	super.shutdown();
}
</pre>
<p>When the SoundEffect is shutdown, either because the sound has finished playing, or the EngineManager has called the shutdown function when changing states, the event listener is removed and the sound effect is stopped.</p>
<p>The SoundEffect class provides a kind of &#8220;fire and forget&#8221; way to create a sound effect. When you create it the sound will play, and it will clean itself up when the sound effect has finished, or, by virtue of that fact that it extends the BaseObject class, the EngineManager will clean it up when the state changes.</p>
<h3>DamageableObject.as</h3>
<pre>package
{
	public class DamageableObject extends MeshObject
	{
		protected var shields:int = 0;

		public function DamageableObject()
		{
			super();
		}

		protected function die():void
		{
			new EmitterContainer().startupEmitterContainer(engineManager, new Explosion(this.model.position));
			new SoundEffect().startupSoundEffect(this.engineManager, ResourceManager.ExplosionFX);
			this.shutdown();
		}

		public function damage(amount:int):void
		{
			this.shields -= amount;
			if (this.shields &lt;= 0)
				this.die();
		}
	}
}
</pre>
<p>We have already seen how the SoundEffect class is used in the WeaponManger. In addition we will add a sound effect when the player or an enemy dies. Because the DamageableObject class defines the die function that is called when an enemy or player dies, this is a logical place to add the sound effect.</p>
<p>We have made quite a few changes to accommodate the sound effects. Some of these changes were needed to fix up some shortsighted code design (it&#8217;s a rule I keep catching myself out with, but don&#8217;t take shortcuts), and some were needed to implement a more extensible way to define and create the weapons. However these changes did give us a clear place to create the sound effects, and will lead onto the topic of the next article: powerups.</p>
 The Tech Labs Tutorial - Free Adobe Air, Flash and Flex Tutorials<img src="http://www.thetechlabs.com/?ak_action=api_record_view&id=1692&type=feed" alt="" />

<p><h2>Related posts:</h2><ul><small><li><a href='http://www.thetechlabs.com/tutorials/3d/alternativa-3d-series-tutorial-8-imposters/' rel='bookmark' title='Permanent Link: Alternativa 3D Series &#8211; Tutorial 8 &#8211; Imposters'>Alternativa 3D Series &#8211; Tutorial 8 &#8211; Imposters</a></li></small>
<small><li><a href='http://www.thetechlabs.com/tutorials/3d/alternativa-3d-series-tutorial-7-sprite3d/' rel='bookmark' title='Permanent Link: Alternativa 3D Series &#8211; Tutorial 7 &#8211; Sprite3D'>Alternativa 3D Series &#8211; Tutorial 7 &#8211; Sprite3D</a></li></small>
<small><li><a href='http://www.thetechlabs.com/tutorials/3d/alternativa-3d-a-flash-3d-engine-adding-material/' rel='bookmark' title='Permanent Link: Alternativa 3D Series &#8211; Tutorial 2 &#8211; Adding Material'>Alternativa 3D Series &#8211; Tutorial 2 &#8211; Adding Material</a></li></small>
<small><li><a href='http://www.thetechlabs.com/tutorials/3d/alternativa3d-creating-interactivity/' rel='bookmark' title='Permanent Link: Alternativa 3D Series &#8211; Tutorial 5 &#8211; Creating Interactivity'>Alternativa 3D Series &#8211; Tutorial 5 &#8211; Creating Interactivity</a></li></small>
<small><li><a href='http://www.thetechlabs.com/tutorials/3d/alternativa-3d-getting-started/' rel='bookmark' title='Permanent Link: Alternativa 3D Series &#8211; Tutorial 1 &#8211; Getting Started'>Alternativa 3D Series &#8211; Tutorial 1 &#8211; Getting Started</a></li></small>
</ul></p>
<p><a href="http://feedads.g.doubleclick.net/~a/i1WByOPwdU4L8hyJXrMrguBfOwA/0/da"><img src="http://feedads.g.doubleclick.net/~a/i1WByOPwdU4L8hyJXrMrguBfOwA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/i1WByOPwdU4L8hyJXrMrguBfOwA/1/da"><img src="http://feedads.g.doubleclick.net/~a/i1WByOPwdU4L8hyJXrMrguBfOwA/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=YLsd9TByJXg:6Oz0TGShjz0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?i=YLsd9TByJXg:6Oz0TGShjz0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=YLsd9TByJXg:6Oz0TGShjz0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?i=YLsd9TByJXg:6Oz0TGShjz0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=YLsd9TByJXg:6Oz0TGShjz0:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=YLsd9TByJXg:6Oz0TGShjz0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?i=YLsd9TByJXg:6Oz0TGShjz0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=YLsd9TByJXg:6Oz0TGShjz0:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=cGdyc7Q-1BI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=YLsd9TByJXg:6Oz0TGShjz0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=YLsd9TByJXg:6Oz0TGShjz0:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=YLsd9TByJXg:6Oz0TGShjz0:DN0H40_Ym5U"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=DN0H40_Ym5U" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=YLsd9TByJXg:6Oz0TGShjz0:V-t1I-SPZMU"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=V-t1I-SPZMU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/the_tech_labs/~4/YLsd9TByJXg" height="1" width="1"/>]]></content:encoded><description>&lt;p&gt;In this article we add some sound effects to the game.&lt;/p&gt;
&lt;h3&gt;Result&lt;/h3&gt;
&lt;p style="text-align: center;"&gt;&lt;object width="545" height="400" data="http://www.thetechlabs.com/wp-content/uploads/2010/02/SoundEffects.swf" type="application/x-shockwave-flash"&gt;&lt;param name="src" value="http://www.thetechlabs.com/wp-content/uploads/2010/02/SoundEffects.swf" /&gt;&lt;/object&gt;&lt;/p&gt;
&lt;p style="text-align: center;"&gt;&lt;a title="Download Source Files" href="http://www.thetechlabs.com/wp-content/uploads/2010/02/SoundEffects-Source.zip" target="_self"&gt;&lt;img class="size-full wp-image-466 aligncenter" title="Download Source Files" src="http://www.thetechlabs.com/wp-content/uploads/2009/04/sourcefiles.jpg" alt="Download Source Files" width="246" height="93" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Requirements&lt;/h3&gt;
&lt;p&gt;&lt;a rel="nofollow" href="http://www.adobe.com/products/flex/?promoid=BPDEQ" target="_blank"&gt;Adobe Flex v3.02&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" href="http://away3d.com/downloads" target="_blank"&gt;Away3D v3.3.3 source code&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" href="http://flintparticles.org/" target="_blank"&gt;Flint 2.1.0 source code&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Pre-Requisites&lt;/h3&gt;
&lt;p&gt;You should read the previous articles in this series.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.thetechlabs.com/tutorials/3d/create-from-scratch-a-away3d-shootemup-game-part-1/" target="_blank"&gt;Create from Scratch a Away3D Shoot&amp;#8217;em&amp;#8217;Up Game: Part 1&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.thetechlabs.com/tutorials/3d/create-from-scratch-a-away3d-shoot%E2%80%99em%E2%80%99up-game-part-2/" target="_blank"&gt;Create from Scratch a Away3D Shoot&amp;#8217;em&amp;#8217;Up Game: Part 2&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.thetechlabs.com/tutorials/3d/create-from-scratch-a-away3d-shoot%E2%80%99em%E2%80%99up-game-part-3/" target="_blank"&gt;Create from Scratch a Away3D Shoot&amp;#8217;em&amp;#8217;Up Game: Part 3&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://www.thetechlabs.com/tutorials/3d/create-from-scratch-a-away3d-shoot%E2%80%99em%E2%80%99up-game-part-4/" target="_blank"&gt;Create from Scratch a Away3D Shoot&amp;#8217;em&amp;#8217;Up Game: Part 4&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Sound Effects&lt;/h3&gt;
&lt;p&gt;I remember playing Unreal when it was first released. The sniper rifle was one of my &lt;span lang="en-au"&gt;favourite&lt;/span&gt; weapons in multiplayer, but it sounded weak. Thankfully a patch was released that, among other things, gave the sniper rifle a much meatier sound effect. My frag count went up just because I loved the new sound so much.&lt;/p&gt;
&lt;p&gt;Sound effects can add a whole new dimension to a game, and here we will look at how to get some sounds into our shoot&amp;#8217;em&amp;#8217;up.&lt;/p&gt;
&lt;h3&gt;ResourceManager.as&lt;/h3&gt;
&lt;pre&gt;package
{
	import away3d.materials.BitmapMaterial;
	import away3d.materials.TransformBitmapMaterial;

	import mx.core.BitmapAsset;
	import mx.core.SoundAsset;

	public class ResourceManager
	{
		[Embed (source="../media/building1.png")]
		public static const Building1:Class;
		public static const Building1_BitmapAsset:BitmapAsset = new Building1();
		public static const Building1_Tex:BitmapMaterial = new BitmapMaterial(Building1_BitmapAsset.bitmapData, {smooth:true});

		[Embed (source="../media/building2.png")]
		public static const Building2:Class;
		public static const Building2_BitmapAsset:BitmapAsset = new Building2();
		public static const Building2_Tex:BitmapMaterial = new BitmapMaterial(Building2_BitmapAsset.bitmapData, {smooth:true});

		[Embed (source="../media/building3.png")]
		public static const Building3:Class;
		public static const Building3_BitmapAsset:BitmapAsset = new Building3();
		public static const Building3_Tex:BitmapMaterial = new BitmapMaterial(Building3_BitmapAsset.bitmapData, {smooth:true});

		[Embed (source="../media/roof1.png")]
		public static const Roof1:Class;
		public static const Roof1_BitmapAsset:BitmapAsset = new Roof1();
		public static const Roof1_Tex:BitmapMaterial = new BitmapMaterial(Roof1_BitmapAsset.bitmapData, {smooth:true});

		[Embed (source="../media/background1.png")]
		public static const Background1:Class;
		public static const Background1_BitmapAsset:BitmapAsset = new Background1();
		public static const Background1_Tex:TransformBitmapMaterial = new TransformBitmapMaterial(Background1_BitmapAsset.bitmapData, {smooth:true});

		[Embed (source="../media/player.png")]
		public static const Player:Class;
		public static const Player_BitmapAsset:BitmapAsset = new Player();
		public static const Player_Tex:BitmapMaterial = new BitmapMaterial(Player_BitmapAsset.bitmapData);

		[Embed (source="../media/enemy.png")]
		public static const Enemy:Class;
		public static const Enemy_BitmapAsset:BitmapAsset = new Enemy();
		public static const Enemy_Tex:BitmapMaterial = new BitmapMaterial(Enemy_BitmapAsset.bitmapData);

		[Embed (source="../media/bullet.png")]
		public static const Bullet:Class;
		public static const Bullet_BitmapAsset:BitmapAsset = new Bullet();
		public static const Bullet_Tex:BitmapMaterial = new BitmapMaterial(Bullet_BitmapAsset.bitmapData);

		[Embed(source="../media/gun1.mp3")]
		public static var Gun1Sound:Class;
		public static var Gun1FX:SoundAsset = new Gun1Sound() as SoundAsset;

		[Embed(source="../media/explosion.mp3")]
		public static var ExplosionSound:Class;
		public static var ExplosionFX:SoundAsset = new ExplosionSound() as SoundAsset;
	}
}
&lt;/pre&gt;
&lt;p&gt;Sounds are embedded into the SWF file just like images. Here we embed two MP3 files, and create new SoundAssets from the embedded resources. It&amp;#8217;s these SoundAsset objects that we will use to play the sound effects. Because Flash has built in support for MP3, we don&amp;#8217;t have to worry about decoding the files before they are played.&lt;/p&gt;
&lt;p&gt;As you might have guessed from the names of the sound files, these two sound effects will be played when there is an explosion, and when a weapon is fired. The weapons have been very simple to this point, with the Player creating a new instance of the Weapon class directly when it is time to shoot. This setup does not easily allow the player to have different types of weapons, or to be able to create multiple weapons with every shot. Since the sound effects will be played when the weapons are fired, we first need to create a more flexible system for the weapons.&lt;/p&gt;
&lt;p&gt;The Weapon class used to include a logic property, which was a reference to a function to be called during the enterFrame function. My idea for this was to allow the Weapon class to create multiple varieties of weapons, where the function pointed to by the logic property would define how the weapon behaved, and the startup function would initialise the necessary properties. When I looked at this again I realised that the Weapon class would end up having numerous properties that related to only one type of weapon e.g. the simple weapon would have a direction property, and a homing missile might have the a nearest enemy property. This would quickly clutter the Weapon class.&lt;/p&gt;
&lt;p&gt;By designing the Weapon class in a way that allowed it to create multiple weapon variations I had hoped to save myself some typing by not having to create a whole bunch of subclasses. It&amp;#8217;s a lesson I keep learning over and over: shortcuts will bite you in the ass later on. So here the Weapon class is stripped down to include just the basic functionality common to all weapons.&lt;/p&gt;
&lt;h3&gt;Weapon.as&lt;/h3&gt;
&lt;pre&gt;package
{
	import away3d.core.math.Number3D;
	import away3d.materials.BitmapMaterial;
	import away3d.primitives.Plane;

	public class Weapon extends MeshObject
	{
		protected static const WEAPON_X_LIMIT:Number = 70;
		protected static const WEAPON_Y_LIMIT:Number = 60;
		protected var damage:int = 0;

		public function Weapon()
		{
			super();
		}

		public override function shutdown():void
		{
			super.shutdown();
		}

		public function startupWeapon(engineManager:EngineManager, material:BitmapMaterial, position:Number3D, sizeX:Number, sizeY:Number, damage:int):Weapon
		{
			var plane:Plane = new Plane(
				{material:material,
				width:sizeX,
				height:sizeY,
				yUp:false});
			super.startupMeshObject(engineManager, plane);
			this.model.position = position;
			this.damage = damage;

			return this;
		}

		public override function enterFrame(dt:Number):void
		{
			if (this.model.x &amp;gt; WEAPON_X_LIMIT ||
				this.model.x &amp;lt; -WEAPON_X_LIMIT || 				this.model.y &amp;gt; WEAPON_Y_LIMIT ||
				this.model.y &amp;lt; -WEAPON_Y_LIMIT)
				this.shutdown();
		}

		public override function collision(other:MeshObject):void
		{
			if (other.collisionName == CollisionIdentifiers.ENEMY ||
				other.collisionName == CollisionIdentifiers.PLAYER)
				(other as DamageableObject).damage(this.damage);
			this.shutdown();
		}
	}
}&lt;/pre&gt;
&lt;p&gt;A new class, BasicWeapon, is created to define weapons that just move in a straight line. Even though it might not seem like a big deal, splitting the Weapon class in two will make the code a lot more manageable as more weapon types are added.&lt;/p&gt;
&lt;h3&gt;BasicWeapon.as&lt;/h3&gt;
&lt;pre&gt;package
{
	import away3d.core.math.Number3D;

	public class BasicWeapon extends Weapon
	{
		protected static const WEAPON_SIZE:Number = 2;
		protected var speed:Number = 0;
		protected var direction:Number3D = null;

		public function BasicWeapon()
		{
			super();
		}

		protected function startupBasicWeapon(engineManager:EngineManager, position:Number3D, damage:int, xDir:Number, yDir:Number, speed:Number):BasicWeapon
		{
			this.startupWeapon(engineManager, ResourceManager.Bullet_Tex, position, WEAPON_SIZE, WEAPON_SIZE, damage);
			this.direction = new Number3D(xDir, yDir, 0);
			this.direction.normalize();
			this.speed = speed;
			return this;
		}

		public function startupBasicPlayerWeapon(engineManager:EngineManager, position:Number3D, damage:int, xDir:Number, yDir:Number, speed:Number):BasicWeapon
		{
			startupBasicWeapon(engineManager, position, damage, xDir, yDir, speed);
			this.collisionName = CollisionIdentifiers.PLAYERWEAPON;
			return this;
		}

		public function startupBasicEnemyWeapon(engineManager:EngineManager, position:Number3D, damage:int, xDir:Number, yDir:Number, speed:Number):BasicWeapon
		{
			startupBasicWeapon(engineManager, position, damage, xDir, yDir, speed);
			this.collisionName = CollisionIdentifiers.ENEMYWEAPON;
			return this;
		}

		public override function enterFrame(dt:Number):void
		{
			this.model.x += speed * dt;

			super.enterFrame(dt);
		}

	}
}
&lt;/pre&gt;
&lt;p&gt;In order to easily define a selection of weapons for the player and the enemies to fire at each other, we need to separate the code for the weapon creation out of the Player class. Instead this code will be placed in a new class called WeaponManager.&lt;/p&gt;
&lt;h3&gt;WeaponManager.as&lt;/h3&gt;
&lt;pre&gt;package
{
	import away3d.core.math.Number3D;

	import flash.utils.Dictionary;

	public class WeaponManager
	{
		protected var engineManager:EngineManager = null;
		protected var weaponDatabase:Dictionary = new Dictionary();

		public function WeaponManager()
		{
			super();
		}

		public function startupWeaponManager(engineManager:EngineManager):WeaponManager
		{
			this.engineManager = engineManager;

			var weapon1:Dictionary = new Dictionary();
			weaponDatabase[1] = weapon1;

			weapon1[1] = weapon1Level1;
			weapon1[2] = weapon1Level2;

			return this;
		}

		public function createWeapon(weapon:int, weaponLevel:int, position:Number3D):Number
		{
			if (isValidWeapon(weapon, weaponLevel))
			{
				return weaponDatabase[weapon][weaponLevel](position);
			}

			return 0;
		}

		public function isValidWeapon(weapon:int, weaponLevel:int):Boolean
		{
			if (weaponDatabase[weapon] != null)
			{
				if (weaponDatabase[weapon][weaponLevel] != null)
					return true;
			}

			return false;
		}

		public function weapon1Level1(weaponPosition:Number3D):Number
		{
			var timeToNextShot:Number = 0.4;
			var damage:int = 1;
			var xDir:Number = 1;
			var yDir:Number = 0;
			var speed:Number = 100;
			new BasicWeapon().startupBasicPlayerWeapon(this.engineManager, weaponPosition, damage, xDir, yDir, speed);

			new SoundEffect().startupSoundEffect(this.engineManager, ResourceManager.Gun1FX);

			return timeToNextShot;
		}

		public function weapon1Level2(weaponPosition:Number3D):Number
		{
			var timeToNextShot:Number = 0.4;

			var damage:int = 1;
			var xDir:Number = 1;
			var yDir:Number = 0;
			var yDir2:Number = 1;
			var yDir3:Number = -1;
			var speed:Number = 100;
			new BasicWeapon().startupBasicPlayerWeapon(this.engineManager, weaponPosition, damage, xDir, yDir, speed);
			new BasicWeapon().startupBasicPlayerWeapon(this.engineManager, weaponPosition, damage, xDir, yDir2, speed);
			new BasicWeapon().startupBasicPlayerWeapon(this.engineManager, weaponPosition, damage, xDir, yDir3, speed);

			new SoundEffect().startupSoundEffect(this.engineManager, ResourceManager.Gun1FX);

			return timeToNextShot;
		}

	}
}
&lt;/pre&gt;
&lt;p&gt;Each weapon is defined by a number and a level. So weapon number 1 level 1 are simple bullets that move in a straight line. Weapon 1 level 2 might be three bullets fired out by the player.&lt;/p&gt;
&lt;p&gt;The weaponDatabase property is a dictionary of weapon numbers mapped to another dictionary. This second dictionary contains the weapon levels mapped to functions. So by calling weaponDatabase[1][2]() you are calling the function that is mapped to weapon number 1 level 2.&lt;/p&gt;
&lt;p&gt;For convenience we will refer to a weapon definition as the combination of the weapon number and level, and the functions that are called to create these weapon definitions will be referred to as weapon definition functions.&lt;/p&gt;
&lt;p&gt;For this demo we have two weapon definitions, and to them we have mapped two weapon definition functions: weapon1level1 and weapon1level2. The code to populate the weaponDatabase property is in the startupWeaponManager function.&lt;/p&gt;
&lt;pre&gt;var weapon1:Dictionary = new Dictionary();
weaponDatabase[1] = weapon1;
&lt;/pre&gt;
&lt;p&gt;First we create a new Dictionarty to reperent the weapon number, and assign it to the weaponDatabase dictionary.&lt;/p&gt;
&lt;pre&gt;weapon1[1] = weapon1Level1;
weapon1[2] = weapon1Level2;
&lt;/pre&gt;
&lt;p&gt;Next the two weapon definition functions are mapped to the appropiate weapon levels.&lt;/p&gt;
&lt;pre&gt;public function weapon1Level1(weaponPosition:Number3D):Number
{
	var timeToNextShot:Number = 0.4;
	var damage:int = 1;
	var xDir:Number = 1;
	var yDir:Number = 0;
	var speed:Number = 100;
	new BasicWeapon().startupBasicPlayerWeapon(this.engineManager, weaponPosition, damage, xDir, yDir, speed);

	new SoundEffect().startupSoundEffect(this.engineManager, ResourceManager.Gun1FX);

	return timeToNextShot;
}
&lt;/pre&gt;
&lt;p&gt;The weapon definition functions are quite simple. The variables that will be supplied to the Weapon startup function (the BasicWeapon startupBasicPlayerWeapon function in this case) are defined so they can be clearly identified, and then the weapon itself is created. This code is the equivalent of what used to be in the Player class when the Player created the weapons directly. These functions return the time that should elapse before the player or an enemy fires again.&lt;/p&gt;
&lt;p&gt;You will also note that we are creating a new SoundEffect object along with the weapon. The SoundEffect class will be discussed later.&lt;/p&gt;
&lt;pre&gt;public function createWeapon(weapon:int, weaponLevel:int, position:Number3D):Number
{
	if (isValidWeapon(weapon, weaponLevel))
	{
		return weaponDatabase[weapon][weaponLevel](position);
	}

	return 0;
}

public function isValidWeapon(weapon:int, weaponLevel:int):Boolean
{
	if (weaponDatabase[weapon] != null)
	{
		if (weaponDatabase[weapon][weaponLevel] != null)
			return true;
	}

	return false;
}
&lt;/pre&gt;
&lt;p&gt;The createWeapon and isValidWeapon functions provide an easy way to call the weapon definition functions by supplying the weapon number and weapon level, as well as the position that the weapon should be initially created at.&lt;/p&gt;
&lt;p&gt;We have only two weapon definitions here, but you can imagine how much code there would be if we had 10 weapons each with 10 levels. That code would make the Player class a complete mess, so it makes sense to separate it out into the WeaponManager class.&lt;/p&gt;
&lt;h3&gt;Player.as&lt;/h3&gt;
&lt;pre&gt;package
{
	import away3d.core.math.Number3D;
	import away3d.events.MouseEvent3D;
	import away3d.primitives.*;

	import flash.events.*;
	import flash.geom.*;
	import flash.media.*;

	import mx.core.*;

	public class Player extends DamageableObject
	{
		protected static const PLAYER_X_LIMIT:Number = 52;
		protected static const PLAYER_Y_LIMIT:Number = 38;
		protected static const PLAYER_WIDTH:Number = 16;
		protected static const PLAYER_HEIGHT:Number = 5;
		protected static const COLLISION_PLANE_WIDTH:Number = 150;
		protected static const COLLISION_PLANE_HEIGHT:Number = 100;
		protected static const PLAYER_SHIELDS:int = 10;
		protected var collisionPlane:MeshObject = null;
		protected var shooting:Boolean = false;
		protected var timeToNextShot:Number = 0;

		public function Player()
		{
			super();
		}

		public function startupPlayer(engineManager:EngineManager):Player
		{
			var plane:Plane = new Plane(
				{material:ResourceManager.Player_Tex,
				width:PLAYER_WIDTH,
				height:PLAYER_HEIGHT,
				yUp:false});
			super.startupMeshObject(engineManager, plane);

			var collisionPlaneMesh:Plane = new Plane(
				{material:new NullMaterial(),
				width:COLLISION_PLANE_WIDTH,
				height:COLLISION_PLANE_HEIGHT,
				yUp:false});
			collisionPlane = new MeshObject().startupMeshObject(engineManager, collisionPlaneMesh);
			collisionPlaneMesh.addEventListener(MouseEvent3D.MOUSE_MOVE, this.mouseMove3D);

			this.collisionName = CollisionIdentifiers.PLAYER;
			this.shields = PLAYER_SHIELDS;

			Application.application.pbarLife.setProgress(this.shields, PLAYER_SHIELDS);

			return this;
		}

		override public function shutdown():void
		{
			collisionPlane.model.removeEventListener(MouseEvent3D.MOUSE_MOVE, this.mouseMove3D);
			collisionPlane.shutdown();
			collisionPlane = null;
			super.shutdown();
		}

		override public function enterFrame(dt:Number):void
		{
			super.enterFrame(dt);

			timeToNextShot -= dt;
			timeToNextShot = timeToNextShot&amp;lt;0?0:timeToNextShot; 			if (timeToNextShot == 0 &amp;amp;&amp;amp; shooting) 			{ 				var weaponPosition:Number3D = new Number3D(); 				weaponPosition.add(this.model.position, new Number3D(PLAYER_WIDTH / 2, 0, 0)); 				 				timeToNextShot = this.engineManager.MyApplicationManager.MyWeaponManager.createWeapon( 					this.engineManager.MyApplicationManager.MyPlayerWeapon, 					this.engineManager.MyApplicationManager.MyPlayerWeaponLevel,  					weaponPosition); 			} 				 			if (this.model.x &amp;gt; PLAYER_X_LIMIT)
				this.model.x = PLAYER_X_LIMIT;
			if (this.model.x &amp;lt; -PLAYER_X_LIMIT) 				this.model.x = -PLAYER_X_LIMIT; 			 			if (this.model.y &amp;gt; PLAYER_Y_LIMIT)
				this.model.y = PLAYER_Y_LIMIT;
			if (this.model.y &amp;lt; -PLAYER_Y_LIMIT)
				this.model.y = -PLAYER_Y_LIMIT;
		}

		public function mouseMove3D(event:MouseEvent3D):void
		{
			if (this.model)
			{
				this.model.x = event.sceneX;
				this.model.y = event.sceneY;
			}
		}

		public override function collision(other:MeshObject):void
		{

		}

		public override function mouseDown(event:MouseEvent):void
		{
			shooting = true;
		}

		public override function damage(amount:int):void
		{
			super.damage(amount);
			Application.application.pbarLife.setProgress(this.shields, PLAYER_SHIELDS);
		}

		public override function mouseUp(event:MouseEvent):void
		{
			shooting = false;
		}

		protected override function die():void
		{
			engineManager.MyApplicationManager.levelEnded();
			super.die();
		}
	}
}
&lt;/pre&gt;
&lt;p&gt;With the weapon creation code now in the WeaponManager class, the Player has to be modified to call the createWeapon function instead of creating the weapon directly. The weapon number and weapon level properties are kept in the ApplicationManager.&lt;/p&gt;
&lt;pre&gt;timeToNextShot = this.engineManager.MyApplicationManager.MyWeaponManager.createWeapon(
		this.engineManager.MyApplicationManager.MyPlayerWeapon,
		this.engineManager.MyApplicationManager.MyPlayerWeaponLevel,
		weaponPosition);
&lt;/pre&gt;
&lt;h3&gt;ApplicationManager.as&lt;/h3&gt;
&lt;pre&gt;package
{
	import mx.core.Application;

	public class ApplicationManager extends BaseObject
	{
		protected static const TIME_BETWEEN_BUILDINGS:Number = 2;
		protected static const TIME_BETWEEN_ENEMIES:Number = 1;
		protected static const TIME_TO_LEVEL_END:Number = 1;
		protected var timeToEndGame:Number = TIME_TO_LEVEL_END;
		protected var timeToNextBuilding:Number = 0;
		protected var timeToNextEnemy:Number = TIME_BETWEEN_ENEMIES;
		protected var levelHasEnded:Boolean = false;
		protected var myPlayerWeapon:int = 1;
		protected var myPlayerWeaponLevel:int = 1;
		protected var myWeaponManager:WeaponManager = null;
		public var myScore:int = 0;

		public function get MyWeaponManager():WeaponManager
		{
			return myWeaponManager;
		}

		public function get MyScore():int
		{
			return myScore;
		}

		public function get MyPlayerWeapon():int
		{
			return myPlayerWeapon;
		}

		public function get MyPlayerWeaponLevel():int
		{
			return myPlayerWeaponLevel;
		}

		public function set score(value:int):void
		{
			myScore = value;
			Application.application.lblScore.text = myScore;
		}

		public function ApplicationManager()
		{
			super();
		}

		public function startupApplicationManager(engineManager:EngineManager):ApplicationManager
		{
			this.startupBaseObject(engineManager);
			this.engineManager.addCollidingPair(CollisionIdentifiers.ENEMY, CollisionIdentifiers.PLAYER);
			this.engineManager.addCollidingPair(CollisionIdentifiers.ENEMY, CollisionIdentifiers.PLAYERWEAPON);
			this.myWeaponManager = new WeaponManager().startupWeaponManager(this.engineManager);

			return this;
		}

		public function startLevel1():void
		{
			timeToNextBuilding = 0;
			score = 0;

			new BackgroundPlane().startupBackgroundPlane(engineManager);
			new Player().startupPlayer(engineManager);

			// prepopulate the city
			for (var i:int = 0; i &amp;lt; 5; ++i)
			{
				var building:BackgroundBuilding = new BackgroundBuilding();
				building.startupBackgroundBuilding(engineManager);
				building.enterFrame((i + 1) * 2);
			}
		}

		public function levelEnded():void
		{
			levelHasEnded = true;
		}

		public override function shutdown():void
		{
			super.shutdown();
		}

		public override function enterFrame(dt:Number):void
		{
			timeToNextBuilding -= dt;
			if (timeToNextBuilding &amp;lt;= 0)
			{
				timeToNextBuilding = TIME_BETWEEN_BUILDINGS;
				new BackgroundBuilding().startupBackgroundBuilding(engineManager);
			}

			timeToNextEnemy -= dt;
			if (timeToNextEnemy &amp;lt;= 0)
			{
				timeToNextEnemy = TIME_BETWEEN_ENEMIES;
				new Enemy().startupBasicEnemy(engineManager);
			}

			if (levelHasEnded)
			{
				timeToEndGame -= dt;
				if (timeToEndGame &amp;lt;= 0)
				{
					engineManager.nextStateChange = "MainMenu";
				}
			}
		}
	}
}&lt;/pre&gt;
&lt;p&gt;The ApplicationManager creates the WeaponManager in the startupApplicationManager function, and holds the players weapon definition in the MyPlayerWeapon and MyPlayerWeaponLevel properties.&lt;/p&gt;
&lt;p&gt;For a tutorial on adding sound effects we have focused a lot on how the weapons are created. But fear not, now that we have cleaned up the weapon definitions and the code to create these&lt;br /&gt;
weapons, we can now add some sound effects.&lt;/p&gt;
&lt;h3&gt;SoundEffect.as&lt;/h3&gt;
&lt;pre&gt;package
{
	import flash.events.Event;
	import flash.media.SoundChannel;

	import mx.core.SoundAsset;

	public class SoundEffect extends BaseObject
	{
		protected var channel:SoundChannel = null;

		public function SoundEffect()
		{
			super();
		}

		public function startupSoundEffect(engineManager:EngineManager, sound:SoundAsset):SoundEffect
		{
			super.startupBaseObject(engineManager);

			channel = sound.play();
			channel.addEventListener(Event.SOUND_COMPLETE, soundComplete);
			return this;
		}

		override public function shutdown():void
		{
			if (channel != null)
			{
				channel.removeEventListener(Event.SOUND_COMPLETE, soundComplete);
				channel.stop();
				channel = null;
			}

			super.shutdown();
		}

		public function soundComplete(event:Event):void
		{
			shutdown();
		}

	}
}&lt;/pre&gt;
&lt;p&gt;Playing sound effects is actually very simple. The SoundAsset class (created in the ResourceManager) has a play function which returns a SoundChannel object. The function of the SoundEffect class is to play the SoundAsset, and stop the sound when the SoundEffect is shutdown.&lt;/p&gt;
&lt;pre&gt;public function startupSoundEffect(sound:SoundAsset):SoundEffect
{
	super.startupBaseObject();

	channel = sound.play();
	channel.addEventListener(Event.SOUND_COMPLETE, soundComplete);
	return this;
}
&lt;/pre&gt;
&lt;p&gt;The startupSoundEffect takes the SoundAsset to be played, stores the SoundChannel that is returned when the SoundAsset is played, and watches for when the sound has finished playing.&lt;/p&gt;
&lt;pre&gt;public function soundComplete(event:Event):void
{
	shutdown();
}
&lt;/pre&gt;
&lt;p&gt;The soundComplete function is called when the sound has finished playing. It just calls shutdown.&lt;/p&gt;
&lt;pre&gt;override public function shutdown():void
{
	if (channel != null)
	{
		channel.removeEventListener(Event.SOUND_COMPLETE, soundComplete);
		channel.stop();
		channel = null;
	}

	super.shutdown();
}
&lt;/pre&gt;
&lt;p&gt;When the SoundEffect is shutdown, either because the sound has finished playing, or the EngineManager has called the shutdown function when changing states, the event listener is removed and the sound effect is stopped.&lt;/p&gt;
&lt;p&gt;The SoundEffect class provides a kind of &amp;#8220;fire and forget&amp;#8221; way to create a sound effect. When you create it the sound will play, and it will clean itself up when the sound effect has finished, or, by virtue of that fact that it extends the BaseObject class, the EngineManager will clean it up when the state changes.&lt;/p&gt;
&lt;h3&gt;DamageableObject.as&lt;/h3&gt;
&lt;pre&gt;package
{
	public class DamageableObject extends MeshObject
	{
		protected var shields:int = 0;

		public function DamageableObject()
		{
			super();
		}

		protected function die():void
		{
			new EmitterContainer().startupEmitterContainer(engineManager, new Explosion(this.model.position));
			new SoundEffect().startupSoundEffect(this.engineManager, ResourceManager.ExplosionFX);
			this.shutdown();
		}

		public function damage(amount:int):void
		{
			this.shields -= amount;
			if (this.shields &amp;lt;= 0)
				this.die();
		}
	}
}
&lt;/pre&gt;
&lt;p&gt;We have already seen how the SoundEffect class is used in the WeaponManger. In addition we will add a sound effect when the player or an enemy dies. Because the DamageableObject class defines the die function that is called when an enemy or player dies, this is a logical place to add the sound effect.&lt;/p&gt;
&lt;p&gt;We have made quite a few changes to accommodate the sound effects. Some of these changes were needed to fix up some shortsighted code design (it&amp;#8217;s a rule I keep catching myself out with, but don&amp;#8217;t take shortcuts), and some were needed to implement a more extensible way to define and create the weapons. However these changes did give us a clear place to create the sound effects, and will lead onto the topic of the next article: powerups.&lt;/p&gt;
 The Tech Labs Tutorial - Free Adobe Air, Flash and Flex Tutorials&lt;img src="http://www.thetechlabs.com/?ak_action=api_record_view&amp;id=1692&amp;type=feed" alt="" /&gt;

&lt;p&gt;&lt;h2&gt;Related posts:&lt;/h2&gt;&lt;ul&gt;&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/tutorials/3d/alternativa-3d-series-tutorial-8-imposters/' rel='bookmark' title='Permanent Link: Alternativa 3D Series &amp;#8211; Tutorial 8 &amp;#8211; Imposters'&gt;Alternativa 3D Series &amp;#8211; Tutorial 8 &amp;#8211; Imposters&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/tutorials/3d/alternativa-3d-series-tutorial-7-sprite3d/' rel='bookmark' title='Permanent Link: Alternativa 3D Series &amp;#8211; Tutorial 7 &amp;#8211; Sprite3D'&gt;Alternativa 3D Series &amp;#8211; Tutorial 7 &amp;#8211; Sprite3D&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/tutorials/3d/alternativa-3d-a-flash-3d-engine-adding-material/' rel='bookmark' title='Permanent Link: Alternativa 3D Series &amp;#8211; Tutorial 2 &amp;#8211; Adding Material'&gt;Alternativa 3D Series &amp;#8211; Tutorial 2 &amp;#8211; Adding Material&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/tutorials/3d/alternativa3d-creating-interactivity/' rel='bookmark' title='Permanent Link: Alternativa 3D Series &amp;#8211; Tutorial 5 &amp;#8211; Creating Interactivity'&gt;Alternativa 3D Series &amp;#8211; Tutorial 5 &amp;#8211; Creating Interactivity&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/tutorials/3d/alternativa-3d-getting-started/' rel='bookmark' title='Permanent Link: Alternativa 3D Series &amp;#8211; Tutorial 1 &amp;#8211; Getting Started'&gt;Alternativa 3D Series &amp;#8211; Tutorial 1 &amp;#8211; Getting Started&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;/ul&gt;&lt;/p&gt;&lt;div style="display:block"&gt;&lt;small&gt;&lt;em&gt;by John Triggerman &lt;br /&gt;&amp;copy;2010 &lt;a href="http://www.thetechlabs.com"&gt;Flash Platform and ActionScript Tutorials&lt;/a&gt;. All Rights Reserved.&lt;/em&gt;&lt;/small&gt;&lt;/div&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.thetechlabs.com/tutorials/3d/away3d-shootemup-tutorial-sound-effects/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">3</slash:comments><feedburner:origLink>http://www.thetechlabs.com/tutorials/3d/away3d-shootemup-tutorial-sound-effects/</feedburner:origLink></item><item><title>Corel DRAW Download</title><link>http://feedproxy.google.com/~r/the_tech_labs/~3/wKkHgAg-7dM/</link><category>Free Software</category><category>corel draw</category><category>coreldraw</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">John Triggerman</dc:creator><pubDate>Fri, 12 Feb 2010 02:53:40 PST</pubDate><guid isPermaLink="false">http://www.thetechlabs.com/?p=1660</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<h2>Corel DRAW &#8211; Illustration Software</h2>
<p>&nbsp;</p>
<p>Corel DRAW Download: Corel DRAW is a powerful vector graphics editor developed by Corel. Corel DRAW is part of Corel DRAW Graphics Suite, which offers a great collection of powerful design software for illustrators. Corel DRAW Download: to tackle all sort of design jobs! The suite contains Corel DRAW, Corel PHOTO PAINT, Corel CAPTURE as well as other useful software. Corel DRAW is the main application for vector design and layout. The suite also has a solid in-program help with hints and tutorials so even beginners can get started with ease. You may try Corel DRAW for 15 days free!</p>
<p><center><script type="text/javascript">// <![CDATA[
  google_ad_client = "pub-9074158431949562"; /* TechLabs001 */ google_ad_slot = "7799230523"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script><br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
</script></center></p>
<p>&nbsp;</p>
<h3 style="text-align: center;"><a href="http://www.thetechlabs.com/flash-software/download-corel-draw/">Download Corel DRAW</a></h3>
 The Tech Labs Tutorial - Free Adobe Air, Flash and Flex Tutorials<img src="http://www.thetechlabs.com/?ak_action=api_record_view&id=1660&type=feed" alt="" />

<p><h2>Related posts:</h2><ul><small><li><a href='http://www.thetechlabs.com/free-software-download/koolmoves-download/' rel='bookmark' title='Permanent Link: KoolMoves Download'>KoolMoves Download</a></li></small>
<small><li><a href='http://www.thetechlabs.com/free-software-download/autocad-download/' rel='bookmark' title='Permanent Link: AutoCAD Download'>AutoCAD Download</a></li></small>
<small><li><a href='http://www.thetechlabs.com/free-software-download/swishmax-download/' rel='bookmark' title='Permanent Link: SWiSHmax Download'>SWiSHmax Download</a></li></small>
<small><li><a href='http://www.thetechlabs.com/free-software-download/google-sketchup-download/' rel='bookmark' title='Permanent Link: Google SketchUp Download'>Google SketchUp Download</a></li></small>
</ul></p>
<p><a href="http://feedads.g.doubleclick.net/~a/-FqstquP1vaDxckiJiu2woTpGao/0/da"><img src="http://feedads.g.doubleclick.net/~a/-FqstquP1vaDxckiJiu2woTpGao/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/-FqstquP1vaDxckiJiu2woTpGao/1/da"><img src="http://feedads.g.doubleclick.net/~a/-FqstquP1vaDxckiJiu2woTpGao/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=wKkHgAg-7dM:FGQkwr1CsWA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?i=wKkHgAg-7dM:FGQkwr1CsWA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=wKkHgAg-7dM:FGQkwr1CsWA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?i=wKkHgAg-7dM:FGQkwr1CsWA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=wKkHgAg-7dM:FGQkwr1CsWA:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=wKkHgAg-7dM:FGQkwr1CsWA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?i=wKkHgAg-7dM:FGQkwr1CsWA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=wKkHgAg-7dM:FGQkwr1CsWA:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=cGdyc7Q-1BI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=wKkHgAg-7dM:FGQkwr1CsWA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=wKkHgAg-7dM:FGQkwr1CsWA:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=wKkHgAg-7dM:FGQkwr1CsWA:DN0H40_Ym5U"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=DN0H40_Ym5U" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=wKkHgAg-7dM:FGQkwr1CsWA:V-t1I-SPZMU"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=V-t1I-SPZMU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/the_tech_labs/~4/wKkHgAg-7dM" height="1" width="1"/>]]></content:encoded><description>&lt;h2&gt;Corel DRAW &amp;#8211; Illustration Software&lt;/h2&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Corel DRAW Download: Corel DRAW is a powerful vector graphics editor developed by Corel. Corel DRAW is part of Corel DRAW Graphics Suite, which offers a great collection of powerful design software for illustrators. Corel DRAW Download: to tackle all sort of design jobs! The suite contains Corel DRAW, Corel PHOTO PAINT, Corel CAPTURE as well as other useful software. Corel DRAW is the main application for vector design and layout. The suite also has a solid in-program help with hints and tutorials so even beginners can get started with ease. You may try Corel DRAW for 15 days free!&lt;/p&gt;
&lt;p&gt;&lt;center&gt;&lt;script type="text/javascript"&gt;// &lt;![CDATA[
  google_ad_client = "pub-9074158431949562"; /* TechLabs001 */ google_ad_slot = "7799230523"; google_ad_width = 300; google_ad_height = 250;
// ]]&amp;gt;&lt;/script&gt;&lt;br /&gt;
&lt;script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"&gt;
&lt;/script&gt;&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3 style="text-align: center;"&gt;&lt;a href="http://www.thetechlabs.com/flash-software/download-corel-draw/"&gt;Download Corel DRAW&lt;/a&gt;&lt;/h3&gt;
 The Tech Labs Tutorial - Free Adobe Air, Flash and Flex Tutorials&lt;img src="http://www.thetechlabs.com/?ak_action=api_record_view&amp;id=1660&amp;type=feed" alt="" /&gt;

&lt;p&gt;&lt;h2&gt;Related posts:&lt;/h2&gt;&lt;ul&gt;&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/free-software-download/koolmoves-download/' rel='bookmark' title='Permanent Link: KoolMoves Download'&gt;KoolMoves Download&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/free-software-download/autocad-download/' rel='bookmark' title='Permanent Link: AutoCAD Download'&gt;AutoCAD Download&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/free-software-download/swishmax-download/' rel='bookmark' title='Permanent Link: SWiSHmax Download'&gt;SWiSHmax Download&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/free-software-download/google-sketchup-download/' rel='bookmark' title='Permanent Link: Google SketchUp Download'&gt;Google SketchUp Download&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;/ul&gt;&lt;/p&gt;&lt;div style="display:block"&gt;&lt;small&gt;&lt;em&gt;by John Triggerman &lt;br /&gt;&amp;copy;2010 &lt;a href="http://www.thetechlabs.com"&gt;Flash Platform and ActionScript Tutorials&lt;/a&gt;. All Rights Reserved.&lt;/em&gt;&lt;/small&gt;&lt;/div&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.thetechlabs.com/free-software-download/corel-draw-download/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://www.thetechlabs.com/free-software-download/corel-draw-download/</feedburner:origLink></item><item><title>KoolMoves Download</title><link>http://feedproxy.google.com/~r/the_tech_labs/~3/DDFbFBYt0l4/</link><category>Free Software</category><category>Flash Creation</category><category>free download</category><category>koolmoves</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">John Triggerman</dc:creator><pubDate>Wed, 03 Feb 2010 03:04:06 PST</pubDate><guid isPermaLink="false">http://www.thetechlabs.com/?p=1649</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<h2>KoolMoves &#8211; Flash Software</h2>
<p>&nbsp;</p>
<p>KoolMoves Download: KoolMoves is an affordable, easy-to-use Flash creation software developed by Lucky Monkey Designs and used by both beginners and professionals to create rich interactive web content. KoolMoves Download: to help you create Flash banners, web pages, slide shows, navigation systems, etc. This great application combines ease of use with a wide range of powerful animation effects for creating professional quality Flash animations. It also has a large library of text effects, clip arts and templates. KoolMoves is free to try and widely considered as a very affordable Flash authoring tool. For all budgets!</p>
<p><center><script type="text/javascript">// <![CDATA[
  google_ad_client = "pub-9074158431949562"; /* TechLabs001 */ google_ad_slot = "7799230523"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script><br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
</script></center></p>
<p>&nbsp;</p>
<h3 style="text-align: center;"><a href="http://www.thetechlabs.com/flash-software/download-koolmoves/">Download KoolMoves</a></h3>
 The Tech Labs Tutorial - Free Adobe Air, Flash and Flex Tutorials<img src="http://www.thetechlabs.com/?ak_action=api_record_view&id=1649&type=feed" alt="" />

<p><h2>Related posts:</h2><ul><small><li><a href='http://www.thetechlabs.com/free-software-download/photoscape-download/' rel='bookmark' title='Permanent Link: PhotoScape Download'>PhotoScape Download</a></li></small>
<small><li><a href='http://www.thetechlabs.com/free-software-download/swishmax-download/' rel='bookmark' title='Permanent Link: SWiSHmax Download'>SWiSHmax Download</a></li></small>
<small><li><a href='http://www.thetechlabs.com/free-software-download/corel-draw-download/' rel='bookmark' title='Permanent Link: Corel DRAW Download'>Corel DRAW Download</a></li></small>
<small><li><a href='http://www.thetechlabs.com/free-software-download/autocad-download/' rel='bookmark' title='Permanent Link: AutoCAD Download'>AutoCAD Download</a></li></small>
</ul></p>
<p><a href="http://feedads.g.doubleclick.net/~a/GU3_zWNecqov78WDOinI8DfDkK0/0/da"><img src="http://feedads.g.doubleclick.net/~a/GU3_zWNecqov78WDOinI8DfDkK0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/GU3_zWNecqov78WDOinI8DfDkK0/1/da"><img src="http://feedads.g.doubleclick.net/~a/GU3_zWNecqov78WDOinI8DfDkK0/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=DDFbFBYt0l4:ZBYPqkoDzTs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?i=DDFbFBYt0l4:ZBYPqkoDzTs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=DDFbFBYt0l4:ZBYPqkoDzTs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?i=DDFbFBYt0l4:ZBYPqkoDzTs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=DDFbFBYt0l4:ZBYPqkoDzTs:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=DDFbFBYt0l4:ZBYPqkoDzTs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?i=DDFbFBYt0l4:ZBYPqkoDzTs:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=DDFbFBYt0l4:ZBYPqkoDzTs:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=cGdyc7Q-1BI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=DDFbFBYt0l4:ZBYPqkoDzTs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=DDFbFBYt0l4:ZBYPqkoDzTs:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=DDFbFBYt0l4:ZBYPqkoDzTs:DN0H40_Ym5U"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=DN0H40_Ym5U" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=DDFbFBYt0l4:ZBYPqkoDzTs:V-t1I-SPZMU"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=V-t1I-SPZMU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/the_tech_labs/~4/DDFbFBYt0l4" height="1" width="1"/>]]></content:encoded><description>&lt;h2&gt;KoolMoves &amp;#8211; Flash Software&lt;/h2&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;KoolMoves Download: KoolMoves is an affordable, easy-to-use Flash creation software developed by Lucky Monkey Designs and used by both beginners and professionals to create rich interactive web content. KoolMoves Download: to help you create Flash banners, web pages, slide shows, navigation systems, etc. This great application combines ease of use with a wide range of powerful animation effects for creating professional quality Flash animations. It also has a large library of text effects, clip arts and templates. KoolMoves is free to try and widely considered as a very affordable Flash authoring tool. For all budgets!&lt;/p&gt;
&lt;p&gt;&lt;center&gt;&lt;script type="text/javascript"&gt;// &lt;![CDATA[
  google_ad_client = "pub-9074158431949562"; /* TechLabs001 */ google_ad_slot = "7799230523"; google_ad_width = 300; google_ad_height = 250;
// ]]&amp;gt;&lt;/script&gt;&lt;br /&gt;
&lt;script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"&gt;
&lt;/script&gt;&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3 style="text-align: center;"&gt;&lt;a href="http://www.thetechlabs.com/flash-software/download-koolmoves/"&gt;Download KoolMoves&lt;/a&gt;&lt;/h3&gt;
 The Tech Labs Tutorial - Free Adobe Air, Flash and Flex Tutorials&lt;img src="http://www.thetechlabs.com/?ak_action=api_record_view&amp;id=1649&amp;type=feed" alt="" /&gt;

&lt;p&gt;&lt;h2&gt;Related posts:&lt;/h2&gt;&lt;ul&gt;&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/free-software-download/photoscape-download/' rel='bookmark' title='Permanent Link: PhotoScape Download'&gt;PhotoScape Download&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/free-software-download/swishmax-download/' rel='bookmark' title='Permanent Link: SWiSHmax Download'&gt;SWiSHmax Download&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/free-software-download/corel-draw-download/' rel='bookmark' title='Permanent Link: Corel DRAW Download'&gt;Corel DRAW Download&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/free-software-download/autocad-download/' rel='bookmark' title='Permanent Link: AutoCAD Download'&gt;AutoCAD Download&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;/ul&gt;&lt;/p&gt;&lt;div style="display:block"&gt;&lt;small&gt;&lt;em&gt;by John Triggerman &lt;br /&gt;&amp;copy;2010 &lt;a href="http://www.thetechlabs.com"&gt;Flash Platform and ActionScript Tutorials&lt;/a&gt;. All Rights Reserved.&lt;/em&gt;&lt;/small&gt;&lt;/div&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.thetechlabs.com/free-software-download/koolmoves-download/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://www.thetechlabs.com/free-software-download/koolmoves-download/</feedburner:origLink></item><item><title>SWiSHmax Download</title><link>http://feedproxy.google.com/~r/the_tech_labs/~3/z-W1n8ZBfUU/</link><category>Free Software</category><category>Flash Software</category><category>swishmax</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">John Triggerman</dc:creator><pubDate>Wed, 03 Feb 2010 02:33:40 PST</pubDate><guid isPermaLink="false">http://www.thetechlabs.com/?p=1642</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<h2>SWiSHmax &#8211; Flash Software</h2>
<p>&nbsp;</p>
<p>SWiSHmax Download: SWiSHmax is a powerful Flash application developed by SwishZone. It is considered as simpler and less costly than other Flash creation tools like Adobe Flash. SWiSHmax Download: to help you produce interactive and cross-platform animations, presentations and movies. SWiSHmax has a wide range of powerful, easy-to-use features to let you design stunning fully interactive Flash animations in no time. The tool also has hundreds of ready-to-use animated effects as well as its own scripting language which can be used to create menus and forms for example. The tool creates all the files you need to upload to your server, or you can generate the code to paste into an existing page. If you are on a tight budget, SWiSHmax is a great alternative to Adobe Flash. You may download the trial version and use it for 15 days.</p>
<p><center><script type="text/javascript">// <![CDATA[
  google_ad_client = "pub-9074158431949562"; /* TechLabs001 */ google_ad_slot = "7799230523"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script><br />
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
</script></center></p>
<p>&nbsp;</p>
<h3 style="text-align: center;"><a href="http://www.thetechlabs.com/flash-software/download-swishmax/">Download SWiSHmax</a></h3>
 The Tech Labs Tutorial - Free Adobe Air, Flash and Flex Tutorials<img src="http://www.thetechlabs.com/?ak_action=api_record_view&id=1642&type=feed" alt="" />

<p><h2>Related posts:</h2><ul><small><li><a href='http://www.thetechlabs.com/free-software-download/koolmoves-download/' rel='bookmark' title='Permanent Link: KoolMoves Download'>KoolMoves Download</a></li></small>
<small><li><a href='http://www.thetechlabs.com/free-software-download/corel-draw-download/' rel='bookmark' title='Permanent Link: Corel DRAW Download'>Corel DRAW Download</a></li></small>
<small><li><a href='http://www.thetechlabs.com/free-software-download/autocad-download/' rel='bookmark' title='Permanent Link: AutoCAD Download'>AutoCAD Download</a></li></small>
</ul></p>
<p><a href="http://feedads.g.doubleclick.net/~a/8OB7dzB8-x_4XUgkKZ4w851vxOY/0/da"><img src="http://feedads.g.doubleclick.net/~a/8OB7dzB8-x_4XUgkKZ4w851vxOY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/8OB7dzB8-x_4XUgkKZ4w851vxOY/1/da"><img src="http://feedads.g.doubleclick.net/~a/8OB7dzB8-x_4XUgkKZ4w851vxOY/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=z-W1n8ZBfUU:lzItym4f4kQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?i=z-W1n8ZBfUU:lzItym4f4kQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=z-W1n8ZBfUU:lzItym4f4kQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?i=z-W1n8ZBfUU:lzItym4f4kQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=z-W1n8ZBfUU:lzItym4f4kQ:I9og5sOYxJI"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=I9og5sOYxJI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=z-W1n8ZBfUU:lzItym4f4kQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?i=z-W1n8ZBfUU:lzItym4f4kQ:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=z-W1n8ZBfUU:lzItym4f4kQ:cGdyc7Q-1BI"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=cGdyc7Q-1BI" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=z-W1n8ZBfUU:lzItym4f4kQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=z-W1n8ZBfUU:lzItym4f4kQ:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=z-W1n8ZBfUU:lzItym4f4kQ:DN0H40_Ym5U"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=DN0H40_Ym5U" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/the_tech_labs?a=z-W1n8ZBfUU:lzItym4f4kQ:V-t1I-SPZMU"><img src="http://feeds.feedburner.com/~ff/the_tech_labs?d=V-t1I-SPZMU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/the_tech_labs/~4/z-W1n8ZBfUU" height="1" width="1"/>]]></content:encoded><description>&lt;h2&gt;SWiSHmax &amp;#8211; Flash Software&lt;/h2&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;SWiSHmax Download: SWiSHmax is a powerful Flash application developed by SwishZone. It is considered as simpler and less costly than other Flash creation tools like Adobe Flash. SWiSHmax Download: to help you produce interactive and cross-platform animations, presentations and movies. SWiSHmax has a wide range of powerful, easy-to-use features to let you design stunning fully interactive Flash animations in no time. The tool also has hundreds of ready-to-use animated effects as well as its own scripting language which can be used to create menus and forms for example. The tool creates all the files you need to upload to your server, or you can generate the code to paste into an existing page. If you are on a tight budget, SWiSHmax is a great alternative to Adobe Flash. You may download the trial version and use it for 15 days.&lt;/p&gt;
&lt;p&gt;&lt;center&gt;&lt;script type="text/javascript"&gt;// &lt;![CDATA[
  google_ad_client = "pub-9074158431949562"; /* TechLabs001 */ google_ad_slot = "7799230523"; google_ad_width = 300; google_ad_height = 250;
// ]]&amp;gt;&lt;/script&gt;&lt;br /&gt;
&lt;script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"&gt;
&lt;/script&gt;&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3 style="text-align: center;"&gt;&lt;a href="http://www.thetechlabs.com/flash-software/download-swishmax/"&gt;Download SWiSHmax&lt;/a&gt;&lt;/h3&gt;
 The Tech Labs Tutorial - Free Adobe Air, Flash and Flex Tutorials&lt;img src="http://www.thetechlabs.com/?ak_action=api_record_view&amp;id=1642&amp;type=feed" alt="" /&gt;

&lt;p&gt;&lt;h2&gt;Related posts:&lt;/h2&gt;&lt;ul&gt;&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/free-software-download/koolmoves-download/' rel='bookmark' title='Permanent Link: KoolMoves Download'&gt;KoolMoves Download&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/free-software-download/corel-draw-download/' rel='bookmark' title='Permanent Link: Corel DRAW Download'&gt;Corel DRAW Download&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;small&gt;&lt;li&gt;&lt;a href='http://www.thetechlabs.com/free-software-download/autocad-download/' rel='bookmark' title='Permanent Link: AutoCAD Download'&gt;AutoCAD Download&lt;/a&gt;&lt;/li&gt;&lt;/small&gt;
&lt;/ul&gt;&lt;/p&gt;&lt;div style="display:block"&gt;&lt;small&gt;&lt;em&gt;by John Triggerman &lt;br /&gt;&amp;copy;2010 &lt;a href="http://www.thetechlabs.com"&gt;Flash Platform and ActionScript Tutorials&lt;/a&gt;. All Rights Reserved.&lt;/em&gt;&lt;/small&gt;&lt;/div&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://www.thetechlabs.com/free-software-download/swishmax-download/feed/</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://www.thetechlabs.com/free-software-download/swishmax-download/</feedburner:origLink></item></channel></rss>
