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

<channel>
	<title>michaeljbowen.com</title>
	<atom:link href="http://blog.michaeljbowen.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.michaeljbowen.com</link>
	<description>Adventures in Flash Game Programming</description>
	<pubDate>Sat, 03 Apr 2010 15:53:13 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
	<language>en</language>
			<item>
		<title>Gamepads for iPhone</title>
		<link>http://blog.michaeljbowen.com/?p=95</link>
		<comments>http://blog.michaeljbowen.com/?p=95#comments</comments>
		<pubDate>Sat, 03 Apr 2010 15:53:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://blog.michaeljbowen.com/?p=95</guid>
		<description><![CDATA[Apple is patenting gamepads for the iPhone and iPad, according to this article.
This is good news because, let&#8217;s face it, controlling games with your finger and tilting sucks for just about everything besides driving games, puzzle games, and gimmicky apps.
Many types of games are just NOT possible.
Examples:
Megaman, Super Mario Bros., and any game that requires [...]]]></description>
			<content:encoded><![CDATA[<p>Apple is patenting gamepads for the iPhone and iPad, according to <a href="http://www.gamespot.com/news/6254641.html?tag=latestheadlines;title;1" target="_blank">this article</a>.</p>
<p>This is good news because, let&#8217;s face it, controlling games with your finger and tilting sucks for just about everything besides driving games, puzzle games, and gimmicky apps.</p>
<p>Many types of games are just NOT possible.<br />
Examples:<br />
Megaman, Super Mario Bros., and any game that requires more precise control than can be achieved with a hot dog.</p>
<p>Attempts have been made to port some arcade classics, and most are terrible.</p>
<p>Putting a &#8220;controller&#8221; on the touch screen is just plain awful.</p>
<p>The bad news, or course, is that not everyone will have the gamepad.  And even if you have the gamepad, you&#8217;re not likely to have it with you every time you want to play a game.  Thus, games will have to be designed to support the standard control scheme anyway.</p>
<p>The best scenario would be to have actual physical buttons on the iPhone.  However, this will never happen.  Apple has spent a lot of money and energy to convince consumers that there is no need for physical buttons.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.michaeljbowen.com/?feed=rss2&amp;p=95</wfw:commentRss>
		</item>
		<item>
		<title>iPhone 4 to support Flash!</title>
		<link>http://blog.michaeljbowen.com/?p=92</link>
		<comments>http://blog.michaeljbowen.com/?p=92#comments</comments>
		<pubDate>Thu, 01 Apr 2010 15:16:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.michaeljbowen.com/?p=92</guid>
		<description><![CDATA[This just in.
Wait for it&#8230;.
iPhone 4 will support Flash, along with the iPad.
Hooray!!
Just kidding.
April Fools, you idiot.
]]></description>
			<content:encoded><![CDATA[<p>This just in.<br />
Wait for it&#8230;.</p>
<p>iPhone 4 will support Flash, along with the iPad.<br />
Hooray!!</p>
<p>Just kidding.<br />
April Fools, you idiot.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.michaeljbowen.com/?feed=rss2&amp;p=92</wfw:commentRss>
		</item>
		<item>
		<title>Unity 3.0 2D Sprite Engine</title>
		<link>http://blog.michaeljbowen.com/?p=84</link>
		<comments>http://blog.michaeljbowen.com/?p=84#comments</comments>
		<pubDate>Wed, 24 Mar 2010 18:32:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Unity 3D]]></category>

		<guid isPermaLink="false">http://blog.michaeljbowen.com/?p=84</guid>
		<description><![CDATA[The upcoming Unity 3.0 will have a 2D Sprite Engine, as you can see from the press release:
http://www.gamasutra.com/view/news/27558/Unity_Announces_30_Platform_Support_For_PS3_iPad_And_Android.php
The press release makes it sound a little like the sprite engine is specific to the iPhone, but this is not the case.  You can see the &#8220;inside&#8221; info here (top secret):
http://forum.unity3d.com/viewtopic.php?t=47214
Creating 2D games is currently very clunky [...]]]></description>
			<content:encoded><![CDATA[<p>The upcoming Unity 3.0 will have a 2D Sprite Engine, as you can see from the press release:<br />
<a href="http://www.gamasutra.com/view/news/27558/Unity_Announces_30_Platform_Support_For_PS3_iPad_And_Android.php" target="_blank">http://www.gamasutra.com/view/news/27558/Unity_Announces_30_Platform_Support_For_PS3_iPad_And_Android.php</a></p>
<p>The press release makes it sound a little like the sprite engine is specific to the iPhone, but this is not the case.  You can see the &#8220;inside&#8221; info here (top secret):<br />
<a href="http://forum.unity3d.com/viewtopic.php?t=47214" target="_blank">http://forum.unity3d.com/viewtopic.php?t=47214</a></p>
<p>Creating 2D games is currently very clunky in Unity.  Basically, you have to billboard textures onto planes or boxes, etc.  There is no hit detection for pixels.</p>
<p>In case anyone misses the point, a 2D sprite engine makes Unity a one stop shop for game development.  This effectively provides competition to Flash and Silverlight, as well as the folks at Garage Games, and many others.</p>
<p>Being able to write games in 2D or 3D, and deploy to the PC, Mac, Xbox 360, Playstation, iPhone, Andriod, and Atari 2600&#8230; where do I sign up?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.michaeljbowen.com/?feed=rss2&amp;p=84</wfw:commentRss>
		</item>
		<item>
		<title>Instantiating a prefab from the library in C# with Unity 3D</title>
		<link>http://blog.michaeljbowen.com/?p=80</link>
		<comments>http://blog.michaeljbowen.com/?p=80#comments</comments>
		<pubDate>Sun, 09 Aug 2009 18:05:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[C#]]></category>

		<category><![CDATA[Unity 3D]]></category>

		<guid isPermaLink="false">http://blog.michaeljbowen.com/?p=80</guid>
		<description><![CDATA[Unity 3D is really geared toward visually building your game through use of the Unity 3D editor.  However, there are times when you want to instantiate a prefab that you don&#8217;t already have in the Scene.
Instantiating a prefab from your library is easy, once you know how.  Figuring out how is a pain. [...]]]></description>
			<content:encoded><![CDATA[<p>Unity 3D is really geared toward visually building your game through use of the Unity 3D editor.  However, there are times when you want to instantiate a prefab that you don&#8217;t already have in the Scene.</p>
<p>Instantiating a prefab from your library is easy, once you know how.  Figuring out how is a pain.  The biggest quirk is that your prefab must be located in a directory called &#8220;Resources&#8221; if you want to instantiate it using C#.</p>
<p>Here are the steps.</p>
<p>1. Make sure you create a directory called &#8220;Resources&#8221; and place it in your Assets/ directory.<br />
2. Create a prefab.  Let&#8217;s all it &#8220;FooPrefab&#8221;.<br />
3. In C#, instantiate the prefab as follows:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;width:590px"><table cellspacing="0" cellpadding="0"><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="text codecolorer" style="font-family:Monaco,Lucida Console,monospace">GameObject go = Instantiate(Resources.Load(&quot;FooPrefab&quot;)) as GameObject;</div></td></table></div>
<p>Why does the prefab have to be placed in a directory called &#8220;Resources&#8221;.<br />
Who knows?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.michaeljbowen.com/?feed=rss2&amp;p=80</wfw:commentRss>
		</item>
		<item>
		<title>Using C# with Unity 3D to achieve code completion (intellisense)</title>
		<link>http://blog.michaeljbowen.com/?p=68</link>
		<comments>http://blog.michaeljbowen.com/?p=68#comments</comments>
		<pubDate>Sat, 08 Aug 2009 15:48:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[C#]]></category>

		<category><![CDATA[Unity 3D]]></category>

		<guid isPermaLink="false">http://blog.michaeljbowen.com/?p=68</guid>
		<description><![CDATA[I&#8217;ve been playing around with Unity 3D lately, and its pretty awesome.  Its not very difficult to make the leap from Flash to Unity.  However, one detractor to Unity is its poor coding environment.
As a Flash programmer, I&#8217;m very spoiled by several of the development environments available to me.  FlashDevelop, Flex, etc. all provide intelligent [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around with Unity 3D lately, and its pretty awesome.  Its not very difficult to make the leap from Flash to Unity.  However, one detractor to Unity is its poor coding environment.</p>
<p>As a Flash programmer, I&#8217;m very spoiled by several of the development environments available to me.  FlashDevelop, Flex, etc. all provide intelligent editors that give me code completion.  Unity&#8217;s built in editor does not have this feature.  Once you get used to code completion, you can never go back to a plain text editor!</p>
<p>The good news is that you can use Visual C# 2008 Express for all of your Unity coding needs, and its totally free!  Thanks, Bill Gates.</p>
<p>Below are the steps to set up your environment.  Have fun.  Don&#8217;t say I never gave you anything.</p>
<p><strong>One time setup:</strong></p>
<p>1. Download Visual C# 2008 Express for free:<a href="http://www.microsoft.com/express/vcsharp/" target="_blank"><br />
http://www.microsoft.com/express/vcsharp/</a></p>
<p>2. Install it.  <img src='http://blog.michaeljbowen.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> <br/></p>
<p>3. Download the following file, which is needed for tool tips as you edit in C#.<br />
<a href="http://blog.michaeljbowen.com/wp-content/uploads/2009/08/unitydocs.zip">UnityDocs.zip</a><br />
Place the 2 XML files here:<br />
C:\Program Files\Unity\Editor\Data\lib<br />
(or wherever you installed Unity)</p>
<p><strong>Repeat for each project:</strong></p>
<p>1. When you create a new Unity 3D project, you need to create a new C# project somewhere in the Assets/ directory.  It can be right in Assets/, or you can make a sub directory.  Making a sub directory might be cleaner as C# will create solution files, etc.  Use &#8220;Empty Project&#8221; as your project type in C#.</p>
<p>2. Add a reference to the Unity dll files in your C# project.<br />
In C#&#8217;s Solution Explorer panel (on the right), right-click the project and choose &#8220;Add Reference&#8221;.<br />
Browse to and add UnityEngine.dll.<br />
(you can add the editor dll as well if you are going to write editor code)</p>
<p>3. Create new class files from within C#.  If you do it from Unity, they don&#8217;t show up automatically in your C# project (there is probably a way to add them, but I don&#8217;t know it).</p>
<p>That&#8217;s it!<br />
Code completion, tool tips, hints&#8230; it&#8217;s all there.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.michaeljbowen.com/?feed=rss2&amp;p=68</wfw:commentRss>
		</item>
		<item>
		<title>Book: ActionScript for Multiplayer Games and Virtual Worlds</title>
		<link>http://blog.michaeljbowen.com/?p=53</link>
		<comments>http://blog.michaeljbowen.com/?p=53#comments</comments>
		<pubDate>Wed, 29 Jul 2009 16:55:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[book]]></category>

		<guid isPermaLink="false">http://blog.michaeljbowen.com/?p=53</guid>
		<description><![CDATA[Jobe Makar&#8217;s new book, ActionScript for Multiplayer Games and Virtual Worlds, will be available this Monday (August 3rd).  I&#8217;ve already read the book and it&#8217;s fantastic!

I really wish something like this had been available years ago.  I create lots of multiplayer games and virtual worlds.  This book would have saved me tons of time and [...]]]></description>
			<content:encoded><![CDATA[<p>Jobe Makar&#8217;s new book, <a href="http://www.amazon.com/ActionScript-Multiplayer-Virtual-Worlds-One-Off/dp/0321643364/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1246403843&amp;sr=8-1" target="_blank">ActionScript for Multiplayer Games and Virtual Worlds</a>, will be available this Monday (August 3rd).  I&#8217;ve already read the book and it&#8217;s fantastic!</p>
<p><a href="http://blog.michaeljbowen.com/wp-content/uploads/2009/07/book1.jpg"><img class="size-medium wp-image-57 alignleft" title="ActionScript for Multiplayer Games and Virtual Worlds" src="http://blog.michaeljbowen.com/wp-content/uploads/2009/07/book1-241x300.jpg" alt="ActionScript for Multiplayer Games and Virtual Worlds" width="193" height="240" /></a></p>
<p>I really wish something like this had been available years ago.  I create lots of multiplayer games and virtual worlds.  This book would have saved me tons of time and effort.</p>
<p>In addition to being a fan of Jobe&#8217;s books, I had the pleasure of contributing to this one.  Jobe did me the honor of having me to write Chapter 11: Cooperative Game Play.</p>
<p>The chapter discusses various cooperative game concepts.  Also, I created a fully working multiplayer game to go along with the chapter: Super Blob Brothers (Thanks go to Scott Smith for writing all of the server side code to support the game).  Of course, the book comes with the full source code for the game.</p>
<p>In Super Blob Brothers, two players must help each other complete each level by navigating from the starting point to the Goal Pad.  The game is unique in that cooperation is required.  No level can be completed by a solo player.</p>
<p><a href="http://blog.michaeljbowen.com/wp-content/uploads/2009/07/superblobbrothers.jpg"><img class="size-medium wp-image-62  alignright" title="Super Blob Brothers" src="http://blog.michaeljbowen.com/wp-content/uploads/2009/07/superblobbrothers-259x300.jpg" alt="Super Blob Brothers" width="181" height="210" /></a></p>
<p>Obstacles include rocks, laser gates, and laser towers.  Rocks can only be pushed by two players working together.  One player has the ability to defend against lasers.  The other player has the ability to disable laser towers.</p>
<p>Other games in the book include a real-time tank game and a fully working virtual world example.</p>
<p>Be sure to purchase the book as soon as possible!  On a scale of 1 to 10, I&#8217;d give it an 11.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.michaeljbowen.com/?feed=rss2&amp;p=53</wfw:commentRss>
		</item>
		<item>
		<title>Flash CS4 Bug: Kill the Compiler With One Line of Code</title>
		<link>http://blog.michaeljbowen.com/?p=39</link>
		<comments>http://blog.michaeljbowen.com/?p=39#comments</comments>
		<pubDate>Tue, 06 Jan 2009 19:21:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Bugs]]></category>

		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.michaeljbowen.com/?p=39</guid>
		<description><![CDATA[I just found a nasty little bug in Flash CS4.  One line of code will result in a project that compiles with no errors and yet no trace statements work either.
Simply put the following line of code anywhere in your project (including in any class, or on any frame on the time line):
1var version:Number = [...]]]></description>
			<content:encoded><![CDATA[<p>I just found a nasty little bug in Flash CS4.  One line of code will result in a project that compiles with no errors and yet no trace statements work either.</p>
<p>Simply put the following line of code anywhere in your project (including in any class, or on any frame on the time line):</p>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;width:590px"><table cellspacing="0" cellpadding="0"><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="actionscript codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw2">var</span> <span class="kw3">version</span>:<span class="kw3">Number</span> = 0.0.1;</div></td></table></div>
<p>That&#8217;s it!  Your project will (seem to) compile with no errors.<br />
You won&#8217;t get any trace output either.</p>
<p>Imagine burying this line of code in a random class in a project that has hundreds of classes.  How could anyone find it?</p>
<p>I&#8217;m Tellin&#8217; Y&#8217;all It&#8217;s a Sabotage.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.michaeljbowen.com/?feed=rss2&amp;p=39</wfw:commentRss>
		</item>
		<item>
		<title>Modules in Flash</title>
		<link>http://blog.michaeljbowen.com/?p=19</link>
		<comments>http://blog.michaeljbowen.com/?p=19#comments</comments>
		<pubDate>Tue, 23 Dec 2008 02:30:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://blog.michaeljbowen.com/?p=19</guid>
		<description><![CDATA[Modules are SWF files that can be loaded by an application but cannot run indepedently.  Modules are built in to Flex 3, but it takes a bit of finagling to use modules in Flash.
I have been able to use modules successfully in Flash.  Below are the steps to follow.  I have also included the sample [...]]]></description>
			<content:encoded><![CDATA[<p>Modules are SWF files that can be loaded by an application but cannot run indepedently.  Modules are built in to Flex 3, but it takes a bit of finagling to use modules in Flash.</p>
<p>I have been able to use modules successfully in Flash.  Below are the steps to follow.  I have also included the sample source code:<br />
<a href="http://michaeljbowen.com/examples/modulesInFlash.zip">http://michaeljbowen.com/examples/modulesInFlash.zip</a></p>
<p><strong>Step 1</strong><br />
Grab the latest Flex SDK.  I used 3.2:<br />
<a href="http://www.adobe.com/products/flex/flexdownloads/" target="_blank">http://www.adobe.com/products/flex/flexdownloads/</a></p>
<p><strong>Step 2</strong><br />
In the Flash IDE (I&#8217;m using CS4), create a reference to the Flex SDK:<br />
File &gt; Publish Settings &gt; Flash &gt; Settings &gt; Library Path<br />
Add a reference to frameworks\libs (see the following image)</p>
<div id="attachment_21" class="wp-caption alignnone" style="width: 229px"><a href="http://blog.michaeljbowen.com/wp-content/uploads/2008/12/settingsimage.jpg"><img class="size-medium wp-image-21" title="Settings Window" src="http://blog.michaeljbowen.com/wp-content/uploads/2008/12/settingsimage-219x300.jpg" alt="Advanced ActionScript 3.0 Settings" width="219" height="300" /></a><p class="wp-caption-text">Advanced ActionScript 3.0 Settings</p></div>
<p><strong><br />
Step 3:</strong><br />
Create a module by creating a class that extends mx.modules.ModuleBase.</p>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;width:590px"><table cellspacing="0" cellpadding="0"><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="actionscript codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw3">import</span> mx.<span class="me1">modules</span>.<span class="me1">ModuleBase</span>;<br />
...<br />
<span class="kw3">public</span> <span class="kw2">class</span> ModuleAlpha <span class="kw3">extends</span> ModuleBase <span class="kw3">implements</span> IModuleAlpha<br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp;<span class="kw3">public</span> <span class="kw2">function</span> ModuleAlpha<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw3">trace</span><span class="br0">&#40;</span><span class="st0">&quot;ModuleAlpha created.&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; &nbsp;<span class="kw3">public</span> <span class="kw2">function</span> addNumbers<span class="br0">&#40;</span>a:<span class="kw3">Number</span>, b:<span class="kw3">Number</span><span class="br0">&#41;</span>:<span class="kw3">Number</span><br />
&nbsp; &nbsp;<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">return</span> a + b;<br />
&nbsp; &nbsp;<span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div></td></table></div>
<p><strong>Step 4:</strong><br />
Compile the module using the mxmlc command line compiler.<br />
Note: If you&#8217;ve placed your source in subdirectories, you will need to let the compiler know your source path.<br />
In my example, ModuleAlpha.as is located in the com.electrotank.modules package.<br />
Thus, here is my command to compile:</p>
<div class="codecolorer-container text mac-classic" style="overflow:auto;white-space:nowrap;width:590px"><table cellspacing="0" cellpadding="0"><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="text codecolorer" style="font-family:Monaco,Lucida Console,monospace">&gt;mxmlc &quot;-source-path+=../../../&quot; ModuleBeta.as</div></td></table></div>
<p><strong>Step 5:</strong><br />
Create a &#8220;parent&#8221; application that will load in your module(s) via mx.modules.ModuleManager.<br />
Here is an excerpt from the sample code provided:</p>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;width:590px"><table cellspacing="0" cellpadding="0"><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="actionscript codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw3">private</span> const URL_MOD_ALPHA:<span class="kw3">String</span>    = <span class="st0">&quot;ModuleAlpha.swf&quot;</span>;<br />
...<br />
_modules<span class="br0">&#91;</span>URL_MOD_ALPHA<span class="br0">&#93;</span> = ModuleManager.<span class="me1">getModule</span><span class="br0">&#40;</span>URL_MOD_ALPHA<span class="br0">&#41;</span>;<br />
IModuleInfo<span class="br0">&#40;</span>_modules<span class="br0">&#91;</span>URL_MOD_ALPHA<span class="br0">&#93;</span><span class="br0">&#41;</span>.<span class="me1">addEventListener</span><span class="br0">&#40;</span>ModuleEvent.<span class="me1">READY</span>, onModReady<span class="br0">&#41;</span>;<br />
IModuleInfo<span class="br0">&#40;</span>_modules<span class="br0">&#91;</span>URL_MOD_ALPHA<span class="br0">&#93;</span><span class="br0">&#41;</span>.<span class="me1">addEventListener</span><span class="br0">&#40;</span>ModuleEvent.<span class="kw3">ERROR</span>, onModError<span class="br0">&#41;</span>;<br />
IModuleInfo<span class="br0">&#40;</span>_modules<span class="br0">&#91;</span>URL_MOD_ALPHA<span class="br0">&#93;</span><span class="br0">&#41;</span>.<span class="kw3">load</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div></td></table></div>
<p><strong>Step 6:<br />
</strong>Create an instance of your newly uploaded module using the factory of IModuleInfo:</p>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;width:590px"><table cellspacing="0" cellpadding="0"><tr><td class="line-numbers"><div>1<br />2<br /></div></td><td><div class="actionscript codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw2">var</span> modAlpha:IModuleAlpha = IModuleAlpha<span class="br0">&#40;</span>IModuleInfo<span class="br0">&#40;</span>_modules<span class="br0">&#91;</span>URL_MOD_ALPHA<span class="br0">&#93;</span><span class="br0">&#41;</span>.<span class="me1">factory</span>.<span class="me1">create</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
<span class="kw3">trace</span><span class="br0">&#40;</span>modAlpha.<span class="me1">addNumbers</span><span class="br0">&#40;</span><span class="nu0">2</span>, <span class="nu0">3</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div></td></table></div>
<p><strong>Done</strong><br />
That&#8217;s it!<br />
Be sure to use your powers only for good and not evil.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.michaeljbowen.com/?feed=rss2&amp;p=19</wfw:commentRss>
		</item>
		<item>
		<title>Flash 10 Speed Test: copyPixel vs. Scrolling Sprite vs. Scrolling MovieClip</title>
		<link>http://blog.michaeljbowen.com/?p=11</link>
		<comments>http://blog.michaeljbowen.com/?p=11#comments</comments>
		<pubDate>Sat, 29 Nov 2008 20:16:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://blog.michaeljbowen.com/?p=11</guid>
		<description><![CDATA[When Flash introduced the copyPixel operation a few versions ago, I was very excited.  Finally, I could create blazing fast games that worked more like &#8220;real&#8221; games instead of using MovieClips.  However, copyPixel is no magic bullet.
Here are the results of a simple test where I scroll a background image.  I guessed that copyPixel would [...]]]></description>
			<content:encoded><![CDATA[<p>When Flash introduced the copyPixel operation a few versions ago, I was very excited.  Finally, I could create blazing fast games that worked more like &#8220;real&#8221; games instead of using MovieClips.  However, copyPixel is no magic bullet.</p>
<p>Here are the results of a simple test where I scroll a background image.  I guessed that copyPixel would yield the fastest results, but I was wrong.</p>
<p>Note that during initial testing it was difficult to get a big difference with an 800&#215;600 drawing area.<br />
Of course, that’s because I’m only moving 1 image around as opposed to hundreds as in an actual game.</p>
<p>Thus, to make the differences stand way out, I increased the drawing area to 1880&#215;1024.<br />
This will fill up Fire Fox if your resolution is 1920&#215;1200, but you can still see the drawing area.</p>
<p>The frame rate is set to 120.<br />
Note also that I am using a crazy big image of size 4095&#215;4095 (3.5 Megs).</p>
<p><strong>Various OSs and Browsers</strong></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="47" valign="top"><strong>#</strong></td>
<td width="150" valign="top"><strong>Method</strong></td>
<td width="108" valign="top"><strong>Mode</strong></td>
<td width="132" valign="top"><strong>Fps Fire Fox - Win</strong></td>
<td width="180" valign="top"><strong> Fps Internet Explorer - Win</strong></td>
<td width="156" valign="top"><strong> Fps Fire Fox - Mac</strong></td>
</tr>
<tr>
<td width="47" valign="top" bgcolor="#9fbeff">1</td>
<td width="150" valign="top" bgcolor="#9fbeff">Copy Pixel</td>
<td width="108" valign="top" bgcolor="#9fbeff">opaque</td>
<td width="132" valign="top" bgcolor="#9fbeff">21-23</td>
<td width="180" valign="top" bgcolor="#9fbeff">36-38</td>
<td width="156" valign="top" bgcolor="#9fbeff">36-37</td>
</tr>
<tr>
<td width="47" valign="top" bgcolor="#9fbeff">2</td>
<td width="150" valign="top" bgcolor="#9fbeff">Copy Pixel</td>
<td width="108" valign="top" bgcolor="#9fbeff">window</td>
<td width="132" valign="top" bgcolor="#9fbeff">40-42</td>
<td width="180" valign="top" bgcolor="#9fbeff">43-45</td>
<td width="156" valign="top" bgcolor="#9fbeff">36-36</td>
</tr>
<tr>
<td width="47" valign="top" bgcolor="#9fbeff">3</td>
<td width="150" valign="top" bgcolor="#9fbeff">Copy Pixel</td>
<td width="108" valign="top" bgcolor="#9fbeff">direct</td>
<td width="132" valign="top" bgcolor="#9fbeff">54-56</td>
<td width="180" valign="top" bgcolor="#9fbeff">46-48</td>
<td width="156" valign="top" bgcolor="#9fbeff">30-31</td>
</tr>
<tr>
<td width="47" valign="top" bgcolor="#9fbeff">4</td>
<td width="150" valign="top" bgcolor="#9fbeff">Copy Pixel</td>
<td width="108" valign="top" bgcolor="#9fbeff">gpu</td>
<td width="132" valign="top" bgcolor="#9fbeff">27-28   (wtf?)</td>
<td width="180" valign="top" bgcolor="#9fbeff">43-45</td>
<td width="156" valign="top" bgcolor="#9fbeff">21-22</td>
</tr>
<tr>
<td width="47" valign="top" bgcolor="#ffff99">5</td>
<td width="150" valign="top" bgcolor="#ffff99">Sprite</td>
<td width="108" valign="top" bgcolor="#ffff99">opaque</td>
<td width="132" valign="top" bgcolor="#ffff99">24-25</td>
<td width="180" valign="top" bgcolor="#ffff99">36-37</td>
<td width="156" valign="top" bgcolor="#ffff99">36-37</td>
</tr>
<tr>
<td width="47" valign="top" bgcolor="#ffff99">6</td>
<td width="150" valign="top" bgcolor="#ffff99">Sprite</td>
<td width="108" valign="top" bgcolor="#ffff99">window</td>
<td width="132" valign="top" bgcolor="#ffff99">58-60</td>
<td width="180" valign="top" bgcolor="#ffff99">62-64</td>
<td width="156" valign="top" bgcolor="#ffff99">36-37</td>
</tr>
<tr>
<td width="47" valign="top" bgcolor="#ffff99">7</td>
<td width="150" valign="top" bgcolor="#ffff99">Sprite</td>
<td width="108" valign="top" bgcolor="#ffff99">direct</td>
<td width="132" valign="top" bgcolor="#ffff99">80-84</td>
<td width="180" valign="top" bgcolor="#ffff99">58-60</td>
<td width="156" valign="top" bgcolor="#ffff99">35-36</td>
</tr>
<tr>
<td width="47" valign="top" bgcolor="#ffff99">8</td>
<td width="150" valign="top" bgcolor="#ffff99">Sprite</td>
<td width="108" valign="top" bgcolor="#ffff99">gpu</td>
<td width="132" valign="top" bgcolor="#ffff99">120 solid  (wow)</td>
<td width="180" valign="top" bgcolor="#ffff99">61-63</td>
<td width="156" valign="top" bgcolor="#ffff99">33</td>
</tr>
<tr>
<td width="47" valign="top" bgcolor="#ffd79b">9</td>
<td width="150" valign="top" bgcolor="#ffd79b">MovieClip</td>
<td width="108" valign="top" bgcolor="#ffd79b">opaque</td>
<td width="132" valign="top" bgcolor="#ffd79b">24-25</td>
<td width="180" valign="top" bgcolor="#ffd79b">38-40</td>
<td width="156" valign="top" bgcolor="#ffd79b">36-38</td>
</tr>
<tr>
<td width="47" valign="top" bgcolor="#ffd79b">10</td>
<td width="150" valign="top" bgcolor="#ffd79b">MovieClip</td>
<td width="108" valign="top" bgcolor="#ffd79b">window</td>
<td width="132" valign="top" bgcolor="#ffd79b">58-60</td>
<td width="180" valign="top" bgcolor="#ffd79b">55-62</td>
<td width="156" valign="top" bgcolor="#ffd79b">36-37</td>
</tr>
<tr>
<td width="47" valign="top" bgcolor="#ffd79b">11</td>
<td width="150" valign="top" bgcolor="#ffd79b">MovieClip</td>
<td width="108" valign="top" bgcolor="#ffd79b">direct</td>
<td width="132" valign="top" bgcolor="#ffd79b">80-83</td>
<td width="180" valign="top" bgcolor="#ffd79b">58-60</td>
<td width="156" valign="top" bgcolor="#ffd79b">36</td>
</tr>
<tr>
<td width="47" valign="top" bgcolor="#ffd79b">12</td>
<td width="150" valign="top" bgcolor="#ffd79b">MovieClip</td>
<td width="108" valign="top" bgcolor="#ffd79b">gpu</td>
<td width="132" valign="top" bgcolor="#ffd79b">120 solid  (wow)</td>
<td width="180" valign="top" bgcolor="#ffd79b">58-62</td>
<td width="156" valign="top" bgcolor="#ffd79b">33</td>
</tr>
</tbody>
</table>
<p>So, the really confusing thing for me is that copy pixel seems to drag down gpu mode!</p>
<p>Also, remember when &#8220;opaque&#8221; used to be the best wmode option for performance?  Not any more (at least for this specific test).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.michaeljbowen.com/?feed=rss2&amp;p=11</wfw:commentRss>
		</item>
		<item>
		<title>Flex 3 Profiler Bug</title>
		<link>http://blog.michaeljbowen.com/?p=6</link>
		<comments>http://blog.michaeljbowen.com/?p=6#comments</comments>
		<pubDate>Mon, 18 Aug 2008 10:39:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Bugs]]></category>

		<category><![CDATA[Flex 3]]></category>

		<guid isPermaLink="false">http://blog.michaeljbowen.com/?p=6</guid>
		<description><![CDATA[I am running Flex 3 on Windows Vista.  For some reason, attempting to profile an application would always fail.  There were no errors or warnings… the app would launch in my browser and simply run without profiling.
The following work around worked for me:

In Flex 3, click on Window &#62; Preferences…
In the Preferences window, choose Flex [...]]]></description>
			<content:encoded><![CDATA[<p>I am running Flex 3 on Windows Vista.  For some reason, attempting to profile an application would always fail.  There were no errors or warnings… the app would launch in my browser and simply run without profiling.</p>
<p>The following work around worked for me:</p>
<ol>
<li>In Flex 3, click on Window &gt; Preferences…</li>
<li>In the Preferences window, choose Flex &gt; Profiler &gt; Connections</li>
<li>Set the Port number to something other than 9999.  10001 worked for me.</li>
</ol>
<p>That’s it!</p>
<div id="attachment_7" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.michaeljbowen.com/wp-content/uploads/2008/11/flexprofileroption.jpg"><img class="size-medium wp-image-7" title="Profiler Preferences Window" src="http://blog.michaeljbowen.com/wp-content/uploads/2008/11/flexprofileroption-300x215.jpg" alt="Profiler Preferences Window" width="300" height="215" /></a><p class="wp-caption-text">Profiler Preferences Window</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.michaeljbowen.com/?feed=rss2&amp;p=6</wfw:commentRss>
		</item>
	</channel>
</rss>
