<?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>Thinking in Code &#187; Actionscript</title>
	<atom:link href="http://www.michelboudreau.com/category./actionscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michelboudreau.com</link>
	<description>Michel Boudreau&#039;s Personal Blog</description>
	<lastBuildDate>Wed, 25 Apr 2012 20:18:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Actionscript Label Statements for Loops</title>
		<link>http://www.michelboudreau.com/2011/08/28/actionscript-label-statements-for-loops/</link>
		<comments>http://www.michelboudreau.com/2011/08/28/actionscript-label-statements-for-loops/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 07:04:59 +0000</pubDate>
		<dc:creator>Michel Boudreau</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[break]]></category>
		<category><![CDATA[label]]></category>
		<category><![CDATA[loops]]></category>
		<category><![CDATA[statement]]></category>

		<guid isPermaLink="false">http://www.michelboudreau.com/?p=747</guid>
		<description><![CDATA[I have to say that I&#8217;m ashamed that I didn&#8217;t ...]]></description>
			<content:encoded><![CDATA[<p>I have to say that I&#8217;m ashamed that I didn&#8217;t know about this beforehand. I&#8217;ve recently discovered a little feature in Actionscript called <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/statements.html#label">label statements</a>. &nbsp;I always expect to learn new things in the industry since it&#8217;s every-changing, however I did not think I would learn something new about Actionscript since I&#8217;ve used it since AS1 and have thoroughly studied AS3 when it came out.<br />
<span id="more-747"></span></p>
<p>Let&#8217;s give a quick example of a simple problem: You need to find the index of a string within a 2D array and do something with that index. &nbsp;Here&#8217;s how I would do it normally:</p>
<pre class="brush: as3; title: ; notranslate">
private function findIndex(text:String):void
{
	var row:Array;
	var index:Point;
	for(var y:uint = 0, ylen:uint = array.length; y&lt;ylen; y++)
	{
		row = array[y];
		for(var x:uint = 0, xlen:uint = row.length; x&lt;xlen; x++)
		{
			if(row[x] == text)
			{
				index = new Point(x,y);
				break;
			}
		}
		if(index)
		{
			break;
		}
	}
	// Do something with index
}
</pre>
<p>You&#8217;ll notice that within the example, the second I find the index, I break out of the loops to reduce the run time of the function.  The external loop always looks to see if &#8216;index&#8217; is not null and breaks out if it is.  I&#8217;ve never liked this approach because it adds more code than needed and sometimes its not as easy as just checking if a variable is not null.  You could always use &#8216;return&#8217; if your function is done with its purpose, but that&#8217;s not always possible.</p>
<p>The alternative to this is using label statements.  What you can do is simply &#8216;label&#8217; your loops and then when you want to break, you can specify which loop that needs to be broken.  Take our current example and let&#8217;s add label statements in it:</p>
<pre class="brush: as3; title: ; notranslate">
private function findIndex(text:String):void
{
	var row:Array;
	var index:Point;
	outer:for(var y:uint = 0, ylen:uint = array.length; y&lt;ylen; y++)
	{
		row = array[y];
		for(var x:uint = 0, xlen:uint = row.length; x&lt;xlen; x++)
		{
			if(row[x] == text)
			{
				index = new Point(x,y);
				break outer;
			}
		}
	}
	// Do something with index
}
</pre>
<p>That is much better and cleaner.  I&#8217;ve seen this done before in Java, but I have never encountered or read about it for Actionscript.  This method can also be used with the &#8216;continue&#8217; operator so that it skips the rest of the code to the next iteration or with block statements like so:</p>
<pre class="brush: as3; title: ; notranslate">
doSomething: {
	var x:uint = index.x;
	if(x &gt; 100)
	{
		break doSomething;
	}
	trace(x);
}
</pre>
<p>I don&#8217;t think I would ever use it with block statements since these could be simply replaced with &#8216;if&#8217; statements, but knowing about it can be beneficial.  I know I will be using label statements in nested loops from now on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelboudreau.com/2011/08/28/actionscript-label-statements-for-loops/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TextInput Prompt Component</title>
		<link>http://www.michelboudreau.com/2010/11/24/textinput-prompt-component/</link>
		<comments>http://www.michelboudreau.com/2010/11/24/textinput-prompt-component/#comments</comments>
		<pubDate>Thu, 25 Nov 2010 01:36:48 +0000</pubDate>
		<dc:creator>Michel Boudreau</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[component]]></category>
		<category><![CDATA[lab49]]></category>
		<category><![CDATA[prompt]]></category>
		<category><![CDATA[TextInput]]></category>

		<guid isPermaLink="false">http://www.michelboudreau.com/?p=603</guid>
		<description><![CDATA[Last week at the Lab49 sponsored Flex vs. Silverlight Bakeoff, ...]]></description>
			<content:encoded><![CDATA[<p>Last week at the <a href="http://www.lab49.com" target="_blank">Lab49</a> sponsored <a href="http://www.ustream.tv/recorded/10919997" target="_blank">Flex vs. Silverlight Bakeoff</a>, my team (Flex) had an issue when we wanted to create a simple text input component with a prompt.&nbsp; This isn&#8217;t something that I use particularly often, but for some reason I had a memory of some kind of prompt property.&nbsp; To my surprise however, Flex 4.1 did not have a prompt property on the TextInput component, even though it is a fairly sought after feature.</p>
<p><span id="more-603"></span>In the end, we opted for a quick implementation of it, but it wasn&#8217;t up to the standards of Spark.&nbsp; This is where this post comes in.&nbsp; Searching online quickly listed a lot of different variations on how to do it, but many of them resembled my first attempt and didn&#8217;t take advantage of Spark skinning.&nbsp; I chose to rectify this by creating my own PromptTextInput that is highly skinnable, stylable and to my knowledge, uses the best Spark practices.</p>
<p>One quick note before diving into the code; while I was trying to implement this, I was surprised to find that you could not extend TextInput via MXML.&nbsp; It has to be done in Actionscript.&nbsp; This is no doubt a bug in the compiler.&nbsp; The error? &#8220;<em>Multiple initializer values for default property, &#8216;text&#8217;, of type &#8216;String&#8217;</em>.&#8221;&nbsp; This because the &#8216;defaultProperty&#8217; of TextInput is &#8216;text&#8217;, which means anything that&#8217;s placed in between the TextInput tag is expected to be the text that&#8217;s going to be displayed.&nbsp; In this case though, when trying to just add a Script tag, it would give this error.&nbsp; Very annoying.&nbsp;&nbsp; Moving on however to the actual implementation.&nbsp; First the component itself.&nbsp; Or just <a href="http://www.michelboudreau.com/wp-content/uploads/2010/11/PromptTextInput.zip">download the project</a>.</p>
<pre class="brush: as3; title: ; notranslate">
package com.michelboudreau.view.components
{
	import com.michelboudreau.view.skins.PromptTextInputSkin;
	import flash.events.FocusEvent;
	import flash.events.KeyboardEvent;
	import flash.ui.Keyboard;
	import spark.components.Label;
	import spark.components.TextInput;

	// Extra skin states that we need to show prompt
	[SkinState(&quot;normalWithPrompt&quot;)]
	[SkinState(&quot;disabledWithPrompt&quot;)]

	public class PromptTextInput extends TextInput
	{
		// Create a new skin part that will display our prompts
		[SkinPart(required=&quot;false&quot;)]
		public var promptDisplay:Label;

		private var _prompt:String; // Holds the value of the prompt text
		private var _promptChanged:Boolean; // Flag for the invalidation
		private var _inFocus:Boolean = false; // Flag used to know if in focus

		// New state constants
		static protected const NORMAL_WITH_PROMPT:String = 'normalWithPrompt';
		static protected const DISABLED_WITH_PROMPT:String = 'disabledWithPrompt';

		public function PromptTextInput()
		{
			super();
			this.addEventListener(FocusEvent.FOCUS_IN, onFocus);
			this.addEventListener(FocusEvent.FOCUS_OUT, onFocus);

			// sets the default skin
			setStyle(&quot;skinClass&quot;, PromptTextInputSkin);
		}

		[Bindable]
		public function get prompt():String
		{
			return _prompt;
		}

		public function set prompt(value:String):void
		{
			this._prompt = value;
			this._promptChanged = true;
			invalidateProperties();
		}

		/**
		 * Adding the prompt text to the label if it's available
		 */
		override protected function commitProperties():void
		{
			super.commitProperties();

			if (this._promptChanged)
			{
				if (promptDisplay)
				{
					promptDisplay.text = prompt;
				}
				this._promptChanged = false;
			}
		}

		/**
		 * Changing the logic to add our new skin states
		 *
		 * @return The state that the skin should change to
		 */
		override protected function getCurrentSkinState():String
		{
			if(!this._inFocus &amp;&amp; text.length == 0)
			{
				if(enabled)
				{
					return NORMAL_WITH_PROMPT;
				}else{
					return DISABLED_WITH_PROMPT;
				}
			}else{
				return super.getCurrentSkinState();
			}
		}

		/**
		 * Listen to see if the prompt label is being created and add
		 * prompt text to it.
		 *
		 * @param partName:String
		 * @param instance:Object
		 */
		override protected function partAdded(partName:String, instance:Object):void
		{
			super.partAdded(partName, instance);

			if (instance == promptDisplay)
			{
				promptDisplay.text = prompt;
			}
		}

		/**
		 * Handles the focus event and sets our focus flag then
		 * invalidates the skin to change states appropriately
		 * @param e:FocusEvent
		 */
		private function onFocus(e:FocusEvent):void
		{
			this._inFocus = e.type == FocusEvent.FOCUS_IN;
			invalidateSkinState();
		}
	}
}
</pre>
<p>You&#8217;ll notice that we&#8217;re add a few things to the components.  First, we&#8217;re adding two new skin states on top of the two that are with TextInput (normal and disabled).  We&#8217;re also adding a new skin part that isn&#8217;t required since we want to leave it open to the developers/designers if they want to have to add in the skin.  And finally, we override the getCurrentSkinState so to send out two new skin state strings to the skin itself.  If none of this makes sense, I definitely recommend you read up on <a href="http://danorlando.com/?p=374" target="_blank">Spark Skinning</a>.  And of course, for all this to come together, we need our new skin.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;s:SparkSkin xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot; xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;
    xmlns:fb=&quot;http://ns.adobe.com/flashbuilder/2009&quot; alpha.disabled=&quot;0.5&quot; blendMode=&quot;normal&quot;&gt;

    &lt;fx:Metadata&gt;
		[HostComponent(&quot;com.michelboudreau.view.components.PromptTextInput&quot;)]
	&lt;/fx:Metadata&gt;

    &lt;fx:Script fb:purpose=&quot;styling&quot;&gt;
        private var paddingChanged:Boolean;

        /* Define the skin elements that should not be colorized. */
        static private const exclusions:Array = [&quot;background&quot;, &quot;textDisplay&quot;];

        /**
         * @private
         */
        override public function get colorizeExclusions():Array {return exclusions;}

        /* Define the content fill items that should be colored by the &quot;contentBackgroundColor&quot; style. */
        static private const contentFill:Array = [&quot;bgFill&quot;];

        /**
         *  @private
         */
        override public function get contentItems():Array {return contentFill};

        /**
         *  @private
         */
        override protected function commitProperties():void
        {
            super.commitProperties();

            if (paddingChanged)
            {
                updatePadding();
                paddingChanged = false;
            }
        }

        /**
         * @private
         */
        override protected function initializationComplete():void
        {
            useChromeColor = true;
            super.initializationComplete();
        }

        /**
         *  @private
         */
        override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
        {
            if (getStyle(&quot;borderVisible&quot;) == true)
            {
                border.visible = true;
                shadow.visible = true;
                background.left = background.top = background.right = background.bottom = 1;
                textDisplay.left = textDisplay.top = textDisplay.right = textDisplay.bottom = 1;
            }
            else
            {
                border.visible = false;
                shadow.visible = false;
                background.left = background.top = background.right = background.bottom = 0;
                textDisplay.left = textDisplay.top = textDisplay.right = textDisplay.bottom = 0;
            }

            borderStroke.color = getStyle(&quot;borderColor&quot;);
            borderStroke.alpha = getStyle(&quot;borderAlpha&quot;);

            super.updateDisplayList(unscaledWidth, unscaledHeight);
        }

        /**
         *  @private
         */
        private function updatePadding():void
        {
            if (!textDisplay)
                return;

            // Push padding styles into the textDisplay
            var padding:Number;

            padding = getStyle(&quot;paddingLeft&quot;);
            if (textDisplay.getStyle(&quot;paddingLeft&quot;) != padding)
                textDisplay.setStyle(&quot;paddingLeft&quot;, padding);

            padding = getStyle(&quot;paddingTop&quot;);
            if (textDisplay.getStyle(&quot;paddingTop&quot;) != padding)
                textDisplay.setStyle(&quot;paddingTop&quot;, padding);

            padding = getStyle(&quot;paddingRight&quot;);
            if (textDisplay.getStyle(&quot;paddingRight&quot;) != padding)
                textDisplay.setStyle(&quot;paddingRight&quot;, padding);

            padding = getStyle(&quot;paddingBottom&quot;);
            if (textDisplay.getStyle(&quot;paddingBottom&quot;) != padding)
                textDisplay.setStyle(&quot;paddingBottom&quot;, padding);
        }

        /**
         *  @private
         */
        override public function styleChanged(styleProp:String):void
        {
            var allStyles:Boolean = !styleProp || styleProp == &quot;styleName&quot;;

            super.styleChanged(styleProp);

            if (allStyles || styleProp.indexOf(&quot;padding&quot;) == 0)
            {
                paddingChanged = true;
                invalidateProperties();
            }
        }
    &lt;/fx:Script&gt;

    &lt;fx:Script&gt;
        &lt;![CDATA[
        /**
         * @private
         */
        private static const focusExclusions:Array = [&quot;textDisplay&quot;];

        /**
         *  @private
         */
        override public function get focusSkinExclusions():Array { return focusExclusions;};
        ]]&gt;
    &lt;/fx:Script&gt;

    &lt;s:states&gt;
        &lt;s:State name=&quot;normal&quot;/&gt;
        &lt;s:State name=&quot;disabled&quot;/&gt;

		&lt;!-- ADDED --&gt;
		&lt;s:State name=&quot;normalWithPrompt&quot; stateGroups=&quot;promptGroup&quot;/&gt;
		&lt;s:State name=&quot;disabledWithPrompt&quot; stateGroups=&quot;promptGroup&quot;/&gt;
    &lt;/s:states&gt;

    &lt;!-- border --&gt;
    &lt;!--- @private --&gt;
    &lt;s:Rect left=&quot;0&quot; right=&quot;0&quot; top=&quot;0&quot; bottom=&quot;0&quot; id=&quot;border&quot;&gt;
        &lt;s:stroke&gt;
            &lt;!--- @private --&gt;
            &lt;s:SolidColorStroke id=&quot;borderStroke&quot; weight=&quot;1&quot; /&gt;
        &lt;/s:stroke&gt;
    &lt;/s:Rect&gt;

    &lt;!-- fill --&gt;
    &lt;!--- Defines the appearance of the TextInput component's background. --&gt;
    &lt;s:Rect id=&quot;background&quot; left=&quot;1&quot; right=&quot;1&quot; top=&quot;1&quot; bottom=&quot;1&quot;&gt;
        &lt;s:fill&gt;
            &lt;!--- @private Defines the background fill color. --&gt;
            &lt;s:SolidColor id=&quot;bgFill&quot; color=&quot;0xFFFFFF&quot; /&gt;
        &lt;/s:fill&gt;
    &lt;/s:Rect&gt;

    &lt;!-- shadow --&gt;
    &lt;!--- @private --&gt;
    &lt;s:Rect left=&quot;1&quot; top=&quot;1&quot; right=&quot;1&quot; height=&quot;1&quot; id=&quot;shadow&quot;&gt;
        &lt;s:fill&gt;
            &lt;s:SolidColor color=&quot;0x000000&quot; alpha=&quot;0.12&quot; /&gt;
        &lt;/s:fill&gt;
    &lt;/s:Rect&gt;

    &lt;!-- text --&gt;
    &lt;!--- @copy spark.components.supportClasses.SkinnableTextBase#textDisplay --&gt;
    &lt;s:RichEditableText id=&quot;textDisplay&quot;
              verticalAlign=&quot;middle&quot;
              widthInChars=&quot;10&quot;
              left=&quot;1&quot; right=&quot;1&quot; top=&quot;1&quot; bottom=&quot;1&quot; /&gt;

	&lt;!-- ADDED --&gt;
	&lt;!-- prompt --&gt;
	&lt;s:Label id=&quot;promptDisplay&quot; verticalAlign=&quot;middle&quot; includeIn=&quot;promptGroup&quot;
			 alpha=&quot;0.5&quot; mouseEnabled=&quot;false&quot; left=&quot;1&quot; right=&quot;1&quot; top=&quot;1&quot; bottom=&quot;1&quot; /&gt;
&lt;/s:SparkSkin&gt;
</pre>
<p>This is a default TextInput skin, but with an added Label at the end of the file, and you&#8217;ll also find the two new states added to the mix.  That&#8217;s all it takes.</p>
<p><strong>UPDATE:</strong> After <a href="https://bugs.adobe.com/jira/browse/SDK-28118" target="_blank">looking around</a>, it seems that a prompt property will be added to Flex 4.5.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelboudreau.com/2010/11/24/textinput-prompt-component/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>FirebugLoggerTarget Class</title>
		<link>http://www.michelboudreau.com/2010/07/13/firebugloggertarget-class/</link>
		<comments>http://www.michelboudreau.com/2010/07/13/firebugloggertarget-class/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 04:29:07 +0000</pubDate>
		<dc:creator>Michel Boudreau</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[firebuglogger]]></category>
		<category><![CDATA[firebugloggertarget]]></category>
		<category><![CDATA[lab49]]></category>
		<category><![CDATA[tracetarget]]></category>
		<category><![CDATA[utility]]></category>

		<guid isPermaLink="false">http://www.michelboudreau.com/?p=358</guid>
		<description><![CDATA[Some of you might of seen my past post about ...]]></description>
			<content:encoded><![CDATA[<p>Some of you might of seen my past post about the <a href="http://www.michelboudreau.com/2009/04/29/firebuglogger-class/">FirebugLogger class</a>.  It was an easy way to have text show up in the Firebug console in Firefox and has proven itself quite useful.  However, since I&#8217;ve been using Parsley a lot lately I needed something new to show the output of Parsley in Firebug.  Parlsey uses the native Flex logging framework (like TraceTarget) when you specify it in the config.</p>
<p><span id="more-358"></span>What I&#8217;ve done is extend TraceTarget and include some code so that any output goes to Firebug.  Simple enough, but very useful when you don&#8217;t have to have your debugger always running to see the output.</p>
<pre class="brush: as3; title: ; notranslate">
package com.codemonkeycreative.utils
{
	import flash.external.ExternalInterface;

	import mx.formatters.DateFormatter;
	import mx.logging.ILogger;
	import mx.logging.LogEvent;
	import mx.logging.LogEventLevel;
	import mx.logging.targets.TraceTarget;

	public class FirebugLoggerTarget extends TraceTarget
	{
		private var _dateFormatter:DateFormatter = new DateFormatter();

		public function FirebugLoggerTarget()
		{
			super();
		}

		/**
		 * Overrides the main function of TraceTarget that gets triggered
		 * every time someone tries to log anything using a Logger
		 **/
		override public function logEvent(event:LogEvent):void
		{
			// send the event to be traced normally
			super.logEvent(event);
			// Find the level
			var levelType:String = getLevelString(event.level);
			var level:String = includeLevel?levelType.toUpperCase():'';

			// Date variables
			var date:String = &quot;&quot;;
			var d:Date = new Date();

			// Format date
			if(includeDate)
			{
				this._dateFormatter.formatString = &quot;MM/DD/YYYY&quot;;
				date = this._dateFormatter.format(d) + fieldSeparator;
			}

			// Format time
			if(includeTime)
			{
				this._dateFormatter.formatString = &quot;J:N:SS.QQQ&quot;;
				date += '[' + this._dateFormatter.format(d) + ']' + fieldSeparator;
			}

			// Find the category
			var category:String = includeCategory ? ILogger(event.target).category + fieldSeparator : &quot;&quot;;

            // Then output it in firebug
            if(ExternalInterface.available)
            {
				ExternalInterface.call(&quot;console.&quot;+levelType, date + level + category + event.message);
            }
		}

		/**
		 * Returns the string equivalend of the level enum.
		 * This is needed for firebug to understand the console output.
		 **/
		private function getLevelString(level:int):String
		{
     		switch(level)
			{
				case LogEventLevel.DEBUG:
					return 'debug';
					break;
				case LogEventLevel.INFO:
					return 'info';
					break;
				case LogEventLevel.WARN:
					return 'warn';
					break;
				case LogEventLevel.FATAL:
				case LogEventLevel.ERROR:
					return 'error';
					break;
				case LogEventLevel.ALL:
				default:
					return 'log';
					break;
			}
		}
	}
}
</pre>
<p>Simply create this class and include it in your project.  Then in your config file, just add the following line.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;utils:FirebugLoggerTarget level=&quot;{LogEventLevel.ALL}&quot; includeTime=&quot;true&quot; includeDate=&quot;true&quot; /&gt;
</pre>
<p>You just need to change the properties like you normally on TraceTarget and the class does the rest.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelboudreau.com/2010/07/13/firebugloggertarget-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New York Flex Meetup Group</title>
		<link>http://www.michelboudreau.com/2010/05/21/new-york-flex-meetup-group/</link>
		<comments>http://www.michelboudreau.com/2010/05/21/new-york-flex-meetup-group/#comments</comments>
		<pubDate>Fri, 21 May 2010 20:48:28 +0000</pubDate>
		<dc:creator>Michel Boudreau</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[group]]></category>
		<category><![CDATA[lab49]]></category>
		<category><![CDATA[Meet]]></category>
		<category><![CDATA[meetup]]></category>
		<category><![CDATA[new york]]></category>

		<guid isPermaLink="false">http://www.michelboudreau.com/?p=321</guid>
		<description><![CDATA[That&#8217;s right, it&#8217;s here, everyone rejoice. When I moved here ...]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s right, <a href="http://www.meetup.com/New-York-Flex-Meetup/">it&#8217;s here</a>, everyone rejoice.</p>
<p>When I moved here from Ottawa I thought to myself that NYC would be full of Flex gurus.  Sadly, that is not the case. I&#8217;ve met many developers, but very few experts in the field.</p>
<p>This is my way to try and change that.  I&#8217;m hoping that this will become the place where Flex developers of all skill levels meet, discuss, share and learn from each other.</p>
<p>If that interests you, join the group and come out to our inaugural meet June 7th. Pizza will be provided.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelboudreau.com/2010/05/21/new-york-flex-meetup-group/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Prepping Flash for War</title>
		<link>http://www.michelboudreau.com/2010/03/22/prepping-flash-for-war/</link>
		<comments>http://www.michelboudreau.com/2010/03/22/prepping-flash-for-war/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 15:44:41 +0000</pubDate>
		<dc:creator>Michel Boudreau</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[cairngorm]]></category>
		<category><![CDATA[compiler]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[lab49]]></category>
		<category><![CDATA[macromedia]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.michelboudreau.com/?p=258</guid>
		<description><![CDATA[Flash vs Silverlight vs HTML5; a no-holds barred grudge match ...]]></description>
			<content:encoded><![CDATA[<p>Flash vs Silverlight vs HTML5; a no-holds barred grudge match is brewing in this industry.  It will divide developers and companies where there was little contention in the past.  I doubt that this will end in a fatality, but the injuries will most likely fall to Adobe because of its current dominance in the field.  Each technology has its pros and cons, and multiple providers can co-exist, but companies need a reason to choose one over another. I predict most of the debate will be based around the development process; ease of development, quick prototyping, effectiveness of tools offered, development environments, unit testing, system integration, as well as application design and planning. If a company can make great applications in less time, it means that they can make more money.</p>
<p><span id="more-258"></span>I’m a fan of Flash, but like most things in life, it isn’t perfect.  Flex and Actionscript have been an integral part of my career and I would like them to continue to be so.  I would like to touch on certain concepts that I think would add more value to the current software offerings and in turn give Adobe an edge over the competition.</p>
<p>Time is an important asset for a company, which is why increasing development efficiency will be a key factor in winning this war. I&#8217;m talking about reducing the compiler time, making it smarter and bug free, and adding 64bit support to utilise workstation performance. This improvement can save valuable minutes or even hours depending on the developer.</p>
<p>Speaking of development efficiency, I also suggest that Flash Builder starts supporting Linux.  Adobe doesn&#8217;t even have to officially support it, just make sure the eclipse plug-in can work in a Linux environment with or without design view (I personally never use it).  The <a href="http://bugs.adobe.com/jira/browse/FB-19053" target="_blank">feature request</a> for having Flash Builder on Linux is one of the most popular requests on the Adobe bug tracker.</p>
<p>Irritations while using Flash products also need to be eliminated. I personally enjoy development work (geek alert!), but when something doesn&#8217;t work like expected, it frustrates me to no end. The Flex framework is fairly good at doing exactly that; it’s supposed to save time, and it does, but there are some components that have been buggy ever since its inception and they aren&#8217;t being fixed.</p>
<p>The next point is cause for debate between developers, in the end it comes down to preference, but it needs to be addressed. Of course, I&#8217;m talking about Cairngorm &#8211; or more specifically your decision to support it. I personally don&#8217;t think MVC is the pattern to use when handling a Flex application, and other developers in the community agree; hence the creation of several new open<del datetime="2010-03-29T13:45" cite="mailto:Michel%20Boudreau">-</del><ins datetime="2010-03-29T13:45" cite="mailto:Michel%20Boudreau"> </ins>source frameworks. It seems to me that Adobe is playing favorites with Cairngorm and could instead use that development effort in a more productive way.  Adobe should work on enhancing the Flash API and opening up doors to allow third party frameworks to improve their usability.</p>
<p>With complex applications come crucial new ways to design the flow and interaction within the system.  For that, a developer needs tools to show this visually.  Tools like wireframe UI timeline or UML round-trip engineering can combine both design and functionality in a uniform way that all developers can understand.  A lot could be learned from Java and their tools: e.g. offering code hot-swapping to greatly reduce debugging time.</p>
<p>If Adobe is serious about creating a developer language, then a more complex language needs to be their goal.  Multiple-inheritance, polymorphism, overloading, enumerators, abstract classes, destructors, private constructors, decimal data type, threading support &#8211; these are only a few of the things that Actionscript is lacking. Some would argue that there are a lot more. I&#8217;m not saying it&#8217;s a bad language, after all, it does do what it&#8217;s supposed to do, but with bigger systems come more architectural complexities that the current language cannot support.</p>
<p>A common topic when debating Silverlight vs Flex is the lack of multi-threading.  I really do hope that this will be implemented in the next iteration of the language because the possibilities it would open would be mind-blowing.  Imagine a system that can execute complex algorithms and computations without disrupting the user experience; that would be a major improvement! Heck, even if the language doesn&#8217;t give developers access to threads, just allowing the player to run different threads for visual components and for computations would be a great improvement.</p>
<p>Let me leave you with this: I&#8217;ve been a fan of Adobe since I was a kid, and I still am. If any business is capable of surmounting the upcoming challenge, it will be Adobe. I believe that the community surrounding this product will be a key factor in this war; if Adobe listens and responds to our suggestions, only great things can happen. <del datetime="2010-03-29T13:45" cite="mailto:Michel%20Boudreau"></del></p>
<p>Speaking of community, I invite all developers and designers to debate and comment on this topic. I think it is one that will be talked about for quite some time to come.  I&#8217;d also like to thank <a href="http://joemorrison.org/blog/" target="_blank">Joe Morrison</a>, a Director at Lab49, for letting me bounce ideas off of him.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelboudreau.com/2010/03/22/prepping-flash-for-war/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 4/30 queries in 0.009 seconds using disk: basic
Object Caching 507/578 objects using disk: basic

Served from: www.michelboudreau.com @ 2012-05-21 06:40:21 -->
