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

<channel>
	<title>JADBOX: Web Application Musings &#187; Showcase</title>
	<atom:link href="http://www.jadbox.com/category/showcase/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jadbox.com</link>
	<description>Programming, Visualization and Game Development Theory</description>
	<lastBuildDate>Mon, 16 Jan 2012 01:15:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>JAD Update: Social Games</title>
		<link>http://www.jadbox.com/2011/04/jad-update-social-games/</link>
		<comments>http://www.jadbox.com/2011/04/jad-update-social-games/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 19:22:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash/Flex/AIR]]></category>
		<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Lifestyle]]></category>
		<category><![CDATA[Showcase]]></category>

		<guid isPermaLink="false">http://www.jadbox.com/?p=1411</guid>
		<description><![CDATA[I&#8217;ve decided that I&#8217;ve neglected my blog long enough and decided it was time for an update. Here we go *long breath*&#8230;. Within just the past couple years, I&#8217;ve moved from Michigan to San Francisco and have been working primary in building mobile and Facebook social games that have given rise in the gaming industry. I did [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-1417" title="jad" src="http://www.jadbox.com/wp-content/uploads/jad.jpg" alt="" width="288" height="384" />I&#8217;ve decided that I&#8217;ve neglected my blog long enough and decided it was time for an update. Here we go *long breath*&#8230;. Within just the past couple years, I&#8217;ve moved from Michigan to San Francisco and have been working primary in building mobile and Facebook social games that have given rise in the gaming industry. I did a number of projects at <a href="http://www.crowdstar.com/">Crowdstar</a> including Hello City and Mighty Pirates, and now I&#8217;m working on the largest project yet in my career at a newer startup called <a href="http://metamoki.com/">Metamoki</a> (created by <a href="http://metamoki.com/about/">Dave Maestri</a>, founder of <a href="http://apps.facebook.com/mobwars/?mw_ref=website">Mafia Wars</a>). The game development industry in Silicon Valley is rather interesting on a couple of facets. In some ways, it&#8217;s repeating the game design that originated back in the DOS and Commodore days. On the other hand, there are mechanics that are new and &#8216;alien&#8217; in nature. Of course I am referring to the &#8220;social&#8221; aspect of Facebook games. In some FB games, the meaning of social is almost laughable as it doesn&#8217;t really exist. Even the best games in the industry still do not compare to the social aspect of co-op gaming that is rather prevent now in modern commercial games. Recently, big names in the traditional gaming industry are starting their own studios in hopes of breaking into the market. It will be very interesting to see what happens within the next two years.</p>
<p>Aside from the industry as a whole, I&#8217;ve been busy writing my own isometric engine, data structures, tooling, and learning other languages to support my day-to-day work. As soon as I think I&#8217;ve built the fastest possible system, I always find one more way to make the performance that much faster. I&#8217;ve also come to understand computer science more on a fundamental level beyond languages. It really helps to know what is happening behind the scenes when using language core libraries&#8230; just because a language provides a core function doesn&#8217;t mean you should use it! I have written a great deal of code that basically does what Flash already provides, but the level of performance can reach an average of 2-10x improvement (which helps significantly). I&#8217;ve also been following the methodologies of SOLID &lt;<a href="http://en.wikipedia.org/wiki/Solid_(object-oriented_design)">http://en.wikipedia.org/wiki/Solid_(object-oriented_design)</a>&gt; and being mindful of these principles really improves the rate in which I can iterate game concepts and cuts down time to complete maintenance tasks.</p>
<p>I&#8217;ll finally wrap-up and show off the last two games I&#8217;ve developed at my previous work with <a href="http://www.crowdstar.com/">Crowdstar</a>:</p>
<p><img class="alignnone size-full wp-image-1414" title="hellocity_sh" src="http://www.jadbox.com/wp-content/uploads/hellocity_sh.jpg" alt="" width="648" height="345" /></p>
<p>&nbsp;</p>
<p><img class="alignnone size-full wp-image-1413" title="pirates_scr" src="http://www.jadbox.com/wp-content/uploads/pirates_scr.png" alt="" width="606" height="510" /></p>
<p><strong>Visit the games below:</strong></p>
<div class="alignleft"><a href="http://apps.facebook.com/hello-city"><img title="hellocity" src="http://www.jadbox.com/wp-content/uploads/hellocity-251x300.png" alt="" width="251" height="300" /></a><br />
<a href="http://apps.facebook.com/hello-city">http://</a><a href="http://apps.facebook.com/hello-city">apps.facebook.com/hello-city</a></div>
<div class="alignleft">&#8230;</div>
<div class="alignleft"><a href="http://apps.facebook.com/mighty-pirates"><img class="alignnone size-medium wp-image-1416" title="pirates" src="http://www.jadbox.com/wp-content/uploads/pirates-251x300.png" alt="" width="251" height="300" /></a><br />
<a href="http://apps.facebook.com/mighty-pirates">http://apps.facebook.com/mighty-pirates</a></div>
<div id="_mcePaste" class="mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"><span style="font-family: Arial, sans-serif; font-size: 12px; line-height: 18px;"><strong style="outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 12px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; background-position: initial initial; background-repeat: initial initial; padding: 0px; margin: 0px; border: 0px initial initial;">Maestri</strong></span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.jadbox.com/2011/04/jad-update-social-games/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FlashMVC 2.0 Released!</title>
		<link>http://www.jadbox.com/2009/06/flashmvc-2-0-released/</link>
		<comments>http://www.jadbox.com/2009/06/flashmvc-2-0-released/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 14:04:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash/Flex/AIR]]></category>
		<category><![CDATA[Showcase]]></category>

		<guid isPermaLink="false">http://www.jadbox.com/?p=1221</guid>
		<description><![CDATA[I am very pleased to announce a major update to FlashMVC to version 2.0 with its OWN website at www.flashmvc.com! This version is a complete rewrite of the original version with better attention to scalability and framework usage. Since this is a dramatic upgrade, I have changed the package name to com.jadbox.flashmvc2. This version scales [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flashmvc.com/" target="_blank"><img src="http://www.flashmvc.com/wp-content/uploads/2009/06/FlashMVCWhite.gif" alt="" /></a><br />
I am very pleased to announce a major update to <a href="http://www.flashmvc.com/">FlashMVC</a> to version 2.0 with its OWN website at <a href="http://www.flashmvc.com/">www.flashmvc.com</a>! This version is a <strong>complete</strong> rewrite of the original version with better attention to scalability and framework usage. Since this is a dramatic upgrade, I have changed the package name to com.jadbox.flashmvc2. This version scales much higher allowing actions to relay complex messages to the view and built-in code hinting system for the view to execute an action. This is done by a new class called SuperAction. Let me start with the basics:</p>
<ul>
<li>action classes &#8211; these are normal classes (do not need to extent any classes) that perform an action</li>
<li>SuperEvent &#8211; this class acts like a model for a specific action class, as a constructor proxy for the action class. and as an event for once the action completes.</li>
<li>SuperModel &#8211; This class holds references to SuperActions which, in turn, hold references to SuperEvents and your action classes.</li>
<li>SuperAction &#8211; This class is a controller proxy between your view and the action that it needs to perform. It allows the user to dispatch a SuperEvent that gets used as a model/constructor for your action class.</li>
</ul>
<p>Benefits from version 1.0:</p>
<ul>
<li>The action has its own model/view (SuperEvent) to inform the view
<ul>
<li>The SuperModel has fewer global variables as actions have their own dedicated models</li>
</ul>
</li>
<li>The model (SuperEvent) also mocks the constructor of the action class for code hinting</li>
<li>Using the framework with Flash is the same exact flow you would use with Flex (or Flash Builder)</li>
<li>Much more readable code for applications made with the framework.</li>
<li>ActionHelper removed in place of SuperEvent</li>
<li>If an action doesn&#8217;t require a unique SuperModel, you can use the base class SuperEvent or make a SuperEvent that covers multiple action classes (less recommended).</li>
</ul>
<p>Example running an action:</p>
<div class="codecolorer-container actionscript3 twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">SuperWebsite<span style="color: #000066; font-weight: bold;">.</span>instance<span style="color: #000066; font-weight: bold;">.</span>loginAction<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">dispatchEvent</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> LoginEvent<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;test@test.com));</span></div></div>
<p>Example reading an action:</p>
<div class="codecolorer-container actionscript3 twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">SuperWebsite<span style="color: #000066; font-weight: bold;">.</span>instance<span style="color: #000066; font-weight: bold;">.</span>loginAction<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>SuperEvent<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">COMPLETE</span><span style="color: #000066; font-weight: bold;">,</span> onComplete<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #339966; font-weight: bold;">function</span> onComplete<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span>SuperLogin<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">.</span>isInvalidEmail<span style="color: #000000;">&#41;</span> <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;email was invalid&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">;</span></div></div>
<p><strong>Head over to <a href="http://www.flashmvc.com">www.flashmvc.com</a> and check it out!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jadbox.com/2009/06/flashmvc-2-0-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What&#8217;s New, Doc?</title>
		<link>http://www.jadbox.com/2009/05/whats-new-doc/</link>
		<comments>http://www.jadbox.com/2009/05/whats-new-doc/#comments</comments>
		<pubDate>Tue, 05 May 2009 15:20:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Artificial Intelligence (AI)]]></category>
		<category><![CDATA[Flash/Flex/AIR]]></category>
		<category><![CDATA[Showcase]]></category>

		<guid isPermaLink="false">http://www.jadbox.com/?p=1190</guid>
		<description><![CDATA[I have had some people asking me what I have been scheming lately which in honest hasn&#8217;t been much. The weather here in Michigan has been finally nice for a change so I have been spending most of my free time cycling. However, I did go out last weekend and finally bought the fabulous Gang [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-medium wp-image-1192" title="design-patterns-book-cover" src="http://www.jadbox.com/wp-content/uploads/2009/05/design-patterns-book-cover-229x300.png" alt="design-patterns-book-cover" width="180" height="230" /><img class="size-full wp-image-1193" title="wacom-bamboo-fun-medium-tablet-cte650k-300" src="http://www.jadbox.com/wp-content/uploads/2009/05/wacom-bamboo-fun-medium-tablet-cte650k-300.gif" alt="wacom-bamboo-fun-medium-tablet-cte650k-300" width="232" height="219" /></p>
<p>I have had some people asking me what I have been scheming lately which in honest hasn&#8217;t been much. The weather here in Michigan has been finally nice for a change so I have been spending most of my free time cycling. However, I did go out last weekend and finally bought the fabulous Gang of Four book Design Patterns to add to my library. I know enough C++, JAVA, and Smalltalk to decipher the examples and apply it to whatever language I might be using these days (which has been lots of AS3, haXe, C#, and Unity3D).  I also decided to join the tablet bandwagon and added a Wacom Bamboo to my collection in hopes that it will inspire me to work on my art portfolio that I have been neglecting. The surface really feels (and sounds) like you are drawing on paper!</p>
<p>In the next coming weeks I will be working on <a href="http://www.jadbox.com/flashmvc">FlashMVC</a> to do some cleanup and perhaps add more examples to the repository.<br />
Lastly, I have been experimenting on AI development with local unit world data deresolution and querying. Such a system I am building will allow NPCs to explore large environments while meta tagging locations of interests for latter lookups. Usually this isn&#8217;t as complicated as the process I am developing, but I have to design something that is agile and performs well in the Flash player environment. I will blog more about this soon most likely.</p>
<p>O, and thank you to the people who came to my lecture on design patterns last week! I hope everyone was able to walk away with some practical knowledge to apply to their own projects. There is a good chance that I might continue this lecture in the future to dive deeper into a variety of AS3-applicable development pattens. The video camera we had in the room had some issues (we lost the second half of the lecture), but I hope to get the recording compressed and posted here soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jadbox.com/2009/05/whats-new-doc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detroit Design Patterns Lecture pt. 2</title>
		<link>http://www.jadbox.com/2009/04/detroit-design-patterns-lecture-pt-2/</link>
		<comments>http://www.jadbox.com/2009/04/detroit-design-patterns-lecture-pt-2/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 16:59:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash/Flex/AIR]]></category>
		<category><![CDATA[Showcase]]></category>

		<guid isPermaLink="false">http://www.jadbox.com/?p=1152</guid>
		<description><![CDATA[This Thursday, April 30th, I will be continuing my lecture on Actionscript design patterns and principles at the Detroit Adobe User&#8217;s Group meetup. See the first lecture post here for directions and time information. This week I will be covering different mainstream design patterns in detail and if we have time give a brief overview [...]]]></description>
			<content:encoded><![CDATA[<p>This Thursday, April 30th, I will be continuing my lecture on Actionscript design patterns and principles at the Detroit Adobe User&#8217;s Group meetup. See the <a href="http://www.jadbox.com/2009/03/my-adobe-users-group-seminar/" target="_self">first lecture post here</a> for directions and time information. This week I will be covering different mainstream design patterns in detail and if we have time give a brief overview of popular MVC frameworks that help accelerate application development. However, I do believe that teaching patterns and frameworks without knowing good object oriented principles is fruitless so I will also continue this topic discussion into the next portion of the lecture. </p>
<p>The conference is free to attend, and anyone from beginners to experts are welcome to join!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jadbox.com/2009/04/detroit-design-patterns-lecture-pt-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>FlashMVC Update: addResultListeners</title>
		<link>http://www.jadbox.com/2009/04/flashmvc-update-addresultlistener/</link>
		<comments>http://www.jadbox.com/2009/04/flashmvc-update-addresultlistener/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 20:07:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash/Flex/AIR]]></category>
		<category><![CDATA[Showcase]]></category>
		<category><![CDATA[flashMVC]]></category>

		<guid isPermaLink="false">http://www.jadbox.com/?p=1090</guid>
		<description><![CDATA[I have just finished up making another addition to my framework FlashMVC. The update effectively removes the need to use ActionBinder as I will indicate below. ActionBinder was a neat utility, but ultimately I wanted solution that was just as simplistic but could be usable for both Flash and Flex. I couldn&#8217;t find any easy [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: right;"><a href="http://www.jadbox.com/flashmvc"><img class="size-full wp-image-745 alignright" title="flashmvc" src="http://www.jadbox.com/wp-content/uploads/2008/12/flashmvc.gif" alt="flashmvc" width="159" height="156" /></a></p>
<p>I have just finished up making another addition to my framework <a href="http://www.jadbox.com/flashmvc"><strong>FlashMVC</strong></a>. The update effectively removes the need to use ActionBinder as I will indicate below. ActionBinder was a neat utility, but ultimately I wanted solution that was just as simplistic but could be usable for both Flash and Flex. I couldn&#8217;t find any easy solutions until I thought about retrofitting addEventListener with an alternate form to allow callback functions to fire for specific commands on the SuperModel. Hence, I have added these three new methods to <strong>SuperModel</strong>:</p>
<p><strong>.addResultListeners</strong>(<em>actionName</em>:String, <em>onSuccess</em>:Function, <em>onFail</em>:Function)<br />
<strong>.addStatusListeners</strong>(<em>actionName</em>:String, <em>enabled</em>:Function, <em>disabled</em>:Function)<br />
<strong>.addHasActionListeners</strong>(<em>actionName</em>:String, <em>added</em>:Function, <em>removed</em>:Function)</p>
<p>Now in your view, you can do something like this in your view:</p>
<div class="codecolorer-container actionscript3 twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6699cc; font-weight: bold;">var</span> app<span style="color: #000066; font-weight: bold;">:</span>MySuperApplication = MySuperApplication<span style="color: #000066; font-weight: bold;">.</span>getInstance<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
app<span style="color: #000066; font-weight: bold;">.</span>addResultListeners<span style="color: #000000;">&#40;</span>MySuperApplication<span style="color: #000066; font-weight: bold;">.</span>Login<span style="color: #000066; font-weight: bold;">,</span> onSuccess<span style="color: #000066; font-weight: bold;">,</span> onFail<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #009900; font-style: italic;">// SuperModel.perform(name of the action, optional onComplete function, ...Rest for the parameters of the action class)</span><br />
app<span style="color: #000066; font-weight: bold;">.</span>perform<span style="color: #000000;">&#40;</span>MySuperApplication<span style="color: #000066; font-weight: bold;">.</span>Login<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;test@invalidemail@.com&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<br />
<span style="color: #339966; font-weight: bold;">function</span> onSuccess<span style="color: #000000;">&#40;</span>result<span style="color: #000066; font-weight: bold;">:*</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Login was successful&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<span style="color: #339966; font-weight: bold;">function</span> onFail<span style="color: #000000;">&#40;</span>result<span style="color: #000066; font-weight: bold;">:*</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>result==MySuperApplication<span style="color: #000066; font-weight: bold;">.</span>RESULT_INVALID_EMAIL<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;invalid email used&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
<p><a href="http://www.jadbox.com/flashmvc_docs/">Updated ASDocs Here</a></p>
<p>Aside from this addition, I added in some safeguards like throwing an error if a command tries to call ActionHelper.complete() more than once as well as some other fixes. ActionBinder is still useful in the Flex world as it can help increase readability in some cases, but SuperModel now has most of the nice features built into it.</p>
<p>Please let me know if you have any comments! I am still working on adding in the replay feature to the framework which hopefully I will have done soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jadbox.com/2009/04/flashmvc-update-addresultlistener/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HaXe vs Unity3D vs XNA vs others</title>
		<link>http://www.jadbox.com/2009/04/haxe-vs-unity3d-vs-xna-vs-others/</link>
		<comments>http://www.jadbox.com/2009/04/haxe-vs-unity3d-vs-xna-vs-others/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 01:08:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[Showcase]]></category>

		<guid isPermaLink="false">http://www.jadbox.com/?p=1063</guid>
		<description><![CDATA[For the past couple months, I have been trying to determine the best platform to become my primary language for game AI unit development, shaders, and working on theories of improving the Fridge-A* algorithm. However, choosing the right language has become an arduous task. Hardcore programmers will scream &#8220;C++ is the only way to go!&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>For the past couple months, I have been trying to determine the best platform to become my primary language for game AI unit development, shaders, and working on theories of improving the Fridge-A* algorithm. However, choosing the right language has become an arduous task. Hardcore programmers will scream &#8220;C++ is the only way to go!&#8221; while the elites say &#8220;C is so much better than C++&#8221; and of course there is that one guy who comments &#8220;Why would you use anything other than Assembly language?&#8221; The problem lies in the fact that I am doing this work on my own and <em>do not have XX hours to write an elaborate garbage collector, manage raw threads, or constantly keep track of hundreds of pointers</em>. On the other hand, I must have enough speed and processing power to do the research and development I want. </p>
<p>Some suggest Java as a game platform as the language is respectable. However, graphics rendering speed and the Java gaming community is poor at best in my humble opinion. I did enjoy using BlitzMax back in the day, but the engine is simply not powerful enough to create something near commercial quality. Also, the popularity of the language is low, and I would have little professional use for learning more of the language. Flash AS3 is my primary profession; however, its performance leaves much to be desired at times. On the other side, Silverlight 3 is looking rather nifty, but the API still looks funky and doesn&#8217;t seem like the engine is really mature enough to do any major development in. Perhaps, if Silverlight 4 has near XNA speeds, better shaders and bitmap drawing, and the XAML to C# connection has less oddities in the API&#8230; it would be a contender for my list. Aside from the web platform, I could also go for a super high-end engine like Unreal Engine 3 or Source, but I couldn&#8217;t ever hope to produce something commercial with it because of the insanely expensive licensing (hundreds of thousands we are talking about!). Of course this is also Torque, but I have not been impressed with any of the games made on the platform, and there is a moderate cost to get started with it.</p>
<p>So I eventually evaluated my choices to <a href="http://en.wikipedia.org/wiki/Microsoft_XNA">XNA</a>, <a href="http://en.wikipedia.org/wiki/HaXe">haXe</a>, and <a href="http://en.wikipedia.org/wiki/Unity_(game_engine)">Unity3D</a>:</p>
<p><img class="alignnone size-full wp-image-1066" title="xna logo" src="http://www.jadbox.com/wp-content/uploads/2009/04/xna.gif" alt="xna logo" width="198" height="93" /></p>
<p>Pros:</p>
<ul>
<li>Very fast (Fastest of the choices)</li>
<li>Great shader support</li>
<li>C# is a nice language with advanced OOP support</li>
<li>Xbox and Windows deployment</li>
<li>Free for indie users</li>
</ul>
<p>Cons:</p>
<ul>
<li>Meant really for just the xbox&#8230; there is little support for Windows only deployment and DRM concerns. Also, no luck for Macs.</li>
<li>Unlike the other two, XNA cannot steam which means a smaller audience because of the hassle of downloading</li>
<li>Super new so the community is not that large in general</li>
</ul>
<p><img class="alignnone size-full wp-image-1064" title="haxe_logo" src="http://www.jadbox.com/wp-content/uploads/2009/04/haxe_logo.gif" alt="haxe_logo" width="252" height="72" /></p>
<p>Pros:</p>
<ul>
<li>Compiles out to Flash which 98% of users have already installed</li>
<li>Real-world benchmarks show 2x the speed of Flash 9 using code performance optimizations unique to haXe</li>
<li>From working with haXe, I will use that same knowledge to build javascript and neko scripts in the future if I wanted</li>
<li>I can use my existing knowledge of Flash to accelerate my development</li>
<li>Totally free</li>
</ul>
<p>Cons:</p>
<ul>
<li>No Flash IDE</li>
<li>Also super new with a small community and little to speak of tutorials</li>
<li>Still slower than unity3D and XNA</li>
<li>Currently does not support importing Flash libraries which reduces the amount of existing libraries I can bring over versus just using Flash AS3.</li>
</ul>
<p><img class="alignnone size-full wp-image-1065" title="unity3d logo" src="http://www.jadbox.com/wp-content/uploads/2009/04/unity3d.gif" alt="unity3d logo" width="345" height="137" /></p>
<p>Pros:</p>
<ul>
<li>Fastest of the web 3D engine&#8230; also nice looking</li>
<li>Supports developed on Macs and now Windows</li>
<li>Uses Python for scripting</li>
<li>Supports large number of users for networking and shaders</li>
</ul>
<p>Cons:</p>
<ul>
<li>No free version to try things out (only 30 day trial)</li>
<li>Costly software (the indie license has a terrible roster of features making the Pro version the ideal choice)</li>
<li>Little resources and support for making 2D games&#8230; everything is geared for 3D development. This can be a negative thing for me as I like to develop quick 2D testing scenarios for AI scripts. From what I can see, there are few tools for doing advanced bitmap drawing.</li>
</ul>
<p><strong>Final thoughts:</strong></p>
<p>In truth, I have not made up my mind yet. The pros and cons of all the solutions seem to make every choice the same weight in how it appeals to me. I could forsake all the above options and just go with C++ with Allegro or SDL, but they too have their ups and downs. Allergro is really slow without full DirectX/OpenGL support and SDL seems to have an aged API with little in the future for it. Also, neither of those libraries natively support shaders. XNA would give me all the speed I would need for what I am trying to accomplish, but using a language that streams over the internet would give me a much wider audience.</p>
<p>Well, what do you say readers? Are there other languages I should be looking at? For my next post on the subject, I will try to make some benchmarks in all of the three languages to test their true strengths.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jadbox.com/2009/04/haxe-vs-unity3d-vs-xna-vs-others/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Further Reading on Design Patterns</title>
		<link>http://www.jadbox.com/2009/03/further-reading-on-design-patterns/</link>
		<comments>http://www.jadbox.com/2009/03/further-reading-on-design-patterns/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 03:41:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Flash/Flex/AIR]]></category>
		<category><![CDATA[Game Development]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[Lifestyle]]></category>
		<category><![CDATA[Showcase]]></category>

		<guid isPermaLink="false">http://www.jadbox.com/?p=1047</guid>
		<description><![CDATA[As a followup on my Wednesday lecture on design patterns, I wanted to post some informative resources for learning more about design patterns outside the next lecture on the topic. Also, I wanted to say thanks for everyone who showed up to hear me rant about code structure (not the most exciting topic in the [...]]]></description>
			<content:encoded><![CDATA[<p>As a followup on my Wednesday lecture on design patterns, I wanted to post some informative resources for learning more about design patterns outside the next lecture on the topic. Also, I wanted to say thanks for everyone who showed up to hear me rant about code structure (not the most exciting topic in the world mind you)!</p>
<p style="text-align: center;"><strong>Design Pattern Definition</strong><br />
<em>In software engineering, a design pattern is a general reusable solution to a commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations. Object-oriented design patterns typically show relationships and interactions between classes or objects, without specifying the final application classes or objects that are involved. </em><br />
- read more at <a href="http://en.wikipedia.org/wiki/Design_pattern_(computer_science)">WikiPedia</a></p>
<p style="text-align: center;"><strong>MVC </strong><strong>Definition </strong>(the most common principle of Design Patterns)<br />
<img class="aligncenter size-full wp-image-1049" title="graph" src="http://www.jadbox.com/wp-content/uploads/2009/03/mvc.gif" alt="mvc" width="346" height="312" /><br />
&#8220;<em>Model–View–Controller (MVC) is an architectural pattern used in software engineering. Successful use of the pattern isolates business logic from user interface considerations, resulting in an application where it is easier to modify either the visual appearance of the application or the underlying business rules without affecting the other. In MVC, the model represents the information (the data) of the application; the view corresponds to elements of the user interface such as text, checkbox items, and so forth; and the controller manages the communication of data and the business rules used to manipulate the data to and from the model.</em>&#8221;<br />
- read more at <a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller">WikiPedia</a></p>
<p><strong>Books:</strong></p>
<ul>
<li><a href="http://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional/dp/0201633612/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1238210502&amp;sr=8-1" target="_blank">Gang of Four&#8217;s original Design Patterns</a></li>
<li><a href="http://www.amazon.com/Advanced-ActionScript-3-Design-Patterns/dp/0321426568/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1238210569&amp;sr=1-2">Advanced ActionScript 3 with Design Patterns</a> (highly recommended)</li>
<li><a href="http://www.amazon.com/ActionScript-3-0-Design-Patterns-Programming/dp/0596528469/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1238210569&amp;sr=1-1">ActionScript 3.0 Design Patterns: Object Oriented Programming Techniques</a></li>
</ul>
<p><strong>AS3 Design Pattern Informational Websites:</strong></p>
<ul>
<li><a href="http://www.as3dp.com/category/principles/" target="_self">www.as3dp.com &#8211; ActionScript 3 Design Pattern Blog</a> (Principles Category)</li>
<li><a href="http://ntt.cc/category/programming/ria-flex/design-patterns">ntt.cc posts on of porting GoF design patterns to AS3</a></li>
</ul>
<p><strong>Flash Design Pattern Frameworks:</strong><br />
<em>(for now, it&#8217;s best to avoid these until you understand the fundamentals of MVC)</em></p>
<ul>
<li><a href="http://www.jadbox.com/flashmvc/">FlashMVC</a></li>
<li><a href="http://puremvc.org/">PureMVC</a></li>
<li><a href="http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm">Cairngorm</a></li>
</ul>
<p><strong>Good Design Priniciples:</strong></p>
<ul>
<li>ALWAYS type your variables (not really design principle but I too often see people doing this still)</li>
<li>An object/MovieClip should contain the actions that it performs (as oppose to objects outside the class forcing it to perform actions)</li>
<li>A class should never be able to &#8220;break&#8221; if the user sets a property or calls a function on it when they are not suppose to. Keep preventive logic in the class that&#8217;s doing the work.</li>
<li>A good chosen design pattern for a problem will not take any longer to implement than not using it with spaghetti code.</li>
</ul>
<p>Feel free to leave comments or email me about any further questions you have about Design Patterns or where to find additional materials on it. Have a great weekend everyone!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jadbox.com/2009/03/further-reading-on-design-patterns/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Detroit Design Pattern Seminar</title>
		<link>http://www.jadbox.com/2009/03/my-adobe-users-group-seminar/</link>
		<comments>http://www.jadbox.com/2009/03/my-adobe-users-group-seminar/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 04:24:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash/Flex/AIR]]></category>
		<category><![CDATA[Showcase]]></category>

		<guid isPermaLink="false">http://www.jadbox.com/?p=1024</guid>
		<description><![CDATA[On Thursday 3/26/2009, I will be giving an open seminar on design patterns for the Detroit Adobe User Group. I should have blogged about this much earlier but my free time has been spread thin of late unfortunately. It will be hosted at ePrize starting at 7:00pm and ending about 9:00pm. I will be covering [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-1025 aligncenter" title="DAAUG" src="http://www.jadbox.com/wp-content/uploads/2009/03/2.jpg" alt="DAAUG" width="407" height="333" /></p>
<p>On Thursday 3/26/2009, I will be giving an open seminar on <em>design patterns</em> for the <a href="http://groups.adobe.com/groups/3a67effa9b/summary"><strong>Detroit Adobe User Group</strong></a>. I should have blogged about this much earlier but my free time has been spread thin of late unfortunately. It will be hosted at ePrize starting at 7:00pm and ending about 9:00pm. I will be covering just some introductory topics of good programming practices with AS3 while diving into some design pattern concepts. There is also a good chance that I will do a more advanced seminar on design patterns in the near future at the user group meetings. This conference will be free to the public so please leave a comment or shoot me an email for directions or more information.<br />
<strong>-[ </strong><a href="http://www.jadbox.com/about/">Jonathan_Dunlap</a>::email="jonathan AT jadbox.com"<strong> ]-</strong></p>
<p><iframe width="540" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?oe=utf-8&amp;client=firefox-a&amp;ie=UTF8&amp;q=eprize+detroit,mi&amp;fb=1&amp;split=1&amp;gl=us&amp;cid=0,0,11218617017399383998&amp;ei=KgDLSenNHqnulQeBoLzqCQ&amp;source=embed&amp;ll=42.474851,-83.134918&amp;spn=0.005539,0.011587&amp;z=16&amp;iwloc=A&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?oe=utf-8&amp;client=firefox-a&amp;ie=UTF8&amp;q=eprize+detroit,mi&amp;fb=1&amp;split=1&amp;gl=us&amp;cid=0,0,11218617017399383998&amp;ei=KgDLSenNHqnulQeBoLzqCQ&amp;source=embed&amp;ll=42.474851,-83.134918&amp;spn=0.005539,0.011587&amp;z=16&amp;iwloc=A" style="color:#0000FF;text-align:left">View Larger Map</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jadbox.com/2009/03/my-adobe-users-group-seminar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FlashMVC API Update</title>
		<link>http://www.jadbox.com/2009/02/flashmvc-api-update/</link>
		<comments>http://www.jadbox.com/2009/02/flashmvc-api-update/#comments</comments>
		<pubDate>Sat, 21 Feb 2009 22:42:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash/Flex/AIR]]></category>
		<category><![CDATA[Showcase]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flashMVC]]></category>

		<guid isPermaLink="false">http://www.jadbox.com/?p=935</guid>
		<description><![CDATA[While having time this weekend to review a few of the Flash projects I&#8217;ve been working on, I became aware of the idea that every software &#8220;action&#8221; has the anticipated state of failing. Login will fail if the user enters incorrect credentials or leaves a field empty; A user cancels a file copy operation; A [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="FlashMVC" src="http://www.jadbox.com/wp-content/uploads/2008/12/flashmvc1.gif" alt="" width="153" height="152" />While having time this weekend to review a few of the Flash projects I&#8217;ve been working on, I became aware of the idea that every software &#8220;action&#8221; has the anticipated state of failing. Login will fail if the user enters incorrect credentials or leaves a field empty; A user cancels a file copy operation; A reg form may fail if the user is not permitted to enter the site based off their information. It&#8217;s not that the application is failing because it can&#8217;t reach a web service or something unexpected happened, but rather a planned reaction was developed to give the user a negitive response to their action. In light of this, I have updated <a href="http://www.jadbox.com/flashmvc">FlashMVC</a> to allow actions to designate that it&#8217;s result is negitive/failed. Then on the SuperModel side, the view can optionally supply a fail callback function for when the action designates that it failed.</p>
<div class="codecolorer-container actionscript3 twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900; font-style: italic;">// &nbsp;Action class</span><br />
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> Login <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> Login<span style="color: #000000;">&#40;</span>helper<span style="color: #000066; font-weight: bold;">:</span>ActionHelper<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">name</span><span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a><span style="color: #000066; font-weight: bold;">,</span> password<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span>==<span style="color: #990000;">&quot;user&quot;</span> <span style="color: #000066; font-weight: bold;">&amp;&amp;</span> password==<span style="color: #990000;">&quot;pw&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SuperSimpleApp<span style="color: #000066; font-weight: bold;">.</span>getInstance<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>userFirstName = <span style="color: #990000;">&quot;John Doe&quot;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; helper<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">complete</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">name</span>==<span style="color: #990000;">&quot;&quot;</span> <span style="color: #000066; font-weight: bold;">||</span> password==<span style="color: #990000;">&quot;&quot;</span><span style="color: #000000;">&#41;</span> helper<span style="color: #000066; font-weight: bold;">.</span>result = SuperSimpleApp<span style="color: #000066; font-weight: bold;">.</span>RESULT_EMPTY_FIELDS<span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; helper<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">complete</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">// &quot;false&quot; tells the caller that this was not successful</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
<p>The line &#8220;helper.complete(false)&#8221; tells the SuperModel that the action completed but it was a negative response. In this example, it was failing the login action. So we have the action created, now we need to create the SuperModel that its attached to and the SuperModel will also service as its model.</p>
<div class="codecolorer-container actionscript3 twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900; font-style: italic;">// SuperModel</span><br />
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> SuperSimpleApp <span style="color: #0033ff; font-weight: bold;">extends</span> SuperModel <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> static const LOGIN<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a> = <span style="color: #990000;">&quot;Login&quot;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">// String reference to the class name for the view to call</span><br />
&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// Flag a response to use in special situations where the view needs to know more about the result</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> static const RESULT_EMPTY_FIELDS<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a> = <span style="color: #990000;">&quot;emptyFields&quot;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> userFirstName<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> SuperSimpleApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// Register the class to the SuperModel for use.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// Note: once the action is added, use the string name of the class to reference it</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; actionAdd<span style="color: #000000;">&#40;</span>Login<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">public</span> static const getInstance<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span>SuperSimpleApp = <span style="color: #0033ff; font-weight: bold;">new</span> SuperSimpleApp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <br />
<span style="color: #000000;">&#125;</span></div></div>
<p>Now in Flash or in your Flex MXML you can run your Login action like this:</p>
<div class="codecolorer-container actionscript3 twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6699cc; font-weight: bold;">var</span> superModel<span style="color: #000066; font-weight: bold;">:</span>SuperSimpleApp = SuperSimpleApp<span style="color: #000066; font-weight: bold;">.</span>getInstance<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #009900; font-style: italic;">// loginAction will hold the action class we want to call and setup the onSuccess and onFail callbacks.</span><br />
<span style="color: #6699cc; font-weight: bold;">var</span> loginAction<span style="color: #000066; font-weight: bold;">:</span>Performance = <span style="color: #0033ff; font-weight: bold;">new</span> Performance<span style="color: #000000;">&#40;</span>SuperSimpleApp<span style="color: #000066; font-weight: bold;">.</span>LOGIN<span style="color: #000066; font-weight: bold;">,</span> onSuccess<span style="color: #000066; font-weight: bold;">,</span> onFail<span style="color: #000000;">&#41;</span><br />
<span style="color: #009900; font-style: italic;">// ...</span><br />
<span style="color: #009900; font-style: italic;">// Now later in the code, run the action now on the SuperModel with a test username and password</span><br />
<span style="color: #339966; font-weight: bold;">function</span> onSubmitButtonClick<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=event%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:event.html"><span style="color: #004993;">Event</span></a><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; superModel<span style="color: #000066; font-weight: bold;">.</span>process<span style="color: #000000;">&#40;</span>loginAction<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;user&quot;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #990000;">&quot;pw&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<span style="color: #009900; font-style: italic;">// If the user is logged in successfully</span><br />
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onSuccess<span style="color: #000000;">&#40;</span>result<span style="color: #000066; font-weight: bold;">:*</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Hello &quot;</span><span style="color: #000066; font-weight: bold;">+</span> superModel<span style="color: #000066; font-weight: bold;">.</span>userFirstName<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span><br />
<span style="color: #009900; font-style: italic;">// If the login action designated a negative response to the request:</span><br />
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> onFail<span style="color: #000000;">&#40;</span>result<span style="color: #000066; font-weight: bold;">:*</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// Check the result against known responses flagged in the super model... otherwise give generic message.</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>result==SuperSimpleApp<span style="color: #000066; font-weight: bold;">.</span>RESULT_EMPTY_FIELDS<span style="color: #000000;">&#41;</span> <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Please fill out all fields&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
&nbsp; &nbsp; <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Invalid username or password&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
<p>This should help having to deal with common success and fail responses from actions. Let me know what your thoughts are!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jadbox.com/2009/02/flashmvc-api-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ActionScript Reference for Android!</title>
		<link>http://www.jadbox.com/2009/02/actionscript-for-android/</link>
		<comments>http://www.jadbox.com/2009/02/actionscript-for-android/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 22:17:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Flash/Flex/AIR]]></category>
		<category><![CDATA[Showcase]]></category>
		<category><![CDATA[as3]]></category>

		<guid isPermaLink="false">http://www.jadbox.com/?p=839</guid>
		<description><![CDATA[After seeing that someone wrote an ActionScript reference application for the iPhone called ActionScript 3 API Reference for iPhone, I decided to take matters into my own hands and make the same application for the Android platform which the t-mobile G1 works on. The Android OS is a fantastic platform for a developer as I [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-840" title="ActionScript Reference for Android" src="http://www.jadbox.com/wp-content/uploads/2009/02/icon.png" alt="ActionScript Reference for Android" width="69" height="66" />After seeing that someone wrote an ActionScript reference application for the iPhone called <a href="http://www.mikechambers.com/as3iphone/" target="_blank">ActionScript 3 API Reference for iPhone</a>, I decided to take matters into my own hands and make the same application for the Android platform which the t-mobile G1 works on. The Android OS is a fantastic platform for a developer as I made this whole application over just two weekends. For the first release, I included a view to see all classes and a class search functionality. You can now download this from the Market on your Android phone! You can find it under the Application &#8211; Reference section, and it&#8217;s called <em>ActionScript Reference</em>. See the below screenshots&#8230;</p>
<p><strong>Classes View:</strong><br />
<img class="size-full wp-image-841" title="screen1" src="http://www.jadbox.com/wp-content/uploads/2009/02/screen1.gif" alt="screen1" width="319" height="480" /></p>
<p><strong>Class Information View:</strong><br />
<img class="alignnone size-full wp-image-841" title="screen2" src="http://www.jadbox.com/wp-content/uploads/2009/02/screen2.gif" alt="screen2" width="319" height="480" /></p>
<p>For more information on Android: <a href="http://www.android.com/">http://www.android.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jadbox.com/2009/02/actionscript-for-android/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>FlashVars for EVERYONE!</title>
		<link>http://www.jadbox.com/2009/01/flashvars-for-everyone/</link>
		<comments>http://www.jadbox.com/2009/01/flashvars-for-everyone/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 16:49:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash/Flex/AIR]]></category>
		<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Showcase]]></category>
		<category><![CDATA[as3]]></category>

		<guid isPermaLink="false">http://www.jadbox.com/?p=810</guid>
		<description><![CDATA[When building utilities that can be used with both Flash and Flex, there are two common hurdles that developers run into. The first one is that Flex does not pull FlashVars the same way that Flash does. This means for ActionScript utilities that rely on html inserted variables will need to be separated into two [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-819" title="flashvarscat" src="http://www.jadbox.com/wp-content/uploads/2009/01/flashvarscat.jpg" alt="flashvarscat" width="230" height="230" />When building utilities that can be used with both Flash and Flex, there are two common hurdles that developers run into. The first one is that Flex does not pull FlashVars the same way that Flash does. This means for ActionScript utilities that rely on html inserted variables will need to be separated into two separate files or need to have flashvars passed into the utility from the outside. Another hurdle is that Flash does not have a global reference to Stage- instead it can only be accessed through display children of stage. This is problematic for utilities that work with Stage as they can only get there reference of stage when it&#8217;s manually passed into the utility as a parameter which can result in an ugly web of stage references being passed around.</p>
<p>However, I finally got the time to develop a workaround that solves both problems with classes FlashVars and StageReference. The tricky part of this implementation was building a utility that could use the class Application but not reference it when it was being built from Flash since it would cause the compiler to fail from the invalid class reference. I worked around this issue by grabbing Application by getDefinitionByName so that the Flash compiler wouldn&#8217;t fail since it was a weak reference.</p>
<p>With Flash, use StageReference.stage = stage in Frame 1 or in your document class&#8217;s constructor. This will give you the global reference to stage and also allow the new class FlashVars to pull flashvars automatically when compiled in a Flash project.</p>
<p>The custom class FlashVars is used in this fashion:</p>
<div class="codecolorer-container actionscript3 twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6699cc; font-weight: bold;">var</span> myFlashvar<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a> = FlashVars<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">parameters</span><span style="color: #000000;">&#91;</span><span style="color: #990000;">&quot;myFlashvar&quot;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span></div></div>
<p>or</p>
<div class="codecolorer-container actionscript3 twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #6699cc; font-weight: bold;">var</span> myFlashvar<span style="color: #000066; font-weight: bold;">:</span><a href="http://www.google.com/search?q=string%20inurl:http://livedocs.adobe.com/flex/201/langref/%20inurl:string.html"><span style="color: #004993;">String</span></a> = FlashVars<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">parameters</span><span style="color: #000066; font-weight: bold;">.</span>myFlashvar<span style="color: #000066; font-weight: bold;">;</span></div></div>
<p><strong>This usage is exactly the same from Flash and Flex!</strong> No more having to switch from loaderInfo.parameters to Application.application.parameters when porting utilities between Flash and Flex.</p>
<p><strong>Download</strong> (includes StageReference): <strong><a href="http://www.jadbox.com/wp-content/uploads/2009/01/flashvars.zip">flashvars.zip</a></strong></p>
<p><span id="more-810"></span></p>
<p><em>Icon spoofed from <a href="http://icanhascheezburger.com/">icanhascheezburger.com</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jadbox.com/2009/01/flashvars-for-everyone/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>flashMVC: New Utility ActionBinder!</title>
		<link>http://www.jadbox.com/2008/12/flashmvc-actionbinder/</link>
		<comments>http://www.jadbox.com/2008/12/flashmvc-actionbinder/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 15:39:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash/Flex/AIR]]></category>
		<category><![CDATA[Showcase]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flashMVC]]></category>

		<guid isPermaLink="false">http://www.jadbox.com/?p=712</guid>
		<description><![CDATA[I just update the SVN (svn.jadbox.com/public/) source for flashMVC with a MXML component tool I made for the cases that I was working with Flex. It&#8217;s located in com/jadbox/flashMVC/flex/ActionBinder.as, and it helps automate the view (aka MXML) portion of your application to communicate with your SuperModel. It will monitor the status of a particular action [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-medium wp-image-713 alignright" title="shoe-chains" src="http://www.jadbox.com/wp-content/uploads/2008/12/shoe-chains-300x300.jpg" alt="" width="240" height="240" />I just update the <a href="http://svn.jadbox.com/public/">SVN</a> (svn.jadbox.com/public/) source for <a href="http://www.jadbox.com/flashmvc/">flashMVC</a> with a MXML component tool I made for the cases that I was working with Flex. It&#8217;s located in <strong>com/jadbox/flashMVC/flex/ActionBinder.as</strong>, and it helps automate the view (aka MXML) portion of your application to communicate with your SuperModel. It will monitor the status of a particular action on the model, and allow the user to easily perform view updates or to run the action itself. This will help further reduce the amount of work you will have to do in Script tags (if not completely remove the need for one in the MXML).</p>
<div class="codecolorer-container actionscript3 twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript3 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900; font-style: italic;">// Example</span><br />
<span style="color: #000066; font-weight: bold;">&lt;</span>flashMVC<span style="color: #000066; font-weight: bold;">:</span>ActionBinder superModel=<span style="color: #990000;">&quot;{mySuperModel}&quot;</span><br />
&nbsp; &nbsp; action=<span style="color: #990000;">&quot;{mySuperModel.LOGIN}&quot;</span> &nbsp; &nbsp;<br />
&nbsp; &nbsp; id=<span style="color: #990000;">&quot;LoginBinder&quot;</span>&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; actionComplete=<span style="color: #990000;">&quot;{trace('Login action completed')}&quot;</span>&nbsp; &nbsp;<br />
&nbsp; &nbsp; actionEnable=<span style="color: #990000;">&quot;{trace('action enabled')}&quot;</span>&nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; actionDisable=<span style="color: #990000;">&quot;{trace('action disabled')}&quot;</span>&nbsp; &nbsp;<br />
&nbsp; &nbsp; actionPerforming=<span style="color: #990000;">&quot;{trace('working')}&quot;</span> &nbsp; &nbsp;<br />
&nbsp; &nbsp; actionStoppedPerforming=<span style="color: #990000;">&quot;{trace('stopped working')}&quot;</span> <span style="color: #000066; font-weight: bold;">/&gt;</span><br />
<br />
<span style="color: #009900; font-style: italic;">// You can also do the action from the wrapper:</span><br />
myActionBinder<span style="color: #000066; font-weight: bold;">.</span>perform<span style="color: #000000;">&#40;</span><span style="color: #000066; font-weight: bold;">...</span>args<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span><br />
LoginBinder<span style="color: #000066; font-weight: bold;">.</span>perform<span style="color: #000000;">&#40;</span>username<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span><span style="color: #000066; font-weight: bold;">,</span> password<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">test</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">// for example</span><br />
<br />
<span style="color: #009900; font-style: italic;">// Can use this property to</span><br />
<span style="color: #009900; font-style: italic;">// enable or disable the action as well:</span><br />
myActionBinder<span style="color: #000066; font-weight: bold;">.</span>actionEnabled=<span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span></div></div>
<p>You can find a great example of this in my SVN under the path:<br />
<strong>/flex projects/flashMVC examples/actionBinderExample/</strong><br />
You will just be sure to link the flashMVC framework from the Flex project settings to compile.</p>
<p>Asdocs have been updated with the <a href="http://www.jadbox.com/flashmvc_docs/">ActionBinder&#8217;s API</a>. For more information about nimble flashMVC framework, go the <a href="http://www.jadbox.com/flashmvc/">flashMVC</a> tab at the top.</p>
<p>Next on my list of features for flashMVC is the application &#8220;replayability from imported xml log&#8221;. This will be really useful to utilize in Flash or Flex development!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jadbox.com/2008/12/flashmvc-actionbinder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>flashMVC beta released</title>
		<link>http://www.jadbox.com/2008/09/flashmvc-beta-released/</link>
		<comments>http://www.jadbox.com/2008/09/flashmvc-beta-released/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 14:16:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash/Flex/AIR]]></category>
		<category><![CDATA[Showcase]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flashMVC]]></category>

		<guid isPermaLink="false">http://www.jadbox.com/?p=499</guid>
		<description><![CDATA[I have finally released a pet-project of mine for handling simple to complex Flash and Flex applications in a unified way. The framework provides a pattern for MVC (Model View Controller) and has lots of goodies to rapidly build prototypes. In the near future, I will be working on an extension to allow quick unit [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jadbox.com/flashmvc/"><img class="alignleft size-medium wp-image-481" title="flashMVC logo" src="http://www.jadbox.com/wp-content/uploads/2008/09/flashmvslogo2-300x255.png" alt="" width="187" height="165" /></a>I have finally released a pet-project of mine for handling simple to complex Flash and Flex applications in a unified way. The framework provides a pattern for MVC (Model View Controller) and has lots of goodies to rapidly build prototypes. In the near future, I will be working on an extension to allow quick unit testing as well as better error handling. This is new so please leave feedback and comments! (-_^)P</p>
<p><a href="http://www.jadbox.com/flashmvc/">flashMVC</a> <a href="http://www.jadbox.com/flashmvc/">information and download page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jadbox.com/2008/09/flashmvc-beta-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

