<?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>Hugo Larcher</title>
	<atom:link href="http://hugolarcher.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://hugolarcher.com</link>
	<description>The tale of a devsigner</description>
	<lastBuildDate>Sun, 05 Feb 2012 12:57:59 +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>UITextField allowing only decimal characters</title>
		<link>http://hugolarcher.com/2012/02/05/uitextfield-allowing-only-decimal-characters/</link>
		<comments>http://hugolarcher.com/2012/02/05/uitextfield-allowing-only-decimal-characters/#comments</comments>
		<pubDate>Sun, 05 Feb 2012 12:55:42 +0000</pubDate>
		<dc:creator>hlarcher</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Objective-c]]></category>
		<category><![CDATA[Xcode]]></category>
		<category><![CDATA[currency]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[NSCharacterSet]]></category>
		<category><![CDATA[UIKeyboardTypeDecimalPad]]></category>
		<category><![CDATA[UITextField]]></category>
		<category><![CDATA[validate]]></category>

		<guid isPermaLink="false">http://hugolarcher.com/?p=431</guid>
		<description><![CDATA[If you need to limit user input on a UITextField to decimal characters only, either for currency or something else here's a bit of code that accomplishes that.

<a href="http://hugolarcher.com/?p=431">Read the Rest...</a>]]></description>
			<content:encoded><![CDATA[<p>If you need to limit user input on a UITextField to decimal characters only, either for currency or something else here&#8217;s a bit of code that accomplishes that. There&#8217;s lots of ways to do this even with the use of NSNumberFormatter and/or NSScanner.</p>
<p>First of all you need set the UITextFieldDelegate on your View Controller and then set the View as the delegate for your UITextField. You do this by changing a line in your View Controller&#8217;s .h file to:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">@interface</span> MyViewController <span style="color: #002200;">:</span> UIViewController &lt;UITextFieldDelegate&gt;</pre></div></div>

<p>and then either set the UITextField&#8217;s delegate in your View Controller&#8217;s .m file in the viewWillAppear method for example like:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">myTextField.delegate <span style="color: #002200;">=</span> self;</pre></div></div>

<p>or in Interface Builder by selecting the UITextField and in the Connections Inspector drag from the &#8220;delegate&#8221; to your View Controller.</p>
<p>Then you can implement the following delegate method:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>textField<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITextField <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>textField shouldChangeCharactersInRange<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">NSRange</span><span style="color: #002200;">&#41;</span>range replacementString<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span><span style="color: #a61390;">string</span> 
<span style="color: #002200;">&#123;</span>
    <span style="color: #400080;">NSCharacterSet</span> <span style="color: #002200;">*</span>nonNumberSet <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSCharacterSet</span> characterSetWithCharactersInString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;0123456789.&quot;</span><span style="color: #002200;">&#93;</span> invertedSet<span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #11740a; font-style: italic;">// allow backspace</span>
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>range.length &gt; <span style="color: #2400d9;">0</span> <span style="color: #002200;">&amp;&amp;</span> <span style="color: #002200;">&#91;</span><span style="color: #a61390;">string</span> length<span style="color: #002200;">&#93;</span> <span style="color: #002200;">==</span> <span style="color: #2400d9;">0</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
        <span style="color: #a61390;">return</span> <span style="color: #a61390;">YES</span>;
    <span style="color: #002200;">&#125;</span>
    <span style="color: #11740a; font-style: italic;">// do not allow . at the beggining</span>
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>range.location <span style="color: #002200;">==</span> <span style="color: #2400d9;">0</span> <span style="color: #002200;">&amp;&amp;</span> <span style="color: #002200;">&#91;</span><span style="color: #a61390;">string</span> isEqualToString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;.&quot;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
        <span style="color: #a61390;">return</span> <span style="color: #a61390;">NO</span>;
    <span style="color: #002200;">&#125;</span>
    <span style="color: #11740a; font-style: italic;">// set the text field value manually</span>
    <span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>newValue <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>textField text<span style="color: #002200;">&#93;</span> stringByReplacingCharactersInRange<span style="color: #002200;">:</span>range withString<span style="color: #002200;">:</span><span style="color: #a61390;">string</span><span style="color: #002200;">&#93;</span>;
    newValue <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>newValue componentsSeparatedByCharactersInSet<span style="color: #002200;">:</span>nonNumberSet<span style="color: #002200;">&#93;</span> componentsJoinedByString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;&quot;</span><span style="color: #002200;">&#93;</span>;
    textField.text <span style="color: #002200;">=</span> newValue;
    <span style="color: #11740a; font-style: italic;">// return NO because we're manually setting the value</span>
    <span style="color: #a61390;">return</span> <span style="color: #a61390;">NO</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>As you can see from the code&#8217;s comments we allow the user to delete characters, check if the separator is not at the start and removing any non decimal characters that user types or pastes.</p>
<p>You might also want to set your UITextField to use a decimal keyboard by doing this:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">myTextField.keyboardType <span style="color: #002200;">=</span> UIKeyboardTypeDecimalPad;</pre></div></div>

<p>Beware it only works on the iPhone (iPad doesn&#8217;t have this keyboard and it will default to the normal one) and only on iOS 4.1 or greater.</p>
<p>Hope this helps, happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://hugolarcher.com/2012/02/05/uitextfield-allowing-only-decimal-characters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a TableView to a View in Xcode 4.2</title>
		<link>http://hugolarcher.com/2012/01/21/adding-a-tableview-to-a-view-in-xcode-4-2/</link>
		<comments>http://hugolarcher.com/2012/01/21/adding-a-tableview-to-a-view-in-xcode-4-2/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 11:37:52 +0000</pubDate>
		<dc:creator>hlarcher</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Objective-c]]></category>
		<category><![CDATA[Xcode]]></category>
		<category><![CDATA[cocoa]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[objective-c]]></category>
		<category><![CDATA[TableView]]></category>
		<category><![CDATA[UITableViewController]]></category>
		<category><![CDATA[UIViewController]]></category>
		<category><![CDATA[xcode]]></category>

		<guid isPermaLink="false">http://hugolarcher.com/?p=416</guid>
		<description><![CDATA[Sometimes you need something else to be shown on the screen besides just a TableView, maybe you want a search bar at the top or a ToolBar or a bunch of other elements. In this case using a UITableViewController as your view won't do it. This is a simple guide of one way to solve this (I'm sure there might be others).

<a href="http://hugolarcher.com/?p=416">Read the Rest...</a>]]></description>
			<content:encoded><![CDATA[<p>Sometimes you need something else to be shown on the screen besides just a TableView, maybe you want a search bar at the top or a ToolBar or a bunch of other elements. In this case using a UITableViewController as your view won&#8217;t do it. This is a simple guide of one way to solve this (I&#8217;m sure there might be others).</p>
<p>I&#8217;m using Xcode 4.2 and storyboards on this one although it doesn&#8217;t really make much difference in this case, working with xib files would be very similar.</p>
<p>First, for the view instead of using a UITableViewController use a UIViewController, drag it to your storyboard (hook it up with any existing scenes you might already have) and then find the TableView object in your library and drag it inside your view (be careful not to confuse it with the UITableViewController).</p>
<p><a href="http://hugolarcher.com/wp-content/uploads/2012/01/tableview_inside_view_1.png" rel="lightbox[416]"><img class="aligncenter size-full wp-image-419" title="tableview_inside_view_1" src="http://hugolarcher.com/wp-content/uploads/2012/01/tableview_inside_view_1.png" alt="TableView Object" width="657" height="265" /></a></p>
<p>Now create a new file of type UIViewController subclass and call it whatever suits your app (I&#8217;ll call it DetailViewController for the purposes of this guide) and in your storyboard select the new view you created with the TableView inside and in the &#8220;Identity Inspector&#8221; set its class to DetailViewController by selecting it from the droplist.</p>
<p><a href="http://hugolarcher.com/wp-content/uploads/2012/01/tableview_inside_view_4.png" rel="lightbox[416]"><img class="aligncenter size-full wp-image-420" title="tableview_inside_view_4" src="http://hugolarcher.com/wp-content/uploads/2012/01/tableview_inside_view_4.png" alt="Identity Inspector" width="259" height="252" /></a></p>
<p>Now since you want to control your TableView from within the view you need to implement a couple delegates so open up your DetailViewController.h file and change the interface line to:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">@interface</span> DetailViewController <span style="color: #002200;">:</span> UIViewController &lt;UITableViewDelegate, UITableViewDataSource&gt;</pre></div></div>

<p>Next you&#8217;ll want to hook up your TableView to your view by creating an IBOutlet for it, you can do this by going to the storyboard, making sure you have &#8220;show the Assistant editor&#8221; with DetailViewController.h open and crtl+click and drag from the TableView to your code and call it myTable (something else if you want).</p>
<p>Your DetailViewController.h file should be looking similar to this:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">@interface</span> DetailViewController <span style="color: #002200;">:</span> UIViewController &lt;UITableViewDelegate, UITableViewDataSource&gt;
&nbsp;
<span style="color: #a61390;">@property</span> <span style="color: #002200;">&#40;</span>strong, nonatomic<span style="color: #002200;">&#41;</span> IBOutlet UITableView <span style="color: #002200;">*</span>myTable;
&nbsp;
<span style="color: #a61390;">@end</span></pre></div></div>

<p>Now if you did this like I said from dragging it in the storyboard you should also have a line like this in your DetailViewController.m file:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">@synthesize</span> myTable;</pre></div></div>

<p>If not then type it now. If you try to build now it should succeed but you&#8217;ll have a few warnings because of protocol methods missing in the implementation. This means that since your view is your TableView&#8217;s delegate it is responsible for implementing its protocol and there are lots of methods in it but only a few are really needed for now. In your DetailViewController.m put in the following methods:</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>NSInteger<span style="color: #002200;">&#41;</span>numberOfSectionsInTableView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITableView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView
<span style="color: #002200;">&#123;</span>
    <span style="color: #a61390;">return</span> <span style="color: #2400d9;">1</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>NSInteger<span style="color: #002200;">&#41;</span>tableView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITableView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView numberOfRowsInSection<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>NSInteger<span style="color: #002200;">&#41;</span>section
<span style="color: #002200;">&#123;</span>
    <span style="color: #a61390;">return</span> <span style="color: #2400d9;">1</span>;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>UITableViewCell <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UITableView <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>tableView cellForRowAtIndexPath<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #400080;">NSIndexPath</span> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>indexPath
<span style="color: #002200;">&#123;</span>
    <span style="color: #a61390;">static</span> <span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>CellIdentifier <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Cell&quot;</span>;
&nbsp;
    UITableViewCell <span style="color: #002200;">*</span>cell <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>tableView dequeueReusableCellWithIdentifier<span style="color: #002200;">:</span>CellIdentifier<span style="color: #002200;">&#93;</span>;
&nbsp;
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>cell <span style="color: #002200;">==</span> <span style="color: #a61390;">nil</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
        cell <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UITableViewCell alloc<span style="color: #002200;">&#93;</span> initWithStyle<span style="color: #002200;">:</span>UITableViewCellStyleDefault reuseIdentifier<span style="color: #002200;">:</span>CellIdentifier<span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">&#125;</span>
&nbsp;
    <span style="color: #11740a; font-style: italic;">// configure your cell here...</span>
&nbsp;
    <span style="color: #a61390;">return</span> cell;
<span style="color: #002200;">&#125;</span></pre></div></div>

<p>You might also want to implement other delegate methods like &#8211; (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath but that&#8217;s beyond the scope of this guide.</p>
<p>The last step is to hook up your view as the TableView&#8217;s delegate and data source. To do this open the storyboard file, select your TableView and go to your &#8220;Connections Inspector&#8221; and drag from dataSource and delegate to your ViewController.</p>
<p><a href="http://hugolarcher.com/wp-content/uploads/2012/01/tableview_inside_view_2.png" rel="lightbox[416]"><img class="aligncenter size-full wp-image-421" title="tableview_inside_view_2" src="http://hugolarcher.com/wp-content/uploads/2012/01/tableview_inside_view_2.png" alt="Connections Inspector" width="259" height="172" /></a></p>
<p><a href="http://hugolarcher.com/wp-content/uploads/2012/01/tableview_inside_view_3.png" rel="lightbox[416]"><img class="aligncenter size-full wp-image-422" title="tableview_inside_view_3" src="http://hugolarcher.com/wp-content/uploads/2012/01/tableview_inside_view_3.png" alt="" width="245" height="101" /></a></p>
<p>That&#8217;s it, you might want to customize your TableView, its cells and put in the other elements into the view now, have fun with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://hugolarcher.com/2012/01/21/adding-a-tableview-to-a-view-in-xcode-4-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Happy Birthday JetBus!</title>
		<link>http://hugolarcher.com/2011/11/23/happy-birthday-jetbus/</link>
		<comments>http://hugolarcher.com/2011/11/23/happy-birthday-jetbus/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 21:28:37 +0000</pubDate>
		<dc:creator>hlarcher</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Monetization]]></category>
		<category><![CDATA[Postmortem]]></category>
		<category><![CDATA[JetBus]]></category>
		<category><![CDATA[mortem]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[Sponsor]]></category>
		<category><![CDATA[statistics]]></category>

		<guid isPermaLink="false">http://hugolarcher.com/?p=394</guid>
		<description><![CDATA[<p>Exactly one year ago today RedBandana took the first step into the world of casual games by releasing its first game JetBus.</p><p>As I've wrote before, JetBus was not meant to be a big hit that pleased the masses, it was an experiment with clear goals which I think were achieved and hopefully 1 year later now we are ready to continue this path and make a few more games but here's some details of how the experiment went.</p><p><a href="http://hugolarcher.com/?p=394">Read the Rest...</a></p>]]></description>
			<content:encoded><![CDATA[<p>Exactly one year ago today RedBandana took the first step into the world of casual games by releasing its first game JetBus. Few are the kids who didn&#8217;t dream at some point in time to program and design their own game, at least the ones that grew up in last few decades, starting with the &#8220;spectrum&#8221; generation. Me and my good friend Marco just so happen to be from that same generation and both being programmers it seemed silly we didn&#8217;t use our skills to make a game before, we did try a few years ago in basic but never finished, JetBus was the culmination of that dream and the start of a &#8220;hobby&#8221; we wish to carry on.</p>
<p>As I&#8217;ve wrote before, JetBus was not meant to be a big hit that pleased the masses, it was an experiment with clear goals which I think were achieved and hopefully 1 year later now we are ready to continue this path and make a few more games (in fact we are already working on a couple).</p>
<h3>Goals</h3>
<p>These were the 4 topics we wanted to learn about and the true purpose of JetBus:</p>
<ol>
<li>Can we make a Flash game? Not saying technically, but can we come up with a concept and theme and take it from start to finish going through the entire process and applying the little knowledge we have about game design (not design as in graphics but design as a whole).</li>
<li>How to make an engine for our games? We started from 0, read a LOT, ran hundreds of tests, wrote and rewrote code and came up with the first version of our engine, since then we already improved it a lot but all of this was only possible because we had a game to use as a “lab rat”.</li>
<li>Can we monetize a Flash game? This was a big question mark for us, we had no idea how to monetize a game, if it would get a sponsor, if ads are a good income or not etc. So far we haven’t even scratch the surface of this complex part of the process but at least we have a case study to reflect upon and draw conclusions.</li>
<li>Can we get our brand out there? Even though this was at the bottom of our priorities (this is obvious since we don’t even have a good website yet) it turned out to be surprisingly important for us to get people on our website after we saw the number of visits.</li>
</ol>
<h3>The process</h3>
<p>This was the best part, everything from reading a lot on the theory to debating bits and pieces of the concept and stuff like recording the sounds (which was hilarious), even the frustrating days when everything was falling apart are now a joy to remember. It took much longer to develop then we ever wished mostly because we worked on it just on weekends and had to stop lots of times because of &#8220;client work&#8221;, I really don&#8217;t want to see that happening again and that is why I&#8217;m going to take part of our schedule and dedicate it religiously to RedBandana every week.</p>
<h3>The feedback</h3>
<p>People&#8217;s response to JetBus was not perfect, I won&#8217;t lie, but it was good enough once we filtered the normal comments from the silly ones. At first the absurd comments were demoralizing but once we realized we can&#8217;t please everyone and there will always be some people without a sense of humor or the motor skills to play a game based on skill they stopped affecting us. It was great to see comments from people who got the message we were trying to get across and totally understood the concept and even recognized the inspiration from which we made the game.</p>
<p>JetBus did modestly in terms of rating on most portals and that&#8217;s more then we could ask for from this particular game, we knew it wasn&#8217;t a physics game you could play with 1 click and have heads coming off in a firework of blood and guts, we didn&#8217;t care about nailing &#8220;the formula&#8221; for success in this project, we were still missing other basic knowledge we had to pick up.</p>
<h3>Some statistics</h3>
<p>Here are some statistics if you&#8217;re curious:</p>
<h5>Overview</h5>
<ul>
<li>5,437,002 <span class="darkgreen">views</span></li>
<li>3,526,580 <span class="darkgreen">plays</span></li>
<li>4:10 <span class="darkgreen">av. play time</span></li>
</ul>
<p>I&#8217;m not an expert and this was our first game so I don&#8217;t have a clue if this is good or not, for me it&#8217;s surprising for sure.</p>
<h5>Sources</h5>
<table cellspacing="1">
<thead>
<tr>
<th></th>
<th>Views</th>
<th>Plays</th>
<th>Time</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">1st &#8211; 4399.com</td>
<td>2,217,375 / <span class="darkgreen">40.8%</span></td>
<td>1,405,397 / <span class="darkgreen">39.8%</span></td>
<td>3:38</td>
</tr>
<tr class="odd">
<td align="left">2nd &#8211; 7k7k.com</td>
<td>1,361,256 / <span class="darkgreen">25.0%</span></td>
<td>868,166 / <span class="darkgreen">24.6%</span></td>
<td>4:00</td>
</tr>
<tr>
<td align="left">3rd &#8211; 3366.com</td>
<td>496,645 / <span class="darkgreen">9.1%</span></td>
<td>270,791 / <span class="darkgreen">7.7%</span></td>
<td>3:42</td>
</tr>
<tr class="odd">
<td align="left">4th &#8211; ArmorGames.com</td>
<td>230,407 / <span class="darkgreen">4.2%</span></td>
<td>177,970 / <span class="darkgreen">5.0%</span></td>
<td>6:46</td>
</tr>
<tr>
<td align="left">5th &#8211; TeaGames.com</td>
<td>109,703 / <span class="darkgreen">2.0%</span></td>
<td>81,878 / <span class="darkgreen">2.3%</span></td>
<td>8:21</td>
</tr>
<tr class="odd">
<td align="left">6th &#8211; JuegosDiarios.com</td>
<td>58,803 / <span class="darkgreen">1.1%</span></td>
<td>47,260 / <span class="darkgreen">1.3%</span></td>
<td>8:55</td>
</tr>
<tr>
<td align="left">7th &#8211; Bored.com</td>
<td>57,039 / <span class="darkgreen">1.0%</span></td>
<td>46,644 / <span class="darkgreen">1.3%</span></td>
<td>8:13</td>
</tr>
<tr class="odd">
<td>&#8230;</td>
<td>&#8230;</td>
<td>&#8230;</td>
<td>&#8230;</td>
</tr>
<tr>
<td align="left">11th &#8211; GameGecko.com</td>
<td>22,249 / <span class="darkgreen">0.4%</span></td>
<td>15,711 / <span class="darkgreen">0.4%</span></td>
<td>8:50</td>
</tr>
<tr class="odd">
<td align="left">12th &#8211; RedBandana.com</td>
<td>20,014 / <span class="darkgreen">0.4%</span></td>
<td>15,533 / <span class="darkgreen">0.4%</span></td>
<td>3:56</td>
</tr>
</tbody>
</table>
<p>Approximately 75% of the views and plays came from 3 chinese portals which is not surprising, and then comes the sponsor and the non-exclusive license buyers plus our own website. There&#8217;s around 400 more sources but there&#8217;s no point listing them all.</p>
<h5>Screens</h5>
<table cellspacing="1">
<thead>
<tr>
<th></th>
<th>Visits</th>
<th>Daily Average</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">1st &#8211; Garage (upgrades)</td>
<td>1,456,945</td>
<td>3,981</td>
</tr>
<tr class="odd">
<td align="left">2nd &#8211; Help (instructions)</td>
<td>937,692</td>
<td>2,562</td>
</tr>
</tbody>
</table>
<p>It&#8217;s nice to see that if there were really 3,5m plays almost half of those involved going to the upgrade area, there was some engagement there.</p>
<h5>Vehicles</h5>
<table cellspacing="1">
<thead>
<tr>
<th></th>
<th>Aquisitions</th>
<th>Daily Average</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">1st &#8211; Time Machine (from rare powerup)</td>
<td>18,762</td>
<td>51</td>
</tr>
<tr class="odd">
<td align="left">2nd &#8211; Army Truck (from finishing easy mode)</td>
<td>9,559</td>
<td>26</td>
</tr>
<tr>
<td align="left">3rd &#8211; Sports Car (from finishing normal mode)</td>
<td>2,027</td>
<td>6</td>
</tr>
<tr class="odd">
<td align="left">4th &#8211; 4&#215;4 (from finishing hard mode)</td>
<td>271</td>
<td>1</td>
</tr>
</tbody>
</table>
<p>Obviously this didn&#8217;t go quite as planned, the Time Machine was supposed to be rare but I guess 1/1000 drop rate is not that low&#8230; unfortunately there was way less people completing all levels.</p>
<h5>Upgrades</h5>
<table cellspacing="1">
<thead>
<tr>
<th></th>
<th>Buys</th>
<th>Daily Average</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">1st &#8211; Jets (more thrust)</td>
<td>26,691</td>
<td>74</td>
</tr>
<tr class="odd">
<td align="left">2nd &#8211; Hull (more resistance)</td>
<td>22,859</td>
<td>62</td>
</tr>
<tr>
<td align="left">3rd &#8211; Dampners (less affected by forces)</td>
<td>22,162</td>
<td>59</td>
</tr>
</tbody>
</table>
<p>I am very happy to see these numbers, it means people were interested in the upgrades and tried them evenly.</p>
<h5>Consumables</h5>
<table cellspacing="1">
<thead>
<tr>
<th></th>
<th>Buys</th>
<th>Daily Average</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">1st &#8211; Brakes</td>
<td>183,814</td>
<td>502</td>
</tr>
<tr class="odd">
<td align="left">2nd &#8211; Nitros</td>
<td>172,864</td>
<td>471</td>
</tr>
</tbody>
</table>
<p>Apparently people liked the consumables.</p>
<h5>Links</h5>
<table cellspacing="1">
<thead>
<tr>
<th></th>
<th>URL</th>
<th>Placement</th>
<th>Clicks</th>
<th>Daily Average</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">1st &#8211; RedBandana</td>
<td>red-bandana.com</td>
<td>Intro animation</td>
<td>2,269,576</td>
<td>6,201</td>
</tr>
<tr class="odd">
<td align="left">2nd &#8211; TeaGames</td>
<td>teagames.com</td>
<td>Intro animation</td>
<td>519,711</td>
<td>1,420</td>
</tr>
<tr>
<td align="left">3rd &#8211; TeaGames</td>
<td>teagames.com</td>
<td>Exclusive vehicle</td>
<td>365,616</td>
<td>999</td>
</tr>
<tr class="odd">
<td align="left">4th &#8211; TeaGames</td>
<td>teagames.com</td>
<td>Exclusive levels</td>
<td>136,355</td>
<td>373</td>
</tr>
<tr>
<td align="left">5th &#8211; TeaGames</td>
<td>teagames.com</td>
<td>More games button</td>
<td>14,997</td>
<td>41</td>
</tr>
<tr class="odd">
<td align="left">6th &#8211; TeaGames</td>
<td>teagames.com</td>
<td>Main menu corner logo</td>
<td>10,548</td>
<td>29</td>
</tr>
</tbody>
</table>
<p>Not going into detail on other links since non-exclusive versions are only hosted on the portals that buy them and the links to themselves are of no importance to the statistics unless it is to see how many people that are at armorgames.com click on a link to armorgames.com for example.</p>
<h3>The earnings</h3>
<h5 style="text-align:center;">Total Revenue Distribution</h5>
<p><a href="http://hugolarcher.com/wp-content/uploads/2011/11/jetbus_revenue.png" rel="lightbox[394]"><img src="http://hugolarcher.com/wp-content/uploads/2011/11/jetbus_revenue.png" alt="JetBus Revenue Distribution" title="jetbus_revenue" width="400" height="200" class="aligncenter size-full wp-image-406" /></a></p>
<h5 style="text-align:center;">Ad Revenue Distribution</h5>
<p><a href="http://hugolarcher.com/wp-content/uploads/2011/11/jetbus_ads.png" rel="lightbox[394]"><img src="http://hugolarcher.com/wp-content/uploads/2011/11/jetbus_ads.png" alt="JetBus Ads Revenue Distribution" title="jetbus_ads" width="400" height="200" class="aligncenter size-full wp-image-407" /></a></p>
<h3>Conclusion</h3>
<p>JetBus was probably one of the most fun projects I&#8217;ve ever worked on and taking the decision to make it was 100% right, I&#8217;m extremely happy I did. I wouldn&#8217;t have wanted it any other way and now I&#8217;ve had people pose the question &#8220;why not jump into iOs stuff?&#8221; Well, I probably will but not just yet because JetBus was such a great experience that I would be stupid not to follow up on it at least with a couple more projects and even though people say Flash is dead I think that the iPhone/iPad and all mobile market changes so rapidly it might be even more volatile to dedicate myself to that then to Flash games. I think a lot can change over night in the mobile business but meanwhile the Flash game portals will be around and have visits. I can be way off and maybe this is something I will laugh at in the future but it is just the way I feel even though I love my iOs devices.</p>
<p>And last but not least, a sequel? Not sure, I want to but only time will tell.</p>
<p>Thanks to everyone that played the game and gave their support and feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://hugolarcher.com/2011/11/23/happy-birthday-jetbus/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flex Multiple Select List with FloatLayout</title>
		<link>http://hugolarcher.com/2011/10/28/flex-list-with-floatlayout/</link>
		<comments>http://hugolarcher.com/2011/10/28/flex-list-with-floatlayout/#comments</comments>
		<pubDate>Fri, 28 Oct 2011 13:14:41 +0000</pubDate>
		<dc:creator>hlarcher</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Float]]></category>
		<category><![CDATA[Flow]]></category>
		<category><![CDATA[Layout]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[Toggle]]></category>

		<guid isPermaLink="false">http://hugolarcher.com/?p=382</guid>
		<description><![CDATA[I thought I'd share a couple small classes that I had to put together recently for a project.

The goal was to create a list of toggle buttons but that would be laid side by side and then wrap at the end of the line. This allows for a really nice multiple selection component in contrast with having just a long list of checkboxes.

<a href="http://hugolarcher.com/?p=382">Read the Rest...</a>]]></description>
			<content:encoded><![CDATA[<p>I thought I&#8217;d share a couple small classes that I had to put together recently for a project.</p>
<p>The goal was to create a list of toggle buttons but that would be laid side by side and then wrap at the end of the line. This allows for a really nice multiple selection component in contrast with having just a long list of checkboxes.</p>
<p>We extending the Spark List component by creating the following class:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> controls <span style="color: #000000;">&#123;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> layouts<span style="color: #000066; font-weight: bold;">.</span>FloatLayout<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MouseEvent</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>core<span style="color: #000066; font-weight: bold;">.</span>IVisualElement<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> spark<span style="color: #000066; font-weight: bold;">.</span>components<span style="color: #000066; font-weight: bold;">.</span>IItemRenderer<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> spark<span style="color: #000066; font-weight: bold;">.</span>components<span style="color: #000066; font-weight: bold;">.</span>List<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> ToggleList <span style="color: #0033ff; font-weight: bold;">extends</span> List <span style="color: #000000;">&#123;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> itemColors<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = <span style="color: #000000;">&#91;</span>0xcccccc<span style="color: #000066; font-weight: bold;">,</span> 0x555555<span style="color: #000066; font-weight: bold;">,</span> 0x000000<span style="color: #000066; font-weight: bold;">,</span> 0x000000<span style="color: #000066; font-weight: bold;">,</span> 0x000000<span style="color: #000066; font-weight: bold;">,</span> 0xffffff<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> ToggleList <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #004993;">setStyle</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">'borderVisible'</span><span style="color: #000066; font-weight: bold;">,</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: #004993;">setStyle</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">'contentBackgroundAlpha'</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			minHeight = <span style="color: #000000; font-weight:bold;">20</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			allowMultipleSelection = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">// layout</span>
			layout = <span style="color: #0033ff; font-weight: bold;">new</span> FloatLayout<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#40;</span>layout <span style="color: #0033ff; font-weight: bold;">as</span> FloatLayout<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>horizontalGap = <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#40;</span>layout <span style="color: #0033ff; font-weight: bold;">as</span> FloatLayout<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>verticalGap = <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
		<span style="color: #009900; font-style: italic;">//  dragEnabled</span>
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
&nbsp;
		override <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> dragEnabled <span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Boolean</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><span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
		<span style="color: #009900; font-style: italic;">//  dragMoveEnabled</span>
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
&nbsp;
		override <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> dragMoveEnabled <span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Boolean</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><span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
		<span style="color: #009900; font-style: italic;">//  dropEnabled</span>
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
&nbsp;
		override <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> dropEnabled <span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Boolean</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><span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
		<span style="color: #009900; font-style: italic;">//  hasValue</span>
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">get</span> hasValue <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> v<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #000000;">&#40;</span>selectedIndices<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span> <span style="color: #000066; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">?</span> <span style="color: #990000;">'yes'</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #0033ff; font-weight: bold;">undefined</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #0033ff; font-weight: bold;">return</span> v<span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
		<span style="color: #009900; font-style: italic;">//  selectedIndices</span>
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _maxSelectedIndices<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">uint</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">get</span> maxSelectedIndices <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">uint</span> <span style="color: #000000;">&#123;</span>
			<span style="color: #0033ff; font-weight: bold;">return</span> _maxSelectedIndices<span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> maxSelectedIndices <span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">uint</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>
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span> == _maxSelectedIndices<span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">return</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span> == <span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				allowMultipleSelection = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
			_maxSelectedIndices = <span style="color: #004993;">value</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
		<span style="color: #009900; font-style: italic;">//  handlers</span>
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
&nbsp;
		override <span style="color: #0033ff; font-weight: bold;">protected</span> <span style="color: #339966; font-weight: bold;">function</span> item_mouseDownHandler <span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">MouseEvent</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>
			event<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ctrlKey</span> = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>_maxSelectedIndices == <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000066; font-weight: bold;">.</span>item_mouseDownHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span>
				<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>selectedIndices<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span> <span style="color: #000066; font-weight: bold;">&lt;</span> _maxSelectedIndices<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
					<span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000066; font-weight: bold;">.</span>item_mouseDownHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span>
					<span style="color: #6699cc; font-weight: bold;">var</span> newIndex<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span><span style="color: #000066; font-weight: bold;">;</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><span style="color: #004993;">currentTarget</span> <span style="color: #0033ff; font-weight: bold;">is</span> IItemRenderer<span style="color: #000000;">&#41;</span> newIndex = IItemRenderer<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">currentTarget</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>itemIndex<span style="color: #000066; font-weight: bold;">;</span>
					<span style="color: #0033ff; font-weight: bold;">else</span> newIndex = dataGroup<span style="color: #000066; font-weight: bold;">.</span>getElementIndex<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">currentTarget</span> <span style="color: #0033ff; font-weight: bold;">as</span> IVisualElement<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
					<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>allowMultipleSelection <span style="color: #000066; font-weight: bold;">&amp;&amp;</span> <span style="color: #000000;">&#40;</span>selectedIndices <span style="color: #000066; font-weight: bold;">!</span>= <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000000;">&#41;</span><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>selectedIndices<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">indexOf</span><span style="color: #000000;">&#40;</span>newIndex<span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">!</span>= <span style="color: #000066; font-weight: bold;">-</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000066; font-weight: bold;">.</span>item_mouseDownHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
					<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span>
						<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>newIndex == selectedIndex<span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">super</span><span style="color: #000066; font-weight: bold;">.</span>item_mouseDownHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
					<span style="color: #000000;">&#125;</span>
				<span style="color: #000000;">&#125;</span>
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>As you can see there&#8217;s not much going on here except that we&#8217;re initializing the component with allowMultipleSelection and we&#8217;re setting its layout to be of type FloatLayout. Apart from that I&#8217;ve also added a function called hasValue which we can use with validators.</p>
<p>For this ToggleList component we will use the following custom ItemRenderer:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;s:ItemRenderer</span> xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">				xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">				xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span> </span>
<span style="color: #000000;">				minWidth=<span style="color: #ff0000;">&quot;20&quot;</span> minHeight=<span style="color: #ff0000;">&quot;20&quot;</span> </span>
<span style="color: #000000;">				autoDrawBackground=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;">&lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span></span>
&nbsp;
<span style="color: #000000;">			private var _data:XML;</span>
&nbsp;
<span style="color: #000000;">			<span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span> private var _normalColor:Number = 0xcccccc;</span>
<span style="color: #000000;">			<span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span> private var _hoveredColor:Number = 0x555555;</span>
<span style="color: #000000;">			<span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span> private var _selectedColor:Number = 0x000000;</span>
<span style="color: #000000;">			<span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span> private var _textColor:Number = 0x000000;</span>
<span style="color: #000000;">			<span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span> private var _textColorHovered:Number = 0x000000;</span>
<span style="color: #000000;">			<span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span> private var _textColorSelected:Number = 0xffffff;</span>
&nbsp;
<span style="color: #000000;">			<span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span> private var _label:String;</span>
&nbsp;
<span style="color: #000000;">			override public function set data <span style="color: #66cc66;">&#40;</span>value:Object<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">				super.data = value;</span>
&nbsp;
<span style="color: #000000;">				if <span style="color: #66cc66;">&#40;</span>super.data<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">					if <span style="color: #66cc66;">&#40;</span>ToggleList<span style="color: #66cc66;">&#40;</span>owner<span style="color: #66cc66;">&#41;</span>.itemColors.length == <span style="color: #cc66cc;">6</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">						_normalColor = ToggleList<span style="color: #66cc66;">&#40;</span>owner<span style="color: #66cc66;">&#41;</span>.itemColors<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>;</span>
<span style="color: #000000;">						_hoveredColor = ToggleList<span style="color: #66cc66;">&#40;</span>owner<span style="color: #66cc66;">&#41;</span>.itemColors<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#93;</span>;</span>
<span style="color: #000000;">						_selectedColor = ToggleList<span style="color: #66cc66;">&#40;</span>owner<span style="color: #66cc66;">&#41;</span>.itemColors<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#93;</span>;</span>
<span style="color: #000000;">						_textColor = ToggleList<span style="color: #66cc66;">&#40;</span>owner<span style="color: #66cc66;">&#41;</span>.itemColors<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#93;</span>;</span>
<span style="color: #000000;">						_textColorHovered = ToggleList<span style="color: #66cc66;">&#40;</span>owner<span style="color: #66cc66;">&#41;</span>.itemColors<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#93;</span>;</span>
<span style="color: #000000;">						_textColorSelected = ToggleList<span style="color: #66cc66;">&#40;</span>owner<span style="color: #66cc66;">&#41;</span>.itemColors<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #66cc66;">&#93;</span>;</span>
<span style="color: #000000;">					<span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">					_data = value as XML;</span>
<span style="color: #000000;">					if <span style="color: #66cc66;">&#40;</span>_data &amp;&amp; _data.hasSimpleContent<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> _label = _data.@label;</span>
<span style="color: #000000;">				<span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">			<span style="color: #66cc66;">&#125;</span></span>
&nbsp;
<span style="color: #000000;">			override protected function updateDisplayList <span style="color: #66cc66;">&#40;</span>unscaledWidth:Number, unscaledHeight:Number<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">				super.updateDisplayList<span style="color: #66cc66;">&#40;</span>unscaledWidth, unscaledHeight<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">			<span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">		<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:states</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;normal&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>            
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;hovered&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;selected&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:states</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- border --&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Rect</span> id=<span style="color: #ff0000;">&quot;border&quot;</span> left=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<span style="color: #ff0000;">&quot;0&quot;</span> visible=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:stroke</span><span style="color: #7400FF;">&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SolidColorStroke</span> id=<span style="color: #ff0000;">&quot;borderStroke&quot;</span> color=<span style="color: #ff0000;">&quot;0x000000&quot;</span> weight=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #7400FF;">/&gt;</span></span>            
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:stroke</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Rect</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- fill --&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Rect</span> id=<span style="color: #ff0000;">&quot;background&quot;</span> left=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:fill</span><span style="color: #7400FF;">&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SolidColor</span> id=<span style="color: #ff0000;">&quot;bgFill&quot;</span> color=<span style="color: #ff0000;">&quot;{_normalColor}&quot;</span> color.hovered=<span style="color: #ff0000;">&quot;{_hoveredColor}&quot;</span> color.selected=<span style="color: #ff0000;">&quot;{_selectedColor}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:fill</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Rect</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> top=<span style="color: #ff0000;">&quot;1&quot;</span> bottom=<span style="color: #ff0000;">&quot;0&quot;</span> left=<span style="color: #ff0000;">&quot;5&quot;</span> right=<span style="color: #ff0000;">&quot;5&quot;</span></span>
<span style="color: #000000;">			 textAlign=<span style="color: #ff0000;">&quot;center&quot;</span> verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span> </span>
<span style="color: #000000;">			 color=<span style="color: #ff0000;">&quot;{_textColor}&quot;</span> color.hovered=<span style="color: #ff0000;">&quot;{_textColorHovered}&quot;</span> color.selected=<span style="color: #ff0000;">&quot;{_textColorSelected}&quot;</span> text=<span style="color: #ff0000;">&quot;{_label}&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:ItemRenderer</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>The ToggleListItemRenderer is very simple. It has some colors that can be customized if you want and assumes you&#8217;re using xml as the List&#8217;s DataProvider but you can change it to fit your needs, what&#8217;s important is that you can toggle it.</p>
<p>Now, the FloatLayout class:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> layouts <span style="color: #000000;">&#123;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>core<span style="color: #000066; font-weight: bold;">.</span>ILayoutElement<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>core<span style="color: #000066; font-weight: bold;">.</span>IVisualElement<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">import</span> spark<span style="color: #000066; font-weight: bold;">.</span>components<span style="color: #000066; font-weight: bold;">.</span>supportClasses<span style="color: #000066; font-weight: bold;">.</span>GroupBase<span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> spark<span style="color: #000066; font-weight: bold;">.</span>layouts<span style="color: #000066; font-weight: bold;">.</span>supportClasses<span style="color: #000066; font-weight: bold;">.</span>LayoutBase<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #9900cc; font-weight: bold;">class</span> FloatLayout <span style="color: #0033ff; font-weight: bold;">extends</span> LayoutBase <span style="color: #000000;">&#123;</span>
&nbsp;
		<span style="color: #009966; font-style: italic;">/** @private */</span> <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _padding<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #009966; font-style: italic;">/** @private */</span> <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _horizontalGap<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #009966; font-style: italic;">/** @private */</span> <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _verticalGap<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #009966; font-style: italic;">/** @private */</span> <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _rowCount<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #009966; font-style: italic;">/** @private */</span> <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _elementCount<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #009966; font-style: italic;">/** @private */</span> <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _width<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #009966; font-style: italic;">/** @private */</span> <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> _height<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
		<span style="color: #009900; font-style: italic;">//  padding</span>
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> padding <span style="color: #000000;">&#40;</span>val<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</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>
			_padding = val<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> layoutTarget<span style="color: #000066; font-weight: bold;">:</span>GroupBase = <span style="color: #004993;">target</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>layoutTarget<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				layoutTarget<span style="color: #000066; font-weight: bold;">.</span>invalidateDisplayList<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
		<span style="color: #009900; font-style: italic;">//  horizontalGap</span>
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> horizontalGap <span style="color: #000000;">&#40;</span>val<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</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>
			_horizontalGap = val<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> layoutTarget<span style="color: #000066; font-weight: bold;">:</span>GroupBase = <span style="color: #004993;">target</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>layoutTarget<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				layoutTarget<span style="color: #000066; font-weight: bold;">.</span>invalidateDisplayList<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
		<span style="color: #009900; font-style: italic;">//  verticalGap</span>
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
&nbsp;
		<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">set</span> verticalGap <span style="color: #000000;">&#40;</span>val<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</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>
			_verticalGap = val<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> layoutTarget<span style="color: #000066; font-weight: bold;">:</span>GroupBase = <span style="color: #004993;">target</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>layoutTarget<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				layoutTarget<span style="color: #000066; font-weight: bold;">.</span>invalidateDisplayList<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #000000;">&#125;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
		<span style="color: #009900; font-style: italic;">//  overrides</span>
		<span style="color: #009900; font-style: italic;">//----------------------------------</span>
&nbsp;
		override <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> updateDisplayList <span style="color: #000000;">&#40;</span>containerWidth<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span><span style="color: #000066; font-weight: bold;">,</span> containerHeight<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</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>
			<span style="color: #6699cc; font-weight: bold;">var</span> layoutTarget<span style="color: #000066; font-weight: bold;">:</span>GroupBase = <span style="color: #004993;">target</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000066; font-weight: bold;">!</span>layoutTarget<span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">return</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #6699cc; font-weight: bold;">var</span> xPos<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = _padding<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> yPos<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = _padding<span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> maxWidth<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> maxHeight<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> rowMaxHeight<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">// loop through all the elements</span>
			<span style="color: #6699cc; font-weight: bold;">var</span> count<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = layoutTarget<span style="color: #000066; font-weight: bold;">.</span>numElements<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			_rowCount = <span style="color: #000000;">&#40;</span>count <span style="color: #000066; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000066; font-weight: bold;">?</span> <span style="color: #000000; font-weight:bold;">1</span> <span style="color: #000066; font-weight: bold;">:</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
			_elementCount = count<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span> = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span> count<span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
				<span style="color: #6699cc; font-weight: bold;">var</span> element<span style="color: #000066; font-weight: bold;">:</span>ILayoutElement = <span style="color: #0033ff; font-weight: bold;">null</span><span style="color: #000066; font-weight: bold;">;</span> 
				<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>useVirtualLayout<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
					element = layoutTarget<span style="color: #000066; font-weight: bold;">.</span>getVirtualElementAt<span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
					<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>element <span style="color: #0033ff; font-weight: bold;">is</span> IVisualElement<span style="color: #000000;">&#41;</span> IVisualElement<span style="color: #000000;">&#40;</span>element<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">visible</span> = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span> 
				<span style="color: #000000;">&#125;</span> <span style="color: #0033ff; font-weight: bold;">else</span> <span style="color: #000000;">&#123;</span>
					element = layoutTarget<span style="color: #000066; font-weight: bold;">.</span>getElementAt<span style="color: #000000;">&#40;</span>i<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #000000;">&#125;</span>
				<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span><span style="color: #000066; font-weight: bold;">!</span>element <span style="color: #000066; font-weight: bold;">||</span> <span style="color: #000066; font-weight: bold;">!</span>element<span style="color: #000066; font-weight: bold;">.</span>includeInLayout<span style="color: #000000;">&#41;</span> <span style="color: #0033ff; font-weight: bold;">continue</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
				<span style="color: #009900; font-style: italic;">// resize the element to its preferred size</span>
				element<span style="color: #000066; font-weight: bold;">.</span>setLayoutBoundsSize<span style="color: #000000;">&#40;</span><span style="color: #004993;">NaN</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">NaN</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #6699cc; font-weight: bold;">var</span> elementWidth<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = element<span style="color: #000066; font-weight: bold;">.</span>getLayoutBoundsWidth<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #6699cc; font-weight: bold;">var</span> elementHeight<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Number</span> = element<span style="color: #000066; font-weight: bold;">.</span>getLayoutBoundsHeight<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
				<span style="color: #009900; font-style: italic;">// doesn't fit, move to next line</span>
				<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>xPos <span style="color: #000066; font-weight: bold;">+</span> elementWidth <span style="color: #000066; font-weight: bold;">+</span> _padding <span style="color: #000066; font-weight: bold;">&gt;</span> containerWidth<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
					_rowCount<span style="color: #000066; font-weight: bold;">++;</span>
					xPos = _padding<span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">// reset the x value</span>
&nbsp;
					<span style="color: #009900; font-style: italic;">// move to the next line and add the gap, but not if it's the first element</span>
					<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>i <span style="color: #000066; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
						yPos <span style="color: #000066; font-weight: bold;">+</span>= rowMaxHeight <span style="color: #000066; font-weight: bold;">+</span> _verticalGap<span style="color: #000066; font-weight: bold;">;</span>
						rowMaxHeight = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #009900; font-style: italic;">// new row, so reset max height of this row</span>
					<span style="color: #000000;">&#125;</span>
				<span style="color: #000000;">&#125;</span>
&nbsp;
				<span style="color: #009900; font-style: italic;">// position the element</span>
				element<span style="color: #000066; font-weight: bold;">.</span>setLayoutBoundsPosition<span style="color: #000000;">&#40;</span>xPos<span style="color: #000066; font-weight: bold;">,</span> yPos<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
				<span style="color: #009900; font-style: italic;">// update max dimensions (needed for scrolling)</span>
				maxWidth = <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">max</span><span style="color: #000000;">&#40;</span>maxWidth<span style="color: #000066; font-weight: bold;">,</span> xPos <span style="color: #000066; font-weight: bold;">+</span> elementWidth<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				maxHeight = <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">max</span><span style="color: #000000;">&#40;</span>maxHeight<span style="color: #000066; font-weight: bold;">,</span> yPos <span style="color: #000066; font-weight: bold;">+</span> elementHeight<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
				<span style="color: #009900; font-style: italic;">// update the current pos, and add the gap</span>
				xPos <span style="color: #000066; font-weight: bold;">+</span>= elementWidth <span style="color: #000066; font-weight: bold;">+</span> _horizontalGap<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
				<span style="color: #009900; font-style: italic;">// update the max height of current row as necessary</span>
				<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>elementHeight <span style="color: #000066; font-weight: bold;">&gt;</span> rowMaxHeight<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
					rowMaxHeight = elementHeight<span style="color: #000066; font-weight: bold;">;</span>
				<span style="color: #000000;">&#125;</span>
			<span style="color: #000000;">&#125;</span>
&nbsp;
			_width = <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ceil</span><span style="color: #000000;">&#40;</span>maxWidth <span style="color: #000066; font-weight: bold;">+</span> _padding<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
			_height = <span style="color: #004993;">Math</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">ceil</span><span style="color: #000000;">&#40;</span>maxHeight <span style="color: #000066; font-weight: bold;">+</span> _padding<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">// make the list the same size as the content</span>
			clipAndEnableScrolling = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span>
			layoutTarget<span style="color: #000066; font-weight: bold;">.</span>measuredHeight = _height<span style="color: #000066; font-weight: bold;">;</span>
			layoutTarget<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span> = _height
&nbsp;
			updateScrollRect<span style="color: #000000;">&#40;</span>_width<span style="color: #000066; font-weight: bold;">,</span> _height<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">// set final content size (needed for scrolling)</span>
			layoutTarget<span style="color: #000066; font-weight: bold;">.</span>setContentSize<span style="color: #000000;">&#40;</span>_width<span style="color: #000066; font-weight: bold;">,</span> _height<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
		<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>The hard part, for some reason, was getting the list&#8217;s content height to be set to the layout&#8217;s height, sometimes it failed but with the code in the last lines I was able to do it and haven&#8217;t seen it fail yet. Maybe someone can improve on it.</p>
<p>The end result should look something like this:</p>
<p><a href="http://hugolarcher.com/wp-content/uploads/2011/10/Screen-Shot-2011-10-28-at-2.10.27-PM.png" rel="lightbox[382]"><img src="http://hugolarcher.com/wp-content/uploads/2011/10/Screen-Shot-2011-10-28-at-2.10.27-PM.png" alt="Multiple Select List" title="Multiple Select List" width="530" height="256" class="aligncenter size-full wp-image-386" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://hugolarcher.com/2011/10/28/flex-list-with-floatlayout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Validate CheckBox and ComboBox in Flex</title>
		<link>http://hugolarcher.com/2011/03/18/validate-checkbox-in-flex/</link>
		<comments>http://hugolarcher.com/2011/03/18/validate-checkbox-in-flex/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 11:15:27 +0000</pubDate>
		<dc:creator>hlarcher</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[CheckBox]]></category>
		<category><![CDATA[ComboBox]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[Form]]></category>
		<category><![CDATA[NumberValidator]]></category>
		<category><![CDATA[Validator]]></category>

		<guid isPermaLink="false">http://hugolarcher.com/?p=360</guid>
		<description><![CDATA[One of these days I had to create a a dynamic form and validate some of its fields which could be TextInput, TextArea, CheckBox or ComboBox and I thought of using Validators do accomplish this but although for TextInput and TextArea you can easily just use the StringValidator for CheckBox and ComboBox is not so easy to choose which one to use.

<a href="http://hugolarcher.com/?p=360">Read the Rest...</a>]]></description>
			<content:encoded><![CDATA[<p>One of these days I had to create a a dynamic form and validate some of its fields which could be TextInput, TextArea, CheckBox or ComboBox and I thought of using Validators do accomplish this but although for TextInput and TextArea you can easily just use the StringValidator for CheckBox and ComboBox is not so easy to choose which one to use.</p>
<h3>CheckBox</h3>
<p>First I thought of creating a BooleanValidator that extended Validator so I could use it on CheckBoxes but I couldn&#8217;t get it to display the red border around the CheckBox when its invalid so I came up with a simple way of doing it. I just used a StringValidator that checks the maxLength property like this:</p>
<p>in MXML:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Array</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:StringValidator</span> id=<span style="color: #ff0000;">&quot;checkboxValidator&quot;</span> source=<span style="color: #ff0000;">&quot;{myCheckboxId}&quot;</span> property=<span style="color: #ff0000;">&quot;selected&quot;</span> maxLength=<span style="color: #ff0000;">&quot;4&quot;</span> tooLongError=<span style="color: #ff0000;">&quot;Please check it!&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Array</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>or AS3:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> validators<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Array</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #009900; font-style: italic;">// when adding the validators</span>
<span style="color: #6699cc; font-weight: bold;">var</span> checkboxValidator<span style="color: #000066; font-weight: bold;">:</span>StringValidator = <span style="color: #0033ff; font-weight: bold;">new</span> StringValidator<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
checkboxValidator<span style="color: #000066; font-weight: bold;">.</span>property = <span style="color: #990000;">'selected'</span><span style="color: #000066; font-weight: bold;">;</span>
checkboxValidator<span style="color: #000066; font-weight: bold;">.</span>maxLength = <span style="color: #000000; font-weight:bold;">4</span><span style="color: #000066; font-weight: bold;">;</span>
checkboxValidator<span style="color: #000066; font-weight: bold;">.</span>tooLongError = <span style="color: #990000;">'Please check it!'</span><span style="color: #000066; font-weight: bold;">;</span>
checkboxValidator<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">source</span> = myCheckboxId<span style="color: #000066; font-weight: bold;">;</span>
validators<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span>checkboxValidator<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #009900; font-style: italic;">// and when validating on submit</span>
<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span> validators<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> src<span style="color: #000066; font-weight: bold;">:</span>UIComponent = validators<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">source</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>src <span style="color: #0033ff; font-weight: bold;">is</span> CheckBox<span style="color: #000000;">&#41;</span> validator<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span>validate<span style="color: #000000;">&#40;</span>CheckBox<span style="color: #000000;">&#40;</span>validators<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">source</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>selected<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Since the value of the &#8220;selected&#8221; property of the CheckBox is a Boolean it is automatically converted to String so it will be either the String &#8220;true&#8221; which has 4 characters or the String &#8220;false&#8221; which has 5 characters, our maxLength is 4 so when the CheckBox is not checked the length will be 5 (&#8220;false&#8221;) and then be invalid. This actually works better then using a NumberValidator and converting the Boolean false to 0 and true to 1 because it will still display as invalid sometimes because of wrong data type. </p>
<h3>ComboBox</h3>
<p>For validating the ComboBox I used a NumberValidator and set the minValue to 0 which is the first option in the ComboBox list (none selected is -1) and used the selectedIndex as the property to check for.</p>
<p>in MXML:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Array</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:NumberValidator</span> id=<span style="color: #ff0000;">&quot;comboboxValidator&quot;</span> source=<span style="color: #ff0000;">&quot;{myComboboxId}&quot;</span> property=<span style="color: #ff0000;">&quot;selectedIndex&quot;</span> minValue=<span style="color: #ff0000;">&quot;0&quot;</span> lowerThanMinError=<span style="color: #ff0000;">&quot;Please select one!&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Array</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>or AS3:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #6699cc; font-weight: bold;">var</span> validators<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Array</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #009900; font-style: italic;">// when adding the validators</span>
<span style="color: #6699cc; font-weight: bold;">var</span> comboboxValidator<span style="color: #000066; font-weight: bold;">:</span>NumberValidator = <span style="color: #0033ff; font-weight: bold;">new</span> NumberValidator<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
comboboxValidator<span style="color: #000066; font-weight: bold;">.</span>property = <span style="color: #990000;">'selectedIndex'</span><span style="color: #000066; font-weight: bold;">;</span>
comboboxValidator<span style="color: #000066; font-weight: bold;">.</span>minValue = <span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">;</span>
comboboxValidator<span style="color: #000066; font-weight: bold;">.</span>lowerThanMinError = <span style="color: #990000;">'Please select one!'</span><span style="color: #000066; font-weight: bold;">;</span>
comboboxValidator<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">source</span> = myComboboxId<span style="color: #000066; font-weight: bold;">;</span>
validators<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">push</span><span style="color: #000000;">&#40;</span>comboboxValidator<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #009900; font-style: italic;">// and when validating on submit</span>
<span style="color: #0033ff; font-weight: bold;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #6699cc; font-weight: bold;">var</span> i<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">int</span><span style="color: #000066; font-weight: bold;">;</span> i <span style="color: #000066; font-weight: bold;">&lt;</span> validators<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">length</span><span style="color: #000066; font-weight: bold;">;</span> i<span style="color: #000066; font-weight: bold;">++</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> src<span style="color: #000066; font-weight: bold;">:</span>UIComponent = validators<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">source</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>src <span style="color: #0033ff; font-weight: bold;">is</span> ComboBox<span style="color: #000000;">&#41;</span> validator<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span>validate<span style="color: #000000;">&#40;</span>ComboBox<span style="color: #000000;">&#40;</span>validators<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">source</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">.</span>selectedIndex<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Hope this helps anyone, I&#8217;ll try to make a post soon about creating a class to generate forms dynamically and validating them.</p>
]]></content:encoded>
			<wfw:commentRss>http://hugolarcher.com/2011/03/18/validate-checkbox-in-flex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Weekly Games</title>
		<link>http://hugolarcher.com/2010/12/26/weekly-games/</link>
		<comments>http://hugolarcher.com/2010/12/26/weekly-games/#comments</comments>
		<pubDate>Sun, 26 Dec 2010 17:23:28 +0000</pubDate>
		<dc:creator>hlarcher</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Weekly]]></category>
		<category><![CDATA[Bubble Tanks]]></category>
		<category><![CDATA[City Siege]]></category>
		<category><![CDATA[Flight]]></category>
		<category><![CDATA[Inferno Meltdown]]></category>
		<category><![CDATA[Insidia]]></category>
		<category><![CDATA[Neon Rider]]></category>
		<category><![CDATA[Sequels]]></category>

		<guid isPermaLink="false">http://hugolarcher.com/?p=342</guid>
		<description><![CDATA[You might have noticed I didn't post the last couple Weekly Updates on Sundays, I'm sorry for that but it has been a busy time and I have been also thinking of changing it to a Weekly Games post.

In the new format, which starts today, I'll provide links to some new games and review 2 or 3 in more depth. This week we have Bubble Tanks 3, Flight and Insidia along with a few others.

<a href="http://hugolarcher.com/?p=342">Read the Rest...</a>]]></description>
			<content:encoded><![CDATA[<p>You might have noticed I didn&#8217;t post the last couple Weekly Updates on Sundays, I&#8217;m sorry for that but it has been a busy time and I have been also thinking of changing it to a Weekly Games post.</p>
<p>In the new format, which starts today, I&#8217;ll provide links to some new games and review 2 or 3 in more depth. This week we have Bubble Tanks 3, Flight and Insidia along with a few others.</p>
<h3>Bubble Tanks 3</h3>
<p><a href="http://armorgames.com/play/10015/bubble-tanks-3"><img class="alignnone size-full wp-image-345" title="bubble_tanks_3" src="http://hugolarcher.com/wp-content/uploads/2010/12/bubble_tanks_3.png" alt="Bubble Tanks 3" width="470" height="100" /></a></p>
<table cellspacing="1">
<thead>
<tr>
<th>Categories</th>
<th>Rating</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Graphics</td>
<td><span class="score star-80">8.0</span></td>
</tr>
<tr>
<td>Sound</td>
<td><span class="score star-80">8.0</span></td>
</tr>
<tr class="odd">
<td>Mechanics</td>
<td><span class="score star-70">7.0</span></td>
</tr>
<tr>
<td>Gameplay</td>
<td><span class="score star-70">7.0</span></td>
</tr>
<tr class="odd">
<td>Addictiveness</td>
<td><span class="score star-75">7.5</span></td>
</tr>
<tr>
<td>Lifespan</td>
<td><span class="score star-60">6.5</span></td>
</tr>
<tr class="odd">
<td>Originality</td>
<td><span class="score star-60">6.0</span></td>
</tr>
<tr>
<td>Intuitiveness</td>
<td><span class="score star-85">8.5</span></td>
</tr>
<tr class="odd">
<td>Fun</td>
<td><span class="score star-75">7.5</span></td>
</tr>
<tr>
<td>Features</td>
<td><span class="score star-90">9.0</span></td>
</tr>
<tr class="nobg">
<td></td>
<td></td>
</tr>
<tr class="odd">
<td><strong>Overall</strong></td>
<td><strong>7.5</strong></td>
</tr>
</tbody>
</table>
<p>A lot of fans of the Bubble Tanks series have been waiting for this version me included so it is with some sadness that I say I&#8217;m a bit disappointed.</p>
<p>The reasons for that disappointment are quite a few actually and I don&#8217;t want to be too lengthy about them so I&#8217;ll only describe a few:</p>
<p>First of all the game just feels like version 2, there&#8217;s nothing new about the interface or the gameplay and the bubble&#8217;s environment, some might argue that you don&#8217;t change a winning team but honestly after so much wait I was expecting a bit more then just Bubble Tanks 2 with some weapons. The second reason is probably the biggest one and its that you still don&#8217;t have a simple &#8220;save game/profile&#8221; option, the last update did add a feature to save once you beat the final boss which doesn&#8217;t make a lot of sense because you might want to save halfway to go do something else and return later to continue, it seems more like a quick fix to quiet some comments then a solid solution that should have been thought during the development. I honestly don&#8217;t understand how can someone developed a game from start to end, publish it and then remember to add a save button. Lastly, the game is short, I know there will be weapon packs, you can create your tanks etc but the game itself takes like 1 hour maximum to get from start to beat the only boss and then you just go from bubble to bubble shooting stuff with no option to progress, that was a real turn off.</p>
<p>That being said the game is still fun (even though short) and apart from a few bugs (opening it and 1 million sounds making you deaf till you refresh the page, crashing once you reach the target number of bubbles to upgrade tank) there are some cool new tanks and weapons that were really well thought of like the beam (shame it lags a lot) and lots more.</p>
<p>Anyway, lets translate all these words into ratings.</p>
<h3>Flight</h3>
<p><a href="http://armorgames.com/play/7598/flight"><img class="alignnone size-full wp-image-344" title="flight" src="http://hugolarcher.com/wp-content/uploads/2010/12/flight.png" alt="Flight" width="249" height="124" /></a></p>
<table cellspacing="1">
<thead>
<tr>
<th>Categories</th>
<th>Rating</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Graphics</td>
<td><span class="score star-90">9.0</span></td>
</tr>
<tr>
<td>Sound</td>
<td><span class="score star-85">8.5</span></td>
</tr>
<tr class="odd">
<td>Mechanics</td>
<td><span class="score star-85">8.5</span></td>
</tr>
<tr>
<td>Gameplay</td>
<td><span class="score star-75">7.5</span></td>
</tr>
<tr class="odd">
<td>Addictiveness</td>
<td><span class="score star-85">8.5</span></td>
</tr>
<tr>
<td>Lifespan</td>
<td><span class="score star-75">7.5</span></td>
</tr>
<tr class="odd">
<td>Originality</td>
<td><span class="score star-75">7.5</span></td>
</tr>
<tr>
<td>Intuitiveness</td>
<td><span class="score star-70">7.0</span></td>
</tr>
<tr class="odd">
<td>Fun</td>
<td><span class="score star-85">8.5</span></td>
</tr>
<tr>
<td>Features</td>
<td><span class="score star-85">8.5</span></td>
</tr>
<tr class="nobg">
<td></td>
<td></td>
</tr>
<tr class="odd">
<td><strong>Overall</strong></td>
<td><strong>8.1</strong></td>
</tr>
</tbody>
</table>
<p>This was a good surprise for me, I usually don&#8217;t care much for &#8220;toss&#8221; games since I find there&#8217;s no depth in them and they just serve as a 5 minutes game but Flight really got me addicted. At first I was having some issues on finding the best way to toss the paper plane in the best way, I went for the grab and drag the mouse like you were trying to get it through a reinforced steel wall but I quickly found that it didn&#8217;t help (it actually resulted in some pretty bad throws) so I understood that the best way was to just swing it gently and release it, the real trick is during the light itself where you can control it (if you have a couple upgrades) and catch stars or cranes to increase speed and stay in the air.</p>
<p>The upgrades really take it to a whole new level, at first you have a hard time flying 100 meters but once you got all upgrades you&#8217;ll have a hard time not going beyond 2 kilometers and the achievements keep the game interesting during and after completion.</p>
<p>It was a bit of a shame that I found out some achievements had to be done during the journey through all the places so some of my upgrade choices were really bad and there was no way to go back and do it unless starting a new game.</p>
<p>This is definitely one of the funniest games I&#8217;ve playing in a while.</p>
<h3>Insidia</h3>
<p><a href="http://www.newgrounds.com/portal/view/557083"><img class="alignnone size-full wp-image-348" title="insidia" src="http://hugolarcher.com/wp-content/uploads/2010/12/insidia.png" alt="Insidia" width="500" height="130" /></a></p>
<table cellspacing="1">
<thead>
<tr>
<th>Categories</th>
<th>Rating</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Graphics</td>
<td><span class="score star-90">10.0</span></td>
</tr>
<tr>
<td>Sound</td>
<td><span class="score star-85">9.0</span></td>
</tr>
<tr class="odd">
<td>Mechanics</td>
<td><span class="score star-85">8.0</span></td>
</tr>
<tr>
<td>Gameplay</td>
<td><span class="score star-75">8.5</span></td>
</tr>
<tr class="odd">
<td>Addictiveness</td>
<td><span class="score star-85">8.0</span></td>
</tr>
<tr>
<td>Lifespan</td>
<td><span class="score star-75">7.0</span></td>
</tr>
<tr class="odd">
<td>Originality</td>
<td><span class="score star-75">7.0</span></td>
</tr>
<tr>
<td>Intuitiveness</td>
<td><span class="score star-70">8.5</span></td>
</tr>
<tr class="odd">
<td>Fun</td>
<td><span class="score star-85">8.0</span></td>
</tr>
<tr>
<td>Features</td>
<td><span class="score star-85">7.0</span></td>
</tr>
<tr class="nobg">
<td></td>
<td></td>
</tr>
<tr class="odd">
<td><strong>Overall</strong></td>
<td><strong>8.1</strong></td>
</tr>
</tbody>
</table>
<p>I have to start by saying the I simply love the graphic work on this game, its simple but consistent across the whole game and all game objects, you can tell there&#8217;s a well defined concept behind it. Another great thing is that the music and the sounds follow the same concept and create an ambience of mystery that really fits the genre.</p>
<p>What about originality? Well, it doesn&#8217;t derive much from most exploration games so it doesn&#8217;t really bring any breakthroughs to the genre. However the gameplay is very well done, controls and the usual double-jump and wall-grabbing are very good.</p>
<p>The only negative things I can really find is that the &#8220;dark&#8221; mood can get a bit depressing after a while and the game could use some kind of achievement system or something to keep it interesting after you finish it, I don&#8217;t actually know if Flash exploration games should be rich in re-playability but I personally would like to have more to play.</p>
<h3>Other Games</h3>
<p>Other recent games worth mentioning include:</p>
<p><a title="City Siege" href="http://armorgames.com/play/7574/city-siege" target="_blank">City Siege</a></p>
<p><a title="Neon Rider" href="http://armorgames.com/play/5346/neon-rider" target="_blank">Neon Rider</a></p>
<p><a title="Inferno Meltdown" href="http://armorgames.com/play/10074/inferno-meltdown" target="_blank">Inferno Meltdown</a></p>
]]></content:encoded>
			<wfw:commentRss>http://hugolarcher.com/2010/12/26/weekly-games/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weekly Update</title>
		<link>http://hugolarcher.com/2010/12/05/weekly-update-6/</link>
		<comments>http://hugolarcher.com/2010/12/05/weekly-update-6/#comments</comments>
		<pubDate>Sun, 05 Dec 2010 23:32:59 +0000</pubDate>
		<dc:creator>hlarcher</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Weekly]]></category>
		<category><![CDATA[Flaming Zombooka]]></category>
		<category><![CDATA[Icy Cave]]></category>
		<category><![CDATA[Prizma Puzzle 2]]></category>
		<category><![CDATA[Saturday Night Blood Fest]]></category>
		<category><![CDATA[Steambirds]]></category>
		<category><![CDATA[Toxers]]></category>
		<category><![CDATA[Update]]></category>

		<guid isPermaLink="false">http://hugolarcher.com/?p=338</guid>
		<description><![CDATA[This week is pretty much all about games, nothing special happened (that I'm aware of).

<a href="http://hugolarcher.com/?p=338">Read the Rest...</a>]]></description>
			<content:encoded><![CDATA[<p>This week is pretty much all about games, nothing special happened (that I&#8217;m aware of).</p>
<h3>Sequels</h3>
<p>I&#8217;m personally not a big fan of Steambirds but if you are you might not know that Steambirds: Survival has been released, play it <a title="Steambirds Survival" href="http://www.steambirds.com/" target="_blank">here</a>.</p>
<h3>Games</h3>
<h5>Icy Cave</h5>
<p><a href="http://armorgames.com/play/7524/icy-cave"><img class="alignnone size-full wp-image-339" title="icy_cave" src="http://hugolarcher.com/wp-content/uploads/2010/12/icy_cave.png" alt="Icy Cave" width="413" height="97" /></a></p>
<p>Icy Cave is a nice little game developed by <a title="Neutronized" href="http://www.neutronized.com/" target="_blank">Neutronized</a> and I wanted to write a review on it mostly because it got a pretty low score on some portals, for me this doesn&#8217;t mean the game is bad, usually it means the game is just not casual, doesn&#8217;t have blood or zombies or people just don&#8217;t get it.</p>
<p>Anyway, a lot of people are commenting that the yetis (the characters you need to move), move a bit slow. I don&#8217;t agree because as you progress you need to control more yetis and in more complicated situations so not everyone would easily succeed in the levels if they were running around really fast. The controls are very intuitive since all you have to do is click and drag a yeti to make him move in that direction or just click to make him stop and the levels are well designed with puzzles that try to keep you from getting your yetis home (kinda reminded me of lemmings sometimes).</p>
<p>One thing I really liked was the music, its very relaxing and pleasant and the graphics are very well done (if you like pixel art like me).</p>
<p>Its not a brilliant game in my opinion but it certainly doesn&#8217;t deserve such low scores either, its enjoyable and definitely above average for a small Flash game. I have no idea why it got such low scores but I&#8217;m guessing there&#8217;s just too many people that don&#8217;t like this kind of game and still just because of that they give it a bad rate. When I don&#8217;t like a certain genre or I think I can&#8217;t do an honest review I try not to judge games on portals since I don&#8217;t think its fair to the creator. Anyway, if you grew up in the 80&#8242;s and early 90&#8242;s  and your definition of a good game goes beyond zombies and one-click-to-throw-something  you might enjoy this game.</p>
<table cellspacing="1">
<thead>
<tr>
<th></th>
<th>Rating</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Graphics</td>
<td><span class="score star-80">8.0</span></td>
</tr>
<tr>
<td>Sound</td>
<td><span class="score star-90">9.0</span></td>
</tr>
<tr class="odd">
<td>Mechanics</td>
<td><span class="score star-80">8.0</span></td>
</tr>
<tr>
<td>Gameplay</td>
<td><span class="score star-75">7.5</span></td>
</tr>
<tr class="odd">
<td>Addictiveness</td>
<td><span class="score star-70">7.0</span></td>
</tr>
<tr>
<td>Lifespan</td>
<td><span class="score star-70">7.0</span></td>
</tr>
<tr class="odd">
<td>Originality</td>
<td><span class="score star-75">7.5</span></td>
</tr>
<tr>
<td>Intuitiveness</td>
<td><span class="score star-80">8.0</span></td>
</tr>
<tr class="odd">
<td>Fun</td>
<td><span class="score star-75">7.5</span></td>
</tr>
<tr>
<td>Features</td>
<td><span class="score star-65">6.5</span></td>
</tr>
<tr class="nobg">
<td></td>
<td></td>
</tr>
<tr class="odd">
<td>Overall</td>
<td>7.6</td>
</tr>
</tbody>
</table>
<h5>Toxers</h5>
<p><a href="http://armorgames.com/play/7517/toxers"><img class="alignnone size-full wp-image-340" title="toxers" src="http://hugolarcher.com/wp-content/uploads/2010/12/toxers.png" alt="Toxers" width="407" height="141" /></a></p>
<p>Ok, this game just doesn&#8217;t do it for me personally but a lot of people seem to be enjoying it, even though it had some bugs on the first version uploaded. The graphics are good and you can tell that there&#8217;s a lot of work that went into coding it but there&#8217;s just something that doesn&#8217;t quite amuse me. The idea of going from square to square in a the city and then sometimes finding giant bugs which you have to fight seems a bit weird and not so fun.</p>
<p>The concept is ok and as I said you can tell it involved a lot of work but it didn&#8217;t hook me enough to try and explore everything which is why I might not be completely fair about this specific review and apologize upfront, however I will try not to be lead by my personal feelings on this one. One thing I really disliked was the fights, its turn based and it doesn&#8217;t really add any fun to the game, if it had some kind of actual fighting it would definitely add some interest.</p>
<table cellspacing="1">
<thead>
<tr>
<th></th>
<th>Rating</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Graphics</td>
<td><span class="score star-85">8.5</span></td>
</tr>
<tr>
<td>Sound</td>
<td><span class="score star-75">7.5</span></td>
</tr>
<tr class="odd">
<td>Mechanics</td>
<td><span class="score star-85">8.5</span></td>
</tr>
<tr>
<td>Gameplay</td>
<td><span class="score star-75">7.5</span></td>
</tr>
<tr class="odd">
<td>Addictiveness</td>
<td><span class="score star-60">6.0</span></td>
</tr>
<tr>
<td>Lifespan</td>
<td><span class="score star-80">8.0</span></td>
</tr>
<tr class="odd">
<td>Originality</td>
<td><span class="score star-75">7.5</span></td>
</tr>
<tr>
<td>Intuitiveness</td>
<td><span class="score star-75">7.5</span></td>
</tr>
<tr class="odd">
<td>Fun</td>
<td><span class="score star-60">6.0</span></td>
</tr>
<tr>
<td>Features</td>
<td><span class="score star-80">8.0</span></td>
</tr>
<tr class="nobg">
<td></td>
<td></td>
</tr>
<tr class="odd">
<td>Overall</td>
<td>7.5</td>
</tr>
</tbody>
</table>
<p>I tried to be neutral about this last one so I&#8217;m giving it a fair score but even though it scored almost the same as Icy Cave I personally would pick Icy Cave if I had to choose one.</p>
<p>Other games that came out recently include:</p>
<ul>
<li><a title="Flaming Zombooka 2" href="http://armorgames.com/play/7510/flaming-zombooka-2" target="_blank">Flaming Zombooka 2</a> &#8211; Its fun to kill some time (and zombies).</li>
<li><a title="Saturday Night Blood Fest" href="http://armorgames.com/play/7481/saturday-night-blood-fest" target="_blank">Saturday Night Blood Fest</a> &#8211; A decent shooter with good graphics and sounds but does get very repetitive (and burns my mouse batteries).</li>
<li><a title="Prizma Puzzle 2" href="http://armorgames.com/play/7503/prizma-puzzle-2" target="_blank">Prizma Puzzle 2</a> &#8211; Its an ok puzzle-like game if you&#8217;re into the genre.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://hugolarcher.com/2010/12/05/weekly-update-6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The first game experiment</title>
		<link>http://hugolarcher.com/2010/12/01/the-first-game-experiment/</link>
		<comments>http://hugolarcher.com/2010/12/01/the-first-game-experiment/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 11:49:41 +0000</pubDate>
		<dc:creator>hlarcher</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Monetization]]></category>
		<category><![CDATA[Ads]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[ArmorGames]]></category>
		<category><![CDATA[Bored]]></category>
		<category><![CDATA[Casual]]></category>
		<category><![CDATA[Experiment]]></category>
		<category><![CDATA[JetBus]]></category>
		<category><![CDATA[Portals]]></category>
		<category><![CDATA[Sitelock]]></category>
		<category><![CDATA[Sponsorship]]></category>
		<category><![CDATA[Teagames]]></category>

		<guid isPermaLink="false">http://hugolarcher.com/?p=328</guid>
		<description><![CDATA[As some of you might know our first game named JetBus came out 2 weeks ago. I thought I'd share our goals for this game and also discuss a bit our findings of how the Flash game industry "seems" to work, I say "seems" because with only 1 game released there is no way we can take anything for granted, maybe not even after 10 games released. This will be just my personal opinion of Flash games, casual players, portals, APIs etc.

<a href="http://hugolarcher.com/?p=328">Read the Rest...</a>]]></description>
			<content:encoded><![CDATA[<p>As some of you might know our first game named JetBus came out 2 weeks ago. I thought I&#8217;d share our goals for this game and also discuss a bit our findings of how the Flash game industry &#8220;seems&#8221; to work, I say &#8220;seems&#8221; because with only 1 game released there is no way we can take anything for granted, maybe not even after 10 games released. This will be just my personal opinion of Flash games, casual players, portals, APIs etc.</p>
<h3>An experiment</h3>
<p>From day 1 we all had the same goal for JetBus, it was meant to be an experiment which would get us started and give us some insight of how the industry works. None of us had any dreams for it to be successful or concerns that it wouldn&#8217;t be, I&#8217;m being honest when I say this and I can&#8217;t stress it enough, from start to finish we didn&#8217;t have any expectations for the game, we were only interested in the process itself. The only thing on our mind was making a game that worked well, didn&#8217;t have any bugs, used our own engine and that we could use to try and get an idea of how to monetize games.</p>
<p>This doesn&#8217;t mean we didn&#8217;t care about making a good game, it just means that we didn&#8217;t worry about pleasing anyone with it. It is still a finished game that we personally like to play.</p>
<h3>The goal</h3>
<p>These were the 4 topics we wanted to learn about and the true purpose of JetBus:</p>
<ol>
<li>Can we make a Flash game? Not saying technically, but can we come up with a concept and theme and take it from start to finish going through the entire process and applying the little knowledge we have about game design (not design as in graphics but design as a whole).</li>
<li>How to make an engine for our games? We started from 0, read a LOT, ran hundreds of tests, wrote and rewrote code and came up with the first version of our engine, since then we already improved it a lot but all of this was only possible because we had a game to use as a &#8220;lab rat&#8221;.</li>
<li>Can we monetize a Flash game? This was a big question mark for us, we had no idea how to monetize a game, if it would get a sponsor, if ads are a good income or not etc. So far we haven&#8217;t even scratch the surface of this complex part of the process but at least we have a case study to reflect upon and draw conclusions.</li>
<li>Can we get our brand out there? Even though this was at the bottom of our priorities (this is obvious since we don&#8217;t even have a good website yet) it turned out to be surprisingly important for us to get people on our website after we saw the number of visits.</li>
</ol>
<h3>The development</h3>
<p>The process is NOT one that we would like to see as an example, first because it involved learning all we could about making games and starting a game engine from 0 without having any background experience with games. This is good, we loved learning and we will always have to learn more and more about games in general but it&#8217;s not directly related to the game itself.</p>
<p>Also unfortunately it wasn&#8217;t smooth as we would have liked. We started it as a side project that we only worked on the weekends and then after a few weekends we had to stop it completely to focus on client work and the game was literally untouched for 2 or 3 months. Then we went back to work on it once a week, then stopping it cause of work again, etc etc&#8230; only on the final stages we were working on it on a daily basis and by then we just wanted it to be over. Even though we probably didn&#8217;t spend more then a month or month and a half in total if we counted work hours only, the development was dragged for months and the final product was rushed in the very end because we just wanted to release it.</p>
<p>Another thing I personally hated was having to work on it sometimes without having the rest of the team involved, they were busy working on other projects (for clients) and I ended up having to make decisions and discussing things without having their full attention. Hope this doesn&#8217;t happen again.</p>
<h3>Monetizing the game</h3>
<p>We read scattered information available around the internet about how to monetize Flash games, it wasn&#8217;t really that helpful (the Getting Your Flash Game Sponsored book wasn&#8217;t out by then). From what we had learned though, the best approach was to use FlashGameLicense to find a sponsor. At this point we didn&#8217;t know what to expect and even though we wanted to get some kind of money for the work we had done, the biggest concern was to gather data that showed us how it works.</p>
<h5>Sponsorship</h5>
<p>Since we didn&#8217;t expect any kind of number, with every new bid on the game we were thinking &#8220;this wouldn&#8217;t be a bad amount for a first game&#8221; and we were surprised that the bids kept coming and reached an amount that is not awesome but is definitely higher then we thought, especially after reading some articles about games that were sold for much less and that we enjoyed playing. Our lack of expectation for an amount might have also lead us to end the bidding process early, if we had been more patient there&#8217;s a chance we could have got some higher bids.</p>
<h5>Sitelocks</h5>
<p>We have also managed to sell 4 non-exclusive sitelocked versions of JetBus so far since then which adds a bit more money to the pot and shows us there&#8217;s money to be made just for some hours of work on customizing the game after it has been sold.</p>
<h5>Advertisement</h5>
<p>The data we have about ads is not enough to draw any conclusions, the game has only been out on distribution for a couple days with the ads version but so far our thoughts are that this is not a big source of income for the average Flash game. There are only 2 ways we see this could bring some proper income: 1. you have the luck of making a game that the masses will rush out to play; 2. you release loads and loads of small games (like every 2 weeks or something).</p>
<p>We are obviously not interested in &#8220;baking&#8221; a new game every other week just for the purpose of having lots of games released, at least not at this time and we&#8217;re also not interested in making a game in a specific genre just for the purpose of getting millions of plays. We&#8217;re still idealists and want to make the games we&#8217;re interested in regardless of their acceptance. This might change in the future of course but for now we can afford to make games because we like to and not because we want to get rich.</p>
<h3>Getting our name out there</h3>
<p>It came as a surprise that a simple intro animation with a logo generated so much traffic to our address, if we had known we would have prepared a finished and well polished website before releasing the game instead of having a 2 page one done in a couple hours. This was a big mistake, if we had known we would have had a plan for this and made a nice website with some advertising which would give us some more income, its a bit late now so we&#8217;re not thinking of trying to make up for it and instead we&#8217;ll just take it slow and do it right for the next game. It was definitely a learned lesson though and we&#8217;re hoping some people can learn from our mistake by reading this.</p>
<h3>Casual players</h3>
<p>Flash games obviously only work because there are people that play them, however we had no idea that such a HUGE percentage of these players are only looking for a casual game that doesn&#8217;t take ANY effort to learn. We&#8217;ve realized that the more complex and involving the game is the less the average Flash game player will like it, this is a hard one to swallow since for us a game has to be involving and require skill to become fun. It seems that since the majority of these players are either 12 year old kids looking for a one-click-game-with-lots-of-blood or an older person looking for a puzzle game to kill 5 minutes during their coffee break, making a game like the ones we used to play when we were growing up is a bad idea. I think this why World of Warcraft went from an awesome game into what it is today, a social network for kids who don&#8217;t want to improve their skills so they just rant about having to make any efforts and spend 90% of their time in the chat using all the type of swearing that they cant in real life.</p>
<p>Anything that isn&#8217;t casual or doesn&#8217;t shed lots of blood won&#8217;t get millions of plays and a high rating, this seems true at least for 90% of the games, of course there&#8217;s always the exceptions that annoyingly contradict us while trying to make a point. Some portals are worse then others, even some of the so-called hardcore portals won&#8217;t approve a game that takes more then 5 seconds to understand, they&#8217;ll just click 0 in the rating, write &#8220;omfg, bad game!!1!&#8221; and leave, this is just plain stupid if you ask me and also sad but its the path society is choosing to take I guess where everything has to be consumed fast and if it takes any effort from our neurons then its not worth the extra seconds of our time, we&#8217;re living in the era of &#8220;quickies&#8221;.</p>
<p>This might seem like a rant but its really not, as I explained before this game was not meant to please anyone but us and it was an experiment that didn&#8217;t include any expectations so as much as it hurts for people to understand the fact is that we couldn&#8217;t care less about the average Flash game player when it comes to getting opinions for this specific game. This doesn&#8217;t mean we are not affected by comments of people that don&#8217;t understand that the UP arrow key is meant to go upwards or that if the game is supposed to be about flying skills you should try not to crash your vehicle against every single obstacle, it just means that we don&#8217;t take seriously any &#8220;bad game&#8221;, &#8220;too hard&#8221;, &#8220;has too many bugs&#8221; comments. As someone said in a reply to those comments, its a matter of interpretation, &#8220;bad game&#8221; might be &#8220;bad player&#8221;, &#8220;too hard&#8221; might also be &#8220;lack of skill&#8221; and &#8220;too many bugs&#8221; probably means &#8220;I don&#8217;t understand the game&#8221;.</p>
<p>Here&#8217;s the help of a graphic to understand the &#8220;problem&#8221;</p>
<p><a href="http://hugolarcher.com/wp-content/uploads/2010/12/level_failure_success.png" rel="lightbox[328]"><img class="alignnone size-medium wp-image-336" title="level_failure_success" src="http://hugolarcher.com/wp-content/uploads/2010/12/level_failure_success-300x113.png" alt="Level Success vs Failure" width="300" height="113" /></a></p>
<p>As you can see the blue line (failure) starts WAY above the orange one (success) on Level 1 of the game which tells us that people went straight into the game without understanding what it is about or what they have to do, then suddenly both lines meet on Level 2 when people that did understand start playing the game and from that point on the success rate is always above the failure one. Another thing we can see is that the amount of people that played level one in easy difficulty is around 490,000 while Level 2 is around 90,000 which means that 400,000 players didn&#8217;t bother trying to understand the game and play it and preferred to give it a bad comment/rate. Is this a problem with the game? In my opinion no, its a problem with the player. I&#8217;m sorry but that&#8217;s just my personal opinion, a game doesn&#8217;t have to be bad just because its not easy for everyone, and a game being easy doesn&#8217;t mean its good.</p>
<p>Some portals are worse then others, its not the portal&#8217;s fault, they just have a user base that is more casual or maybe they just appeal more to a certain demographic that really shouldn&#8217;t be playing some kinds of games. Gladly, when reading comments our brains are capable of filtering the ones that matter regardless if they are from people who like or dislike the game, actually the &#8220;awesome game&#8221; comments are equally not helpful. The best comments are the ones that point out any bugs, things that annoy them, or offer suggestions of how we could make it better&#8230; these are the ones that help.</p>
<h3>Lots of versions, lots of APIs, lots of time</h3>
<p>There&#8217;s a lot of work involved in compiling different versions and implementing different APIs. We didn&#8217;t realize this until we actually had to do it but a lot of time goes into preparing versions for the sponsor, versions for non-exclusives, versions for distribution etc. We&#8217;re glad that we&#8217;re getting enough money in return for this work but it was definitely something we&#8217;re glad we learned in the first game, so far we&#8217;ve had to compile 9 different versions of the game and there&#8217;s at least 2 more planned for now.</p>
<p>We can&#8217;t be thankful enough for having thought of this before and having prepared our engine for easily implementing APIs and compiling different versions. We have a package just for APIs and all we have to do when implementing a new one is create a wrapper class for it and use a single method on our engine to initialize it, then in the game&#8217;s code whenever is needed we easily check which APIs are present and what to do for each. This allows us to have only 1 source for the game that just has a bunch of APIs initialized or not.</p>
<p>Beware if you&#8217;re trying to get into making games that sometimes you might accept a sponsorship offer without fully knowing the amount of work the sponsor wants, this didn&#8217;t happen to us because our sponsor was awesome in clarifying what they needed and communication with them was always super fast and clear, but we hear this a lot from other newcomers that accept a bid and then the sponsor tells them they have to translate the game to a gazillion languages, make 10 different versions, design new content just for them, etc. Be careful.</p>
<p>Our experience so far is that its worth spending a couple hours or even a day implementing an API and compiling a version to sell a sitelock version, at least for the price we&#8217;ve been selling them on this game. It is however a bit annoying that sometimes you run into an API is that is completely different from everything else or that is simply bad or not explained at all. I plan to make a post soon about some of the APIs we had to implement and maybe offer some tips to people that haven&#8217;t used them before but for now let me just tell you that it will help if you actually have a good understanding of ActionScript and rely on that instead of relying on the API being good, we can only imagine how someone less experienced in AS will get around some of these APIs.</p>
<h3>Conclusion</h3>
<p>Flash games live in a different market from other games, especially from the ones we&#8217;re used to. We still have to learn how to get used to this market and also to understand its players, we loved having comments about JetBus that will help us in the sequel and in other games and also comments of people that were reminded about of old games they used to play a long time ago. We learned that we have to get used to nonsense comments just like people will have to get used to our games not being as casual as they want them to.</p>
<p>We learned a lot from this experiment, we made a game that we love to play, we have dozens of ideas to include in the sequel (yes there will be one, more about this on a future post) and we managed to make some money in the end, so for us JetBus is a big success!</p>
<p>We&#8217;d like to thank some portals that we had the pleasure of working with and get to know like <a title="Teagames" href="http://www.teagames.com" target="_blank">Teagames</a>, <a title="ArmorGames" href="http://www.armorgames.com" target="_blank">ArmorGames</a> and <a title="Bored" href="http://www.bored.com" target="_blank">Bored</a> and we would also like to thank <a title="FlashGameLicense" href="http://www.flashgamelicense.com" target="_blank">FlashGameLicense</a> for their support and platform that really helped us in getting our feet wet.</p>
]]></content:encoded>
			<wfw:commentRss>http://hugolarcher.com/2010/12/01/the-first-game-experiment/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Weekly Update</title>
		<link>http://hugolarcher.com/2010/11/28/weekly-update-5/</link>
		<comments>http://hugolarcher.com/2010/11/28/weekly-update-5/#comments</comments>
		<pubDate>Sun, 28 Nov 2010 16:41:07 +0000</pubDate>
		<dc:creator>hlarcher</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Weekly]]></category>
		<category><![CDATA[All we need is Brain]]></category>
		<category><![CDATA[Belial]]></category>
		<category><![CDATA[Bubble Tanks]]></category>
		<category><![CDATA[Doodle Devil]]></category>
		<category><![CDATA[IntoSpace]]></category>
		<category><![CDATA[JetBus]]></category>
		<category><![CDATA[Kongregate]]></category>
		<category><![CDATA[Monster Slayers]]></category>
		<category><![CDATA[Newgrounds]]></category>
		<category><![CDATA[Playtomic]]></category>
		<category><![CDATA[Red Bandana]]></category>
		<category><![CDATA[Teagames]]></category>

		<guid isPermaLink="false">http://hugolarcher.com/?p=321</guid>
		<description><![CDATA[Hi everyone, I though today I would start making the "Games" part of the Weekly Update a bit more detailed, pick one game that stands out and comment it a bit more and also give it my personal rating. I don't know if I'll turn it into a separate post in the future or if the Weekly Update will turn into Weekly Games, I don't know but for now this will suffice.

There's some nice things this week, <a href="http://hugolarcher.com/?p=321">Read the Rest...</a>]]></description>
			<content:encoded><![CDATA[<p>Hi everyone, I though today I would start making the &#8220;Games&#8221; part of the Weekly Update a bit more detailed, pick one game that stands out and comment it a bit more and also give it my personal rating. I don&#8217;t know if I&#8217;ll turn it into a separate post in the future or if the Weekly Update will turn into Weekly Games, I don&#8217;t know but for now this will suffice.</p>
<p>There&#8217;s some nice things this week, lets see:</p>
<h3>Red Bandana</h3>
<p>JetBus has been released and you can play it on many places, here&#8217;s a few:</p>
<ul>
<li><a title="JetBus at Red Bandana" href="http://www.red-bandana.com/jetbus.html" target="_blank">Red-Bandana</a></li>
<li><a title="JetBus at Teagames" href="http://www.teagames.com/games/jetbus/play.php" target="_blank">Teagames</a></li>
<li><a title="JetBus at Newgrounds" href="http://www.newgrounds.com/portal/view/554657" target="_blank">Newgrounds</a></li>
<li><a title="JetBus at Kongregate" href="http://www.kongregate.com/games/RBandana/jetbus" target="_blank">Kongregate</a></li>
</ul>
<p>Don&#8217;t forget to place your rating, we expect more portals to include the game in the coming week. Also, Red Bandana&#8217;s website at the moment is just a homepage and JetBus page but RedBandana is working on a full featured portal that should be up and running early next year or so, you&#8217;ll have updates on that.</p>
<h3>Sequels</h3>
<p>I don&#8217;t know if you&#8217;re a fan of Bubble Tanks but I am. This week Hero Interactive revealed the BT3 launch date and also posted a FAQ-like article about the game. I&#8217;m excited about it and it seems they&#8217;ve worked hard to make the game expandable to keep you playing it for a long time. Read all about it <a title="Bubble Tanks 3" href="http://www.herointeractive.com/blog/?p=1048" target="_blank">here</a>.</p>
<h3>APIs</h3>
<p>Playtomic has made some changes/improvements to their API and website. If you don&#8217;t know Playtomic yet, its an API that allows you to track statistics for your games, add scoreboards, level sharing etc. Its been in beta for quite a while and prices were unknown but this week they&#8217;ve announced the prices for when the beta is over, check them out <a title="Playtomic Prices" href="http://playtomic.com/pricing" target="_blank">here</a> if you&#8217;re interested.</p>
<h3>Games</h3>
<h5>Doodle Devil</h5>
<p><a title="Doodle Devil" href="http://armorgames.com/play/7384/doodle-devil" target="_blank"><img class="size-full wp-image-322 alignnone" title="game_doodledevil" src="http://hugolarcher.com/wp-content/uploads/2010/11/game_doodledevil.png" alt="Doodle Devil" width="320" height="130" /></a></p>
<p>Doodle Devil is a puzzle-like game developed by Avallon Alliance and is the sequel to the popular Doodle God. First of all I have to admit I didn&#8217;t know Doodle God before I found Doodle Devil (I know, I know&#8230;). I have mixed feelings about this game, whenever I find a game that gets me addicted but has some annoying things and is missing others I get really angry! First of all I get angry because I wasn&#8217;t the one to come up with the idea for the game and second because they didn&#8217;t make it all it could be but I guess that can happen with every game.</p>
<p>Anyway, the game is extremely simple but very addicting, I couldn&#8217;t put myself to stop until I reached the end. But there are some flaws in it, the biggest one in my opinion is that it will accept combinations you already done before and create the element again which will waste time and close the groups you were working on, this is VERY annoying and in a game so simple I would guess that a simple conditional check wouldn&#8217;t be something you&#8217;d forget to code. The other thing that was a shame for me was that the &#8220;rules&#8221; about how to make a better score were not explicit enough, it should be more obvious that the more &#8220;bad moves&#8221; you make the worse score you&#8217;re going to get.</p>
<p>The makers of the game say it will receive updates (I&#8217;m hoping this means free expansion packs) but being an &#8220;organization freak&#8221; like I am I would do everything I can do merge Doodle God and Doodle Devil and then enable it to receive expansion packs. Keeping it all in one big game would be awesome in my opinion but I&#8217;m not in their shoes so I don&#8217;t know the reasons behind not including Doodle God in this release.</p>
<p>Another thing I missed was that some combinations made sense to me but didn&#8217;t work while others didn&#8217;t make any sense and worked (human+magic=worm??) but I guess there&#8217;s no way around this since every person will have different combination ideas. If it was me I would allow suggestions (kinda like a &#8220;level editor&#8221;) from players, maybe a section just for this that would submit combinations that would be reviewed and when accepted included into the game.</p>
<table cellspacing="1">
<thead>
<tr>
<th></th>
<th>Rating</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Graphics</td>
<td><span class="score star-75">7.5</span></td>
</tr>
<tr>
<td>Sound</td>
<td><span class="score star-75">7.5</span></td>
</tr>
<tr class="odd">
<td>Mechanics</td>
<td><span class="score star-65">6.5</span></td>
</tr>
<tr>
<td>Gameplay</td>
<td><span class="score star-75">7.5</span></td>
</tr>
<tr class="odd">
<td>Addictiveness</td>
<td><span class="score star-70">7</span></td>
</tr>
<tr>
<td>Lifespan</td>
<td><span class="score star-80">8</span></td>
</tr>
<tr class="odd">
<td>Originality</td>
<td><span class="score star-80">8</span></td>
</tr>
<tr>
<td>Intuitiveness</td>
<td><span class="score star-90">9</span></td>
</tr>
<tr class="odd">
<td>Fun</td>
<td><span class="score star-75">7.5</span></td>
</tr>
<tr>
<td>Features</td>
<td><span class="score star-65">6.5</span></td>
</tr>
<tr class="nobg">
<td></td>
<td></td>
</tr>
<tr class="odd">
<td>Overall</td>
<td>7.5</td>
</tr>
</tbody>
</table>
<p>So to sum it all up, in my opinion this game is one of those &#8220;Its got so much potential&#8221; game, I still liked it a lot, finished and would play it again but it was a love/hate experience.</p>
<h5>All we need is Brain</h5>
<p><a title="All we need is Brain" href="http://armorgames.com/play/7415/all-we-need-is-brain" target="_blank"><img class="alignnone size-full wp-image-323" title="game_allweneedisbrain" src="http://hugolarcher.com/wp-content/uploads/2010/11/game_allweneedisbrain.png" alt="" width="375" height="90" /></a></p>
<p>Oh my god I love this game! Its definitely one of my all time favorite Flash games and I&#8217;m currently playing it while writing this and I&#8217;m having a lot of fun. Its really great how someone can still take a theme like the zombie one and make a good game out of it. I&#8217;m not sure if the mechanics are too similar to any other game out there but I personally can&#8217;t think of any game this one reminds me of.</p>
<p>The graphics and animations are really nicely done and the music does an incredible job at setting the mood without becoming annoying. Level design is very good, there&#8217;s really an increased difficulty as you advance and I doubt you&#8217;ll get stuck in any of the early levels.</p>
<p>Ok I&#8217;ve just finished all the 25 levels and its delightful, too bad its a bit short and there&#8217;s nothing more to do then try to improve your score but hey, that&#8217;s what casual games are all about I guess.</p>
<table cellspacing="1">
<thead>
<tr>
<th></th>
<th>Rating</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>Graphics</td>
<td><span class="score star-95">9.5</span></td>
</tr>
<tr>
<td>Sound</td>
<td><span class="score star-90">9.0</span></td>
</tr>
<tr class="odd">
<td>Mechanics</td>
<td><span class="score star-85">8.5</span></td>
</tr>
<tr>
<td>Gameplay</td>
<td><span class="score star-85">8.5</span></td>
</tr>
<tr class="odd">
<td>Addictiveness</td>
<td><span class="score star-90">9.0</span></td>
</tr>
<tr>
<td>Lifespan</td>
<td><span class="score star-80">8</span></td>
</tr>
<tr class="odd">
<td>Originality</td>
<td><span class="score star-85">8.5</span></td>
</tr>
<tr>
<td>Intuitiveness</td>
<td><span class="score star-75">8.5</span></td>
</tr>
<tr class="odd">
<td>Fun</td>
<td><span class="score star-90">9.0</span></td>
</tr>
<tr>
<td>Features</td>
<td><span class="score star-65">6.5</span></td>
</tr>
<tr class="nobg">
<td></td>
<td></td>
</tr>
<tr class="odd">
<td>Overall</td>
<td>8.5</td>
</tr>
</tbody>
</table>
<p>Other games that came out recently</p>
<ul>
<li><a title="Belial Chapter 2" href="http://armorgames.com/play/7396/belial-chapter-2" target="_blank">Belial Chapter 2</a></li>
<li><a title="IntoSpace" href="http://armorgames.com/play/7338/intospace" target="_blank">IntoSpace!</a></li>
<li><a title="Monster Slayers" href="http://armorgames.com/play/7296/monster-slayers" target="_blank">Monster Slayers</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://hugolarcher.com/2010/11/28/weekly-update-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FDT 4 Review</title>
		<link>http://hugolarcher.com/2010/11/22/fdt-4-review-2/</link>
		<comments>http://hugolarcher.com/2010/11/22/fdt-4-review-2/#comments</comments>
		<pubDate>Mon, 22 Nov 2010 13:25:21 +0000</pubDate>
		<dc:creator>hlarcher</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Editor]]></category>
		<category><![CDATA[FDT]]></category>
		<category><![CDATA[FlashBuilder]]></category>
		<category><![CDATA[FlashDevelop]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[IntelliJ]]></category>
		<category><![CDATA[Max]]></category>
		<category><![CDATA[Plus]]></category>
		<category><![CDATA[Powerflasher]]></category>
		<category><![CDATA[Pure]]></category>

		<guid isPermaLink="false">http://hugolarcher.com/?p=255</guid>
		<description><![CDATA[I'm really excited to be reviewing FDT4! I'll try not to be influenced by the fact that I simply love this software so I hope I can keep this as neutral as possible. I will actually point out other options, their pros and cons as well as the pros and cons of FDT4. Bare in mind that I'm by no means an expert in all of these editors and I will probably miss a lot of features and not be accurate about all editors, I count on help from comments to point out any mistakes which I will promptly correct.

<a href="http://hugolarcher.com/?p=255">Read the Rest...</a>]]></description>
			<content:encoded><![CDATA[<address>Software: FDT 4</address>
<address>Company: <a title="Powerflasher" href="http://fdt.powerflasher.com" target="_blank">Powerflasher</a></address>
<address style="margin-bottom: 1em;">Price: $129, $399 and $699</address>
<p>I&#8217;m really excited to be reviewing FDT4! I&#8217;ll try not to be influenced by the fact that I simply love this software so I hope I can keep this as neutral as possible. I will actually point out other options, their pros and cons as well as the pros and cons of FDT4. Bare in mind that I&#8217;m by no means an expert in all of these editors and I will probably miss a lot of features and not be accurate about all editors, I count on help from comments to point out any mistakes which I will promptly correct.</p>
<p>I wasn&#8217;t able to keep this article short so if you want to get right to the point and read the review use the table of contents below, otherwise read on.</p>
<h3>Table of contents</h3>
<ol class="nostyle">
<li>1. <a class="darkgreen" href="#lnk1">My experience with editors</a></li>
<li>2. <a class="darkgreen" href="#lnk2">The main editors</a></li>
<li>3. <a class="darkgreen" href="#lnk3">Simple comparison chart</a></li>
<li>4. <a class="darkgreen" href="#lnk4">Review of FDT4</a>
<ol class="nostyle">
<li>4.1. <a class="darkgreen" href="#lnk4_1">Creating / Managing Projects</a></li>
<li>4.2. <a class="darkgreen" href="#lnk4_2">Smart Editor Features</a>
<ol class="nostyle">
<li>4.2.1. <a class="darkgreen" href="#lnk4_2_1">Syntax Coloring</a></li>
<li>4.2.2. <a class="darkgreen" href="#lnk4_2_2">Live Error Highlighting</a></li>
<li>4.2.3. <a class="darkgreen" href="#lnk4_2_3">Quick Fixes</a></li>
<li>4.2.4. <a class="darkgreen" href="#lnk4_2_4">Code Assist / Auto Completion</a></li>
<li>4.2.5. <a class="darkgreen" href="#lnk4_2_5">Organize Imports</a></li>
<li>4.2.6. <a class="darkgreen" href="#lnk4_2_6">Code Formatter</a></li>
<li>4.2.7. <a class="darkgreen" href="#lnk4_2_7">Code Templates / Snippets</a></li>
</ol>
</li>
<li>4.3. <a class="darkgreen" href="#lnk4_3">Launch Configurations</a></li>
<li>4.4. <a class="darkgreen" href="#lnk4_4">Debugger</a></li>
<li>4.5. <a class="darkgreen" href="#lnk4_5">Profiler</a></li>
<li>4.6. <a class="darkgreen" href="#lnk4_6">Ant</a></li>
<li>4.7. <a class="darkgreen" href="#lnk4_7">Font Library Creator</a></li>
</ol>
</li>
<li>5. <a class="darkgreen" href="#lnk5">FDT4 Versions</a></li>
<li>6. <a class="darkgreen" href="#lnk6">Closing thoughts</a></li>
</ol>
<h3 id="lnk1">My experience with editors</h3>
<p>First let me share my background with different ActionScript editors because I feel a lot of people will relate to it. As most of &#8220;old school&#8221; ActionScript programmers, I used to code everything inside the Flash IDE, although this was a tedious task there weren&#8217;t many known options out there and in a way it made me code better because I relied more in keeping the logic in my head other then the IDE helping me so it wasn&#8217;t all bad but as time went by and new versions of AS were released I felt the need to use a better editor.</p>
<p>Since I was a Windows user back then (still don&#8217;t know how I survived it), after a few Google searches the obvious choice was FlashDevelop mainly because it was free, so I installed it. It was like a revolution for me back then, FD was lightweight and had simple features that made my life a lot easier, I wondered how I ever used something else for coding. At this point I hadn&#8217;t try anything else.</p>
<p>Then an even bigger switch came for me, Windows to Mac. It was the best decision I ever made computer wise but that aside there was a big problem, there is no FlashDevelop version for Mac. This was a big leap to take and I searched and searched for options, a lot of people were having the same issue and some tried using FD running on Parallels or VMWare (which I tried but was slow and meant I had to look at the Windows logo), others just gave in and used a more simple editor like TextMate with a couple plugins and others went for commercial editors like FDT, IntelliJ and recently FlashBuilder.</p>
<p>I tried all of the above and FDT felt the most comfortable from the moment I opened it, there is always a sense of misplacement when you make a switch but I was able to overcome it in the first few minutes. So, what was my decision you ask? My decision was FDT4, I followed the beta and just fell in love with it, I felt the same way I did when I switched from the Flash IDE to FlashDevelop. It was better, faster and had more features then any other editor for Mac which made me realize that the price was worth it for professional coding.</p>
<h3 id="lnk2">The main editors</h3>
<p>There&#8217;s a long list of editors you can use to code ActionScript, editors like Notepad++, Flash IDE, TextMate, Realaxy, etc but in my opinion there are only 4 main ActionScript editors and after using all of them this is <strong>my opinion</strong> of each.</p>
<h5>FDT 4</h5>
<p>FDT4 feels right from the moment you start using it, the only other editor that felt the same for me was FlashDevelop. It has a ton of features and not just that but the features it has are important and well done. I won&#8217;t say much more about it since the review will speak for itself.</p>
<ul>
<li><strong>Pros:</strong> coding is faster and easier then in other editors, launching and compiling options are great</li>
<li><strong>Cons:</strong> its the most expensive of the editors along with FlashBuilder if you look only at the version with more features</li>
</ul>
<h5>FlashDevelop 3.3</h5>
<p>FlashDevelop has a horde of fans, I used to be one and I used to say how it was better then any other editor even though I hadn&#8217;t try the others. The best things about it is that its lightweight and free but its Windows only and doesn&#8217;t have all the features you can get on FDT. If you&#8217;re on Windows and have a limited budget I would recommend FlashDevelop even though you can get discounts or even free licenses of FB4, FDT4 and IntelliJ if you&#8217;re a student or if you&#8217;re running an Open Source project (it&#8217;s worth checking it out). I have to give props to the people behind FlashDevelop for coming up with such a good editor and making it open source, its great for anyone starting to code ActionScript but as you get into bigger commercial projects you start considering other options.</p>
<ul>
<li><strong>Pros</strong>: lightweight, a big user base, very good code hinting, free</li>
<li><strong>Cons:</strong> not as many features as FDT, Windows only, not having real-time error highlighting is just a turn off for me</li>
</ul>
<h5>IntelliJ 9</h5>
<p>IntelliJ is not new at all, its been around successfully for a long time mainly as a Java editor but I have mixed feelings about it. On one hand it seems to have more features then any other but I wasn&#8217;t able to dedicate the huge amount of time it seemed to require to edit all the preferences to my taste. I could tell its a really solid editor and I used it in a couple projects but I never really &#8220;felt&#8221; comfortable with it and some things just irritated me. I didn&#8217;t like the navigation, code hinting and it was a bit slower then the others. I believe the beta for IntelliJ 10 has some great improvements, or so people say but I don&#8217;t think I&#8217;ll be giving it another chance anytime soon since there are other editors that feel better and are targeted specifically at ActionScript.</p>
<ul>
<li><strong>Pros:</strong> lots of languages supported, lots of plugins available, lots of version control options and the refactoring tools seem to be amazing</li>
<li><strong>Cons:</strong> a bit heavyweight, too many customization options available and needed, navigation is confusing</li>
</ul>
<h5>FlashBuilder 4</h5>
<p>My personal opinion of FB4 can be described as &#8220;big disappointment&#8221;. I was expecting so much from this software and it didn&#8217;t live up to those expectations. I&#8217;m still using it on a project mainly because its near the end and there&#8217;s no point in exporting the project to another editor, but it will probably be my last project coded in FB4 for a long time. If there&#8217;s something that can go wrong in an editor I&#8217;ve experienced it on FB4, anything from opening a project and FB4 simply decides to delete files without a reason, code folding has a mind of its own and bugs too often or just disappears, opening a file and FB4 saying its blank but on any other editor the code is there and is editable, etc. I do like the integration with other Adobe software especially since it recognizes linked library items from Flash and it has some features no other editor has but that&#8217;s something I can live without.</p>
<ul>
<li><strong>Pros:</strong> integration with other Adobe products like Flash and Catalyst</li>
<li><strong>Cons:</strong> bugs and lots of missing features</li>
</ul>
<h3 id="lnk3">Comparison Chart</h3>
<p>There are more in depth comparisons available online but this is not an IDE showdown, its a review about FDT4 so I will only make a simple comparison based on my experience and only about the 10 common features people usually look for in an editor.</p>
<table cellspacing="1">
<thead>
<tr>
<th></th>
<th>FDT</th>
<th>FlashDevelop</th>
<th>IntelliJ</th>
<th>FlashBuilder</th>
</tr>
</thead>
<tbody>
<tr>
<td>OS Support</td>
<td>Windows, Mac, Linux</td>
<td>Windows</td>
<td>Windows, Mac, Linux</td>
<td>Windows, Mac</td>
</tr>
<tr class="odd">
<td>Price</td>
<td>$699, $399, $129</td>
<td>Free</td>
<td>$599, $249</td>
<td>$699, $249</td>
</tr>
<tr class="nobg">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td>Syntax Coloring</td>
<td><span class="rating star-50">5</span></td>
<td><span class="rating star-50">5</span></td>
<td><span class="rating star-50">5</span></td>
<td><span class="rating star-30">3</span></td>
</tr>
<tr>
<td>Real-time Errors</td>
<td><span class="rating star-50">5</span></td>
<td><span class="rating star-20">2</span></td>
<td><span class="rating star-40">4</span></td>
<td><span class="rating star-0">0</span></td>
</tr>
<tr class="odd">
<td>Code Hinting</td>
<td><span class="rating star-50">5</span></td>
<td><span class="rating star-50">5</span></td>
<td><span class="rating star-30">3</span></td>
<td><span class="rating star-30">3</span></td>
</tr>
<tr>
<td>Code Assist / Complete</td>
<td><span class="rating star-50">5</span></td>
<td><span class="rating star-50">5</span></td>
<td><span class="rating star-30">3</span></td>
<td><span class="rating star-30">3</span></td>
</tr>
<tr class="odd">
<td>Quick Fixes</td>
<td><span class="rating star-50">5</span></td>
<td><span class="rating star-40">4</span></td>
<td><span class="rating star-50">5</span></td>
<td><span class="rating star-30">3</span></td>
</tr>
<tr>
<td>Code Generation</td>
<td><span class="rating star-50">5</span></td>
<td><span class="rating star-30">3</span></td>
<td><span class="rating star-40">4</span></td>
<td><span class="rating star-40">4</span></td>
</tr>
<tr class="odd">
<td>Debugger</td>
<td><span class="rating star-40">4</span></td>
<td><span class="rating star-40">4</span></td>
<td><span class="rating star-50">5</span></td>
<td><span class="rating star-50">5</span></td>
</tr>
<tr>
<td>Run Configurations</td>
<td><span class="rating star-50">5</span></td>
<td><span class="rating star-30">3</span></td>
<td><span class="rating star-40">4</span></td>
<td><span class="rating star-30">3</span></td>
</tr>
<tr class="odd">
<td>Refactoring</td>
<td><span class="rating star-30">3</span></td>
<td><span class="rating star-30">3</span></td>
<td><span class="rating star-50">5</span></td>
<td><span class="rating star-30">3</span></td>
</tr>
<tr>
<td>Version Control Support</td>
<td><span class="rating star-40">4</span></td>
<td><span class="rating star-30">3</span></td>
<td><span class="rating star-50">5</span></td>
<td><span class="rating star-40">4</span></td>
</tr>
<tr class="nobg">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="odd">
<td>Average</td>
<td>4.6</td>
<td>3.7</td>
<td>4.3</td>
<td>3.1</td>
</tr>
</tbody>
</table>
<p>Just to offer some clarification for my ratings here are some of important notes:</p>
<ul>
<li>Syxtax coloring is good in all editors except FlashBuilder, I hate it when an editor doesn&#8217;t offer coloring for custom classes because I like to look at code and distinguish where I&#8217;m calling/using my libraries.</li>
<li>Real-time error highlighting is a must for me, it saves a ton of time to see if i&#8217;m making mistakes as I type. FlashBuilder only shows errors in Flex code once you save and in Flash once you compile, FlashDevelop only offers syntax error highlighting which is not enough for me.</li>
<li>Code completion should be fast and appear while you&#8217;re typing, FlashDevelop does this by default and FDT can be configured to do so too, IntelliJ and FlashBuilder need a shortcut or that you use a trigger key (maybe IntelliJ can be configured to respond better but I&#8217;m not sure).</li>
<li>I found that FDT and FlashDevelop are the ones with more auto complete features.</li>
<li>FDT is the one with the most code generation options while FlashDevelop is the one with less although it does have some that I didn&#8217;t find in any other editor.</li>
<li>The most complete debuggers seemed to be the ones in IntelliJ and FlashBuilder which offer some additional control.</li>
<li>The editor with the best and easiest run configurations in my opinion is FDT, I&#8217;m including the launcher chain feature in this category by the way.</li>
<li>Event though I didn&#8217;t use all the refactoring possibilities of IntelliJ it did seem to be superior and have more options then the other editors.</li>
<li>The list of version control options on IntelliJ is very impressive, there was even a couple I had never heard of before, FDT and FlashBuilder can be extended with eclipse plugins for most version control systems and FlashDevelop only offers the most common ones.</li>
</ul>
<h3 id="lnk4">Review of FDT4</h3>
<p>I&#8217;ve learned something while writing this article, reviewing a software like FDT4 is not easy. There are so many features and so much you can tell about each that it would take forever and I&#8217;ve written and deleted and written and deleted over and over until I realized I can&#8217;t cover it all, I didn&#8217;t want to leave anything out but I think that if people want to know about something that I don&#8217;t cover they can always read through FDT&#8217;s awesome documentation, install the trial and try it themselves or just ask in the comments.</p>
<h5 id="lnk4_1">Creating / Managing Projects</h5>
<p class="clear"><a rel="lightbox[100]" href="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_project_wizard.png"><img class="size-medium wp-image-187 left top" title="fdt_project_wizard" src="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_project_wizard-277x300.png" alt="Project Wizard" width="277" height="300" /></a>I hate it when a project wizard forces you to choose options that might not be the best for your project and then creates &#8220;junk&#8221; folders and files on its own, its frustrating to be forced to edit the project and change things after its created to fit your needs.</p>
<p>FDT&#8217;s project wizard doesn&#8217;t force you in any way, instead it assumes that every project is a Flash Project and the difference is in which SDK you use to compile.</p>
<p class="clear"><a rel="lightbox[100]" href="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_project_navigation.png"><img class="size-full wp-image-196 right top" title="fdt_project_navigation" src="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_project_navigation.png" alt="FDT Project Navigation" width="270" height="309" /></a>It lets you choose your own structure, use several source folders and manage library dependencies with a simple right-click &gt; Source Folder &gt; Add to Classpath / Remove from Classpath.</p>
<p>You can change anything in your project at anytime with ease and in my opinion that is really &#8220;pure comfort&#8221;.</p>
<p>If you are used to have a specific structure or using the same libraries a lot It even lets you create your own project templates which is really cool.</p>
<h5 id="lnk4_2" class="clear">Smart Editor Features</h5>
<p>A good editor doesn&#8217;t just have lots of features, it needs to have the most basic and important features work in a powerful way.</p>
<h6 id="lnk4_2_1">Syntax Coloring</h6>
<p>This is usually not something you give much thought while coding, its just something that is there and most editors do a good job in this department but strangely enough some still lack. When I code I don&#8217;t want just coloring for reserved words and the SDK reference, I want coloring for all the classes, methods and variables in my project. You can check how FlashBuilder does its syntax coloring below:</p>
<p><a rel="lightbox[100]" href="http://hugolarcher.com/wp-content/uploads/2010/11/fb_syntax_coloring.png"><img class="size-full wp-image-214 alignnone" title="fb_syntax_coloring" src="http://hugolarcher.com/wp-content/uploads/2010/11/fb_syntax_coloring.png" alt="FlashBuilder Syntax Coloring" width="410" height="140" /></a></p>
<p><a href="http://hugolarcher.com/wp-content/uploads/2010/11/fb_syntax_coloring.png" rel="lightbox[255]"></a>It only colors the reserved words and the string&#8230;. Now notice how FDT has coloring for your &#8220;Game&#8221; class and uses italic for the variables &#8220;_sound&#8221; and &#8220;_level&#8221; and also italic for the &#8220;switchState&#8221; method and by the way this is easily customizable, all the colors and using bold, italic is just a matter of preferences.</p>
<p><a rel="lightbox[100]" href="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_syntax_coloring.png"><img class="size-full wp-image-215 alignnone" title="fdt_syntax_coloring" src="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_syntax_coloring.png" alt="FDT Syntax Coloring" width="410" height="140" /></a></p>
<h6 id="lnk4_2_2">Live Error Highlighting</h6>
<p>Is it just me or do you also hate having to save and build your project to find out you have an error in your code? Being able to see your making a mistake while you type is a real time saver and I don&#8217;t mean just syntax errors, I mean calling a class you didn&#8217;t import, using a variable that doesn&#8217;t exist, etc and being able to correct it on the spot.</p>
<p><a rel="lightbox[100]" href="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_live_errors.png"><img class="size-full wp-image-219 alignnone" title="fdt_live_errors" src="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_live_errors.png" alt="FDT Live Error Highlighting" width="375" height="70" /></a></p>
<h6 id="lnk4_2_3">Quick Fixes</h6>
<p>This is another very useful feature, in addition to Live Error Highlighting you can use the shortcut Cmd+1 (Mac) / Ctrl+1 (Windows) to open up options and quickly fix the error.</p>
<p><a rel="lightbox[100]" href="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_quick_fix_error.png"><img class="size-full wp-image-218 alignnone" title="fdt_quick_fix_error" src="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_quick_fix_error.png" alt="Quick Fix Error" width="546" height="76" /></a></p>
<p>FDT has lots of Quick Fixes which include:</p>
<ul>
<li>Class &amp; Interface Generation</li>
<li>Method Generation</li>
<li>Reference Generation</li>
<li>Property Generation</li>
<li>Getter and Setter (Accessor and Mutator) Generation</li>
<li>Event Handler Generation</li>
</ul>
<h6 id="lnk4_2_4">Code Assist / Auto Completion</h6>
<p>Probably the most wanted feature of all in any editor is the code assist. Its really helpful especially when you&#8217;re working with an API you&#8217;re not familiar with or with a complex project that has lots going around.</p>
<p>If you are anything like me then you don&#8217;t like having to use a shortcut to open Code Assist, I think that by default FDT&#8217;s Code Assist is only triggered by &#8220;.:&#8221; (not sure since I changed this long ago) but you can easily make it more responsive by adjusting its delay and its triggers to something like &#8220;abcdefghijklmnopqrstuvwxyz_.:&#8221;. This will make the Code Assist open with any letter like FlashDevelop does. It&#8217;s also worth noting that only FD and FDT have an option to accept a suggestion with a key other then Enter.</p>
<h6 id="lnk4_2_5">Organize Imports</h6>
<p>All editors these days add import statements for you when you reference something that uses other packages but sometimes you get carried away or you copy paste code from other sources and don&#8217;t pay attention to imports. FDT has a really cool feature that lets you organize your imports with a simple shortcut Cmd+Shift+O (Mac) / Ctrl+Shift+O (Windows). What this command will do is remove any unused imports (which by the way FDT highlights in real time with a warning) and/or add any missing imports the code needs.</p>
<h6 id="lnk4_2_6">Code Formatter</h6>
<p style="text-align: center;"><a rel="lightbox[100]" href="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_formatter_options.png"><img class="aligncenter size-medium wp-image-226" src="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_formatter_options-300x209.png" alt="FDT Formatter Options" width="300" height="209" /></a></p>
<p>Unlike FlashDevelop and FlashBuilder which need plugins, FDT has awesome and extensive customization options for formatting your code. If you&#8217;re stuck using FlashBuilder and you don&#8217;t have the FlexFormatter plugin you should really check it out because its great and FDT has similar customization already built-in, once you set its options to your preference all you have to do in order to format your code is a simple Cmd+Shift+F (Mac) / Ctrl+Shift+F (windows).</p>
<h6 id="lnk4_2_7">Code Templates / Snippets</h6>
<p>Another feature I personally haven&#8217;t used much before but some people love is Templates / Snippets. FDT has a long list of pre-installed templates and it offers you the ability to create your own or import / export templates to share with other users. The template manager can be accessed from the preferences navigating to FDT &gt; Editor &gt; Templates, in here you&#8217;ll find the list of all templates and options to Edit, Remove, Create, Import and Export.</p>
<p style="text-align: center;"><a rel="lightbox[100]" href="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_template_manager.jpg"><img class="aligncenter size-medium wp-image-229" title="fdt_template_manager" src="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_template_manager-300x228.jpg" alt="FDT Template Manager" width="300" height="228" /></a></p>
<p>Activating a template is just like activating Auto Complete, you just type part of the name and use the shortcut Ctrl+Space.</p>
<h5 id="lnk4_3">Launch Configurations</h5>
<p>FDT&#8217;s launch configurations gives you absolute control over how your projects compile and launch. The most notable difference between FDT and the other editors is that FDT doesn&#8217;t force you to use any structure for your project and you don&#8217;t have settings for your compiler, instead you&#8217;re in control of the structure and you can create several configurations which are saved in your FDT settings folder and can be used in any project.</p>
<p>This can seem a bit confusing but if you take a few minutes to understand how it works it will open up a lot of possibilities like:</p>
<p>Choosing any file as the default application file (other editors force you to use a certain file) and a different name for the output file for each run configuration.</p>
<p style="text-align: center;"><a rel="lightbox[100]" href="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_launch_configuration.png"><img class="aligncenter size-medium wp-image-246" title="fdt_launch_configuration" src="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_launch_configuration-300x219.png" alt="" width="300" height="219" /></a></p>
<p>Setting up multiple launch configuration for the same project.</p>
<p style="text-align: center;"><a rel="lightbox[100]" href="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_launch_configurations.png"><img class="aligncenter size-medium wp-image-245" title="fdt_launch_configurations" src="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_launch_configurations-300x100.png" alt="" width="300" height="100" /></a></p>
<p>Using the Launcher Chain by adding compiler arguments and compilation variabels which you can use on your code to make sure the application behaves differently for each configuration. This will let you create several version of the application with a single action.</p>
<p><a rel="lightbox[100]" href="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_compilation_variables.png"><img class="size-full wp-image-243 alignnone" title="fdt_compilation_variables" src="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_compilation_variables.png" alt="" width="497" height="308" /></a></p>
<h5 id="lnk4_4">Debugger</h5>
<p>The debugger is not just about allowing you do use trace statements. When you debug an application FDT opens up the Debug Perspective (configurable) which allows you to find exactly where in your code a runtime error occurs, no more cryptic error messages that don&#8217;t tell you where to look.</p>
<p style="text-align: center;"><a rel="lightbox[100]" href="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_debug_runtime_error.png"><img class="aligncenter size-medium wp-image-261" title="fdt_debug_runtime_error" src="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_debug_runtime_error-300x200.png" alt="FDT Debugger Runtime Error" width="300" height="200" /></a></p>
<p>It also allows you to use breakpoints and step commands to control the execution back and forth to check for instance names and their values and you can even change them while the application is running in case you need it. This is really helpful if for example you&#8217;re connecting to an API, remote script or web service and don&#8217;t have a good documentation about it, I&#8217;ve used it recently for an application that connects to a service and I was able to easily see what data it was sending and how it was formatted.</p>
<p style="text-align: center;"><a rel="lightbox[100]" href="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_debug_variables.png"><img class="aligncenter size-medium wp-image-262" title="fdt_debug_variables" src="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_debug_variables-300x199.png" alt="FDT Debugger Variables" width="300" height="199" /></a></p>
<p>There is a lot to be said about the debugger unfortunately I haven&#8217;t used it much for analyzing code even though I can see that all the tools you need are right there.</p>
<h5 id="lnk4_5">Profiler</h5>
<p>In some applications performance is critical. The profiler lets you check under the hood and figure out what&#8217;s going on in there, this is one of those features that you might not need to use a lot or in every project but when you do need it, if you don&#8217;t have it you could be running into some headaches. The profiler lets you do Memory profiling and Performance profiling which is really nice.</p>
<p>The Profiler Perspective gives you controls for the execution of the application, you can pause it or suspend the profiling and then using filters for internal packages and native objects you can check several things like information about the garbage collector.</p>
<p style="text-align: center;"><a rel="lightbox[100]" href="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_profiler_memory_graph.png"><img class="aligncenter size-medium wp-image-280" title="fdt_profiler_memory_graph" src="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_profiler_memory_graph-300x99.png" alt="FDT Profiler Memory Graph" width="300" height="99" /></a></p>
<p>You also have a memory graph and information about the objects created and how much memory they&#8217;re taking and you can take snapshots at any time without stopping the application. These snapshots can then be compared to give you a visual representation of your application at different times.</p>
<p style="text-align: center;"><a rel="lightbox[100]" href="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_profiler_objects.png"><img class="aligncenter size-medium wp-image-281" title="fdt_profiler_objects" src="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_profiler_objects-300x150.png" alt="FDT Profiler Live Objects" width="300" height="150" /></a></p>
<h5 id="lnk4_6">Ant</h5>
<p>Sometimes there&#8217;s a project where you need to create and do a lot of stuff, you can do all of those separately and by hand or you can use Ant tasks. Here are some examples of common Ant tasks you might need to use:</p>
<ul>
<li>Create one or more SWC&#8217;s from one or more files in your project.</li>
<li>Create one of more SWF&#8217;s from one or more files in your project.</li>
<li>Launch a SWF in a player or the browser.</li>
<li>Change files to reflect new builds.</li>
<li>Create ZIP files from one or more sources and deploy them to a location.</li>
</ul>
<p>You can do these one by one or you can use Ant and just do it with a single action, this saves you a huge amount of time and automates something that would otherwise require you to write down all the process so you don&#8217;t forget anything in the future. Since Ant uses a XML file with your tasks you can even save a backup of this file somewhere so it doesn&#8217;t get lost or you can use it for other projects, provided that names are the same or you change them. Let&#8217;s look at a simple example:</p>
<p><a rel="lightbox[100]" href="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_ant_xml.png"><img class="size-full wp-image-284 alignnone" title="fdt_ant_xml" src="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_ant_xml.png" alt="FDT Ant XML" width="549" height="261" /></a></p>
<h5 id="lnk4_7">Font Library Creator</h5>
<p>Fonts is one of those things that are sometimes hard to manage, especially if you need a lot of them and multiple languages. FDT&#8217;s Font Library Creator is one of my favorite new features, it offers a really simple yet powerful way for you to manage fonts for your applications. I think this is one of those cases where pictures are worth a thousand words.</p>
<p><a rel="lightbox[100]" href="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_font_library.png"><img class="aligncenter size-medium wp-image-291" title="fdt_font_library" src="http://hugolarcher.com/wp-content/uploads/2010/11/fdt_font_library-300x188.png" alt="FDT Font Library Creator" width="300" height="188" /></a><br />
As you can see its pretty simple and self-explanatory. You choose the fonts you want, give them a name, choose which glyphs to embed and Generate either a SWF, SWC or ActionScript classes for them. The FDT documentation covers this better then I ever could so if you want more details check that out, all I can say is that this is a really nice feature that can help you manage your fonts if you don&#8217;t already have your own specific method.</p>
<h3 id="lnk5">FDT Versions</h3>
<p>FDT4 comes in 3 different versions called Pure, Plus and Max. I have to say that I didn&#8217;t try the Pure and Plus versions but from what I can see on the <a title="FDT Version Features" href="http://www.fdt.powerflasher.com/developer-tools/fdt/features/" target="_blank">features comparison table</a> at FDT&#8217;s website here are the main differences:</p>
<h5>Smart Editor</h5>
<p>All the features from Live Error Highlighting to Auto Complete, Code Templates, Quick Fixes are included in all versions. The only difference is that the Pure and Plus versions don&#8217;t include the Rename Refactoring feature and although this can be very useful, it might arguably be one of the things you &#8220;can&#8221; live without.</p>
<h5>Navigation</h5>
<p>There&#8217;s a big difference in navigation features between Pure and the other versions. With the Plus version you only miss the Dependency Visualizer but with the Pure version you also miss Quick Outline, Type Hierarchy, Open Type, Dependency View and Reference Search.</p>
<h5>Project Management</h5>
<p>In this department all versions have pretty much the same features, Pure is missing SWC Browsing and Move Refactoring and Plus is only missing Move Refactoring but all versions keep the important features like Project Templates, SDK management, Air, Multiple Source Folders, External SWC linkage and Version Control.</p>
<h5>Testing and Deployment</h5>
<p>Perhaps the most notable differences reside in this section. The Pure and Plus versions don&#8217;t include the Profiler, Debugger and Launcher Chain but Ant, Launch Configurations and Font Library Creator are still there.</p>
<h5>Conclusion</h5>
<p>There are a few cool features you&#8217;re going to miss if you don&#8217;t choose the Max version, from those the Launcher Chain, Profiler and Refactoring are probably at the top of  the list and of course the most important feature you&#8217;re going to miss is the Debugger. You can still code just about any project with the Plus and even the Pure versions of FDT and to be honest I think I would probably still prefer one of them to other editors.</p>
<p>I can&#8217;t go over every possible scenario to figure out yours but I can say that if you are looking for a professional editor FDT4 Max is the right choice, if your budget is not quite there then I think it might be worth one of the other versions and then using <a title="MonsterDebugger" href="http://demonsterdebugger.com/" target="_blank">MonsterDebugger</a> which is an Open Source library you can use to add some level of debugging. If you&#8217;re a student you can buy any version of FDT4 with a -50% discount and if you&#8217;re running an Open Source project you can apply for a free license at FDT&#8217;s website.</p>
<h3 id="lnk6">Closing thoughts</h3>
<p>Everyone is different and sometimes we just get comfortable with what we have and don&#8217;t want to change unless we have to, so I understand people that have tried just one editor and is sticking with it, I&#8217;ve been there. But I&#8217;m glad I was forced to look for alternatives, it made me aware of what&#8217;s out there and which editor is better for me.</p>
<p>Some may argue that FDT is a bit expensive, well that depends on the point of view, everything is expensive if you don&#8217;t need it. However if you do need something then you can&#8217;t say its expensive, it might even be cheap as long as it does the job well and lets you do profitable work with it.</p>
<p>I really like FDT4, its fast, easy to use and you can tell by its features that the people behind it care about Flash/Flex and know what they&#8217;re doing. At this moment this is my editor of choice and I wouldn&#8217;t change it for any other.</p>
<p>If you&#8217;re interested in learning more about FDT visit their <a title="FDT Website" href="http://www.fdt.powerflasher.com/" target="_blank">website</a>, read the <a title="FDT Documentation" href="http://fdt.powerflasher.com/docs/Main_Page" target="_blank">documentation</a> or <a title="FDT Trial Download" href="http://www.fdt.powerflasher.com/developer-tools/fdt/download/" target="_blank">download the trial</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://hugolarcher.com/2010/11/22/fdt-4-review-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

