<?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>Mike Chambers &#187; Flex</title>
	<atom:link href="http://www.mikechambers.com/blog/category/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikechambers.com/blog</link>
	<description>code = joy</description>
	<lastBuildDate>Sun, 15 Jan 2012 05:46:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Data Binding with FXG in Flex 4</title>
		<link>http://www.mikechambers.com/blog/2008/08/29/data-binding-with-fxg-in-flex-4/</link>
		<comments>http://www.mikechambers.com/blog/2008/08/29/data-binding-with-fxg-in-flex-4/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 20:00:05 +0000</pubDate>
		<dc:creator>mikechambers</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[flex flex4 fxg]]></category>

		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1403</guid>
		<description><![CDATA[One of the cool things about FXG is that it works with Flex data-binding just as your would expect it to. Below is a simple example (which requires Flash Player 10 RC), followed the code, that shows data-binding with FXG and Flex 4: As you can see, there are still some bugs in the rendering, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.mikechambers.com%2Fblog%2F2008%2F08%2F29%2Fdata-binding-with-fxg-in-flex-4%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif&amp;source=mesh&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>One of the cool things about <a href="http://opensource.adobe.com/wiki/display/flexsdk/FXG+1.0+Specification">FXG</a> is that it works with Flex data-binding just as your would expect it to.</p>
<p>Below is a simple example (which requires <a href="http://labs.adobe.com/technologies/flashplayer10/">Flash Player 10 RC</a>), followed the code, that shows data-binding with FXG and <a href="http://www.mikechambers.com/blog/2008/08/27/everything-there-is-to-know-about-flex-4-gumbo/">Flex 4</a>:<br />
<span id="more-1403"></span><br />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="DisplayObjectTest" width="750" height="500" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"><param name="movie" value="/mesh/files/examples/fxgbinding/FXGBinding.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="allowScriptAccess" value="sameDomain" /><embed src="/mesh/files/examples/fxgbinding/FXGBinding.swf" quality="high" bgcolor="#ffffff" width="750" height="500" name="DisplayObjectTest" align="middle" play="true" loop="false" quality="high" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"></embed></object></p>
<p>As you can see, there are still some bugs in the rendering, but that is to be expected as these are very early Flex 4 builds.</p>
<p>Source</p>
<div class="highlight">
<pre><span style="color: #BC7A00">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;</span>
<span style="color: #008000; font-weight: bold">&lt;mx:Application</span>
	<span style="color: #7D9029">xmlns:mx=</span><span style="color: #BA2121">&quot;library:adobe/flex/halo&quot;</span>
	<span style="color: #7D9029">xmlns=</span><span style="color: #BA2121">&quot;http://ns.adobe.com/mxml/2009&quot;</span>
	<span style="color: #7D9029">xmlns:gumbo=</span><span style="color: #BA2121">&quot;library:adobe/flex/gumbo&quot;</span>
	<span style="color: #7D9029">verticalCenter=</span><span style="color: #BA2121">&quot;0&quot;</span> <span style="color: #7D9029">horizontalCenter=</span><span style="color: #BA2121">&quot;0&quot;</span>
	<span style="color: #7D9029">layout=</span><span style="color: #BA2121">&quot;vertical&quot;</span><span style="color: #008000; font-weight: bold">&gt;</span>

	<span style="color: #008000; font-weight: bold">&lt;gumbo:Group</span> <span style="color: #7D9029">verticalCenter=</span><span style="color: #BA2121">&quot;0&quot;</span> <span style="color: #7D9029">horizontalCenter=</span><span style="color: #BA2121">&quot;0&quot;</span><span style="color: #008000; font-weight: bold">&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;Rect</span> <span style="color: #7D9029">width=</span><span style="color: #BA2121">&quot;300&quot;</span> <span style="color: #7D9029">height=</span><span style="color: #BA2121">&quot;200&quot;</span> <span style="color: #7D9029">radiusX=</span><span style="color: #BA2121">&quot;{radiusSlider.value}&quot;</span>
			<span style="color: #7D9029">radiusY=</span><span style="color: #BA2121">&quot;{radiusSlider.value}&quot;</span><span style="color: #008000; font-weight: bold">&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;fill&gt;</span>
				<span style="color: #008000; font-weight: bold">&lt;SolidColor</span> <span style="color: #7D9029">color=</span><span style="color: #BA2121">&quot;{fillColor.selectedColor}&quot;</span> <span style="color: #008000; font-weight: bold">/&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;/fill&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;stroke&gt;</span>
				<span style="color: #008000; font-weight: bold">&lt;SolidColorStroke</span> <span style="color: #7D9029">weight=</span><span style="color: #BA2121">&quot;{strokeSlider.value}&quot;</span>
					<span style="color: #7D9029">color=</span><span style="color: #BA2121">&quot;{strokeColor.selectedColor}&quot;</span> <span style="color: #7D9029">alpha=</span><span style="color: #BA2121">&quot;1&quot;</span> <span style="color: #008000; font-weight: bold">/&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;/stroke&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;/Rect&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;/gumbo:Group&gt;</span>

	<span style="color: #008000; font-weight: bold">&lt;mx:Label</span> <span style="color: #7D9029">text=</span><span style="color: #BA2121">&quot;Corner Radius&quot;</span> <span style="color: #008000; font-weight: bold">/&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;mx:HSlider</span> <span style="color: #7D9029">minimum=</span><span style="color: #BA2121">&quot;0&quot;</span> <span style="color: #7D9029">maximum=</span><span style="color: #BA2121">&quot;100&quot;</span> <span style="color: #7D9029">id=</span><span style="color: #BA2121">&quot;radiusSlider&quot;</span> <span style="color: #7D9029">liveDragging=</span><span style="color: #BA2121">&quot;true&quot;</span><span style="color: #008000; font-weight: bold">/&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;mx:Label</span> <span style="color: #7D9029">text=</span><span style="color: #BA2121">&quot;Stroke Weight&quot;</span> <span style="color: #008000; font-weight: bold">/&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;mx:HSlider</span> <span style="color: #7D9029">minimum=</span><span style="color: #BA2121">&quot;0&quot;</span> <span style="color: #7D9029">maximum=</span><span style="color: #BA2121">&quot;20&quot;</span> <span style="color: #7D9029">value=</span><span style="color: #BA2121">&quot;5&quot;</span> <span style="color: #7D9029">id=</span><span style="color: #BA2121">&quot;strokeSlider&quot;</span> <span style="color: #7D9029">liveDragging=</span><span style="color: #BA2121">&quot;true&quot;</span><span style="color: #008000; font-weight: bold">/&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;mx:Label</span> <span style="color: #7D9029">text=</span><span style="color: #BA2121">&quot;Stroke Color&quot;</span> <span style="color: #008000; font-weight: bold">/&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;mx:ColorPicker</span> <span style="color: #7D9029">id=</span><span style="color: #BA2121">&quot;strokeColor&quot;</span> <span style="color: #7D9029">selectedColor=</span><span style="color: #BA2121">&quot;0x333333&quot;</span> <span style="color: #008000; font-weight: bold">/&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;mx:Label</span> <span style="color: #7D9029">text=</span><span style="color: #BA2121">&quot;Fill Color&quot;</span> <span style="color: #008000; font-weight: bold">/&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;mx:ColorPicker</span> <span style="color: #7D9029">id=</span><span style="color: #BA2121">&quot;fillColor&quot;</span> <span style="color: #7D9029">selectedColor=</span><span style="color: #BA2121">&quot;0x999999&quot;</span> <span style="color: #008000; font-weight: bold">/&gt;</span>

<span style="color: #008000; font-weight: bold">&lt;/mx:Application&gt;</span>
</pre>
</div>
<p>You can of course, read more details on this in the <a href="http://opensource.adobe.com/wiki/display/flexsdk/FXG+1.0+Specification">FXG 1.0 Specification</a>.</p>
<p>I also have a post on how to <a href="http://www.mikechambers.com/blog/2008/08/28/getting-started-with-flex-4-fxg-and-flex-builder-3/">get started with Flex 4 FXG in Flex Builder 3</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikechambers.com/blog/2008/08/29/data-binding-with-fxg-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Defining and Reusing Symbols in Flex 4 FXG</title>
		<link>http://www.mikechambers.com/blog/2008/08/29/defining-and-reusing-symbols-in-flex-4-fxg/</link>
		<comments>http://www.mikechambers.com/blog/2008/08/29/defining-and-reusing-symbols-in-flex-4-fxg/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 17:04:25 +0000</pubDate>
		<dc:creator>mikechambers</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[flex flex4 fxg]]></category>

		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1399</guid>
		<description><![CDATA[If you have done Flash development using the Flash Authoring tool, or have done any low level work with the SWF format, then you should be familiar with the concept of symbols. Basically a symbol is a reusable object (graphics, buttons, MovieClip) that can be included in the SWF once, but referenced and used many [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.mikechambers.com%2Fblog%2F2008%2F08%2F29%2Fdefining-and-reusing-symbols-in-flex-4-fxg%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif&amp;source=mesh&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>If you have done Flash development using the Flash Authoring tool, or have done any low level work with the SWF format, then you should be familiar with the concept of symbols. Basically a symbol is a reusable object (graphics, buttons, MovieClip) that can be included in the SWF once, but referenced and used many times.</p>
<p>Flex 4 <a href="http://opensource.adobe.com/wiki/display/flexsdk/FXG+1.0+Specification">FXG</a> has a similar concept of symbol, although the actual underlying implimentation is different. Using the <code>Library</code> and <code>Definition</code> elements, you can define a graphic symbol, which can then be reused multiple times within the FXG or MXML document.<br />
<span id="more-1399"></span><br />
For example, here is our <a href="http://www.mikechambers.com/blog/2008/08/28/getting-started-with-flex-4-fxg-and-flex-builder-3/">HelloWorld example from yesterday</a>, which uses a symbol to display the content, as opposed to just generating it inline:</p>
<div class="highlight">
<pre><span style="color: #BC7A00">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;</span>
<span style="color: #008000; font-weight: bold">&lt;Application</span>
	<span style="color: #7D9029">xmlns:mx=</span><span style="color: #BA2121">&quot;library:adobe/flex/halo&quot;</span>
	<span style="color: #7D9029">xmlns=</span><span style="color: #BA2121">&quot;http://ns.adobe.com/mxml/2009&quot;</span>
	<span style="color: #7D9029">xmlns:gumbo=</span><span style="color: #BA2121">&quot;library:adobe/flex/gumbo&quot;</span><span style="color: #008000; font-weight: bold">&gt;</span>

	<span style="color: #008000; font-weight: bold">&lt;Library&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;Definition</span> <span style="color: #7D9029">name=</span><span style="color: #BA2121">&quot;HelloWorldText&quot;</span><span style="color: #008000; font-weight: bold">&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;gumbo:Group&gt;</span>
				<span style="color: #008000; font-weight: bold">&lt;TextGraphic</span> <span style="color: #7D9029">fontFamily=</span><span style="color: #BA2121">&quot;Verdana&quot;</span> <span style="color: #7D9029">fontWeight=</span><span style="color: #BA2121">&quot;bold&quot;</span><span style="color: #008000; font-weight: bold">&gt;</span>
					<span style="color: #008000; font-weight: bold">&lt;content&gt;</span>Hello, World<span style="color: #008000; font-weight: bold">&lt;/content&gt;</span>
				<span style="color: #008000; font-weight: bold">&lt;/TextGraphic&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;/gumbo:Group&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;/Definition&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;/Library&gt;</span>

	<span style="color: #408080; font-style: italic">&lt;!-- Flex 4 Hello World with FXG --&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;mx:Canvas</span> <span style="color: #7D9029">top=</span><span style="color: #BA2121">&quot;0&quot;</span> <span style="color: #7D9029">bottom=</span><span style="color: #BA2121">&quot;0&quot;</span> <span style="color: #7D9029">left=</span><span style="color: #BA2121">&quot;0&quot;</span> <span style="color: #7D9029">right=</span><span style="color: #BA2121">&quot;0&quot;</span><span style="color: #008000; font-weight: bold">&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;gumbo:Group</span> <span style="color: #7D9029">verticalCenter=</span><span style="color: #BA2121">&quot;0&quot;</span> <span style="color: #7D9029">horizontalCenter=</span><span style="color: #BA2121">&quot;0&quot;</span><span style="color: #008000; font-weight: bold">&gt;</span>
			<span style="color: #008000; font-weight: bold">&lt;HelloWorldText</span> <span style="color: #008000; font-weight: bold">/&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;/gumbo:Group&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;/mx:Canvas&gt;</span>

	<span style="color: #408080; font-style: italic">&lt;!-- reference the symbol again --&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;gumbo:Group</span> <span style="color: #7D9029">left=</span><span style="color: #BA2121">&quot;5&quot;</span> <span style="color: #7D9029">bottom=</span><span style="color: #BA2121">&quot;5&quot;</span><span style="color: #008000; font-weight: bold">&gt;</span>
		<span style="color: #008000; font-weight: bold">&lt;HelloWorldText</span> <span style="color: #008000; font-weight: bold">/&gt;</span>
	<span style="color: #008000; font-weight: bold">&lt;/gumbo:Group&gt;</span>
<span style="color: #008000; font-weight: bold">&lt;/Application&gt;</span>
</pre>
</div>
<p>Pay attention to the namespace usage as right now, it can be a little tricky.</p>
<p>Notice that once we define a symbol, we can then reuse it multiple times by referencing its name attribute as if it was a native FXG element.</p>
<p>A <code>Library</code> element must contain one of more <code>Definition</code> elements. A <code>Definition</code> element must have a <code>name</code> attribute and contain one <code>Group</code> element.</p>
<p>One thing to keep in mind, is that currently, this is code that is executed at runtime, and thus underneath the hood, FXG is not creating actual SWF symbols at compile time. However, that is something that we are looking at to optimize working with static assets.</p>
<p>You can of course, read more details on this in the <a href="http://opensource.adobe.com/wiki/display/flexsdk/FXG+1.0+Specification">FXG 1.0 Specification</a>.</p>
<p>I also have a post on how to <a href="http://www.mikechambers.com/blog/2008/08/28/getting-started-with-flex-4-fxg-and-flex-builder-3/">get started with Flex 4 FXG in Flex Builder 3</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikechambers.com/blog/2008/08/29/defining-and-reusing-symbols-in-flex-4-fxg/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Everything there is to know about Flex 4 / Gumbo</title>
		<link>http://www.mikechambers.com/blog/2008/08/27/everything-there-is-to-know-about-flex-4-gumbo/</link>
		<comments>http://www.mikechambers.com/blog/2008/08/27/everything-there-is-to-know-about-flex-4-gumbo/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 18:06:14 +0000</pubDate>
		<dc:creator>mikechambers</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=1377</guid>
		<description><![CDATA[About a month ago, the Flex team announced that nightly builds of the next version of Flex (code named Gumbo) were now available on the opensource Flex site. Along with early versions of the SDK, the team also posted a ton of other information, including specs and API docs. Below is a listing of links [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.mikechambers.com%2Fblog%2F2008%2F08%2F27%2Feverything-there-is-to-know-about-flex-4-gumbo%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif&amp;source=mesh&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>About a month ago, the Flex team <a href="http://blogs.adobe.com/flex/archives/2008/07/more_information_on_next_versi.html">announced</a> that nightly builds of the next version of Flex (code named Gumbo) were now available on the <a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo">opensource Flex site</a>. Along with early versions of the SDK, the team also posted a ton of other information, including specs and API docs. </p>
<p>Below is a listing of links and resources about Gumbo / Flex 4. Going through these will quickly get your up to speed on what is being worked on in Flex 4, and get your ready for playing around with the new builds.<br />
<span id="more-1377"></span><br />
Official opensource project page<br />
<a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo">http://opensource.adobe.com/wiki/display/flexsdk/Gumbo</a></p>
<p>Flex 4 Downloads<br />
<a href="http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a></p>
<p>Gumbo Themes<br />
<a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+Themes">http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+Themes</a></p>
<p>An Introduction to the Gumbo Component Architecture<br />
<a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+Component+Architecture">http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+Component+Architecture</a></p>
<p>Flex 4 Language / API Reference<br />
<a href="http://livedocs.adobe.com/flex/gumbo/langref/">http://livedocs.adobe.com/flex/gumbo/langref/</a></p>
<p><strong>Videos</strong><br />
The Next Dimension of Rich Experiences (360 Flex Keynote) Mark Anders<br />
<a href="http://link.brightcove.com/services/link/bcpid1753161885/bctid1741161343">http://link.brightcove.com/services/link/bcpid1753161885/bctid1741161343</a></p>
<p>Flex SDK Next Plan (Matt Chotin)<br />
<a href="http://flexorg.wip3.adobe.com/gumbo/gumboplan.htm">http://flexorg.wip3.adobe.com/gumbo/gumboplan.htm</a></p>
<p>Flex 4 Skinning Architechture : Deepa Subramaniam<br />
<a href="http://bit.ly/46xv4V">http://bit.ly/46xv4V</a></p>
<p>Designer / Developer Workflow in Flex 4 (Ely Greenfield)<br />
<a href="http://bit.ly/zM2h2">http://bit.ly/zM2h2</a></p>
<p><strong>Feature Specifications</strong></p>
<ul>
<li><a href="http://opensource.adobe.com/wiki/display/flexsdk/FXG+1.0+Specification">FXG 1.0</a> (Graphic Interchange Format)</li>
<li><a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+Skinning">Skinning and Skinnable Components</a></li>
<li><a href="http://opensource.adobe.com/wiki/display/flexsdk/Enhanced+States+Syntax">Enchanced States Syntax</a></li>
<li><a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+Group+Specification">Group Containter</a></li>
<li><a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+ItemsComponent+and+Selector">Items Component and Selector</a></li>
<li><a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+Layout">Layout Interface</a></li>
<li><a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+Application">Application Component</a></li>
<li><a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+Text+Primitives">Text Primitives</a></li>
<li><a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+TextInput">TextInput Component</a></li>
<li><a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+TextArea">TextArea Component</a></li>
<li><a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+ScrollBar">ScrollBar Component</a></li>
<li><a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+Range">Range Class</a></li>
<li><a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+TrackBase">Track Base Class</a></li>
<li><a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+Slider">Slider Component</a></li>
<li><a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+Spinner">Spinner Component</a></li>
<li><a href="http://opensource.adobe.com/wiki/display/flexsdk/Gumbo+NumericStepper">Numeric Stepper Component</a></li>
<li><a href="http://opensource.adobe.com/wiki/display/flexsdk/MXML+2009">MXML 2009</a></li>
</ul>
<p>Podcast : The Future of Flex : Matt Chotin on the Flex Show<br />
<a href="http://www.theflexshow.com/blog/index.cfm/2008/7/30/The-Flex-Show--Episode-49-The-Future-of-Flex-with-Matt-Chotin">http://www.theflexshow.com/blog/index.cfm/2008/7/30/The-Flex-Show&#8211;Episode-49-The-Future-of-Flex-with-Matt-Chotin</a></p>
<p><strong>More Resources</strong><br />
Flex Developer Forums<br />
<a href="http://www.adobeforums.com/webx/.3c060f85/">http://www.adobeforums.com/webx/.3c060f85/</a></p>
<p>Flex Team Blog<br />
<a href="http://blogs.adobe.com/flex/">http://blogs.adobe.com/flex/</a></p>
<p>Sean Moore also has a good link round up on his <a href="http://seantheflexguy.com/blog/2008/08/02/flex-4-gumbo-link-roundup-from-getting-started-to-skinning/">blog</a>.</p>
<p>If you have any more resources or links, post them in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikechambers.com/blog/2008/08/27/everything-there-is-to-know-about-flex-4-gumbo/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Flex Builder 2 free for students and educators</title>
		<link>http://www.mikechambers.com/blog/2007/10/24/flex-builder-2-free-for-students-and-educators/</link>
		<comments>http://www.mikechambers.com/blog/2007/10/24/flex-builder-2-free-for-students-and-educators/#comments</comments>
		<pubDate>Thu, 25 Oct 2007 06:30:18 +0000</pubDate>
		<dc:creator>mikechambers</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.mikechambers.com/blog/2007/10/24/flex-builder-2-free-for-students-and-educators/</guid>
		<description><![CDATA[From the press release: Adobe Systems Incorporated (Nasdaq:ADBE) today announced that it is offering AdobeÂ® Flexâ„¢ Builderâ„¢ 2 software at no cost to students and faculty at educational institutions worldwide&#8230;. Adobe Flex 2 will be available to qualified education end-users for free download on Adobe.com in early November. You can read the entire press release [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.mikechambers.com%2Fblog%2F2007%2F10%2F24%2Fflex-builder-2-free-for-students-and-educators%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif&amp;source=mesh&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>From the press release:</p>
<blockquote><p>Adobe Systems Incorporated (Nasdaq:ADBE) today announced that it is offering AdobeÂ® Flexâ„¢ Builderâ„¢ 2 software at no cost to students and faculty at educational institutions worldwide&#8230;. Adobe Flex 2 will be available to qualified education end-users for free download on Adobe.com in early November.</p></blockquote>
<p>You can read the entire press release <a href="http://www.adobe.com/aboutadobe/pressroom/pressreleases/200710/102407adobeflexedu.html">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikechambers.com/blog/2007/10/24/flex-builder-2-free-for-students-and-educators/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Sorting Date fields in a DataGrid in the Flex Framework</title>
		<link>http://www.mikechambers.com/blog/2005/04/27/sorting-date-fields-in-a-datagrid-in-the-flex-framework/</link>
		<comments>http://www.mikechambers.com/blog/2005/04/27/sorting-date-fields-in-a-datagrid-in-the-flex-framework/#comments</comments>
		<pubDate>Wed, 27 Apr 2005 22:32:53 +0000</pubDate>
		<dc:creator>mikechambers</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=863</guid>
		<description><![CDATA[I was working on some new mini chart apps over the weekend for the MXNA reports section, and had a DataGrid that contained dates. I wanted to allow the user to sort the datagrid by the DateField, but by default the DataGrid sorts dates with a string compare (calling toString on the Date instance). I [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.mikechambers.com%2Fblog%2F2005%2F04%2F27%2Fsorting-date-fields-in-a-datagrid-in-the-flex-framework%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif&amp;source=mesh&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I was working on some new mini chart apps over the weekend for the <a href="http://weblogs.macromedia.com/mxna/reports/">MXNA reports section</a>, and had a DataGrid that contained dates. I wanted to allow the user to sort the datagrid by the DateField, but by default the DataGrid sorts dates with a string compare (calling toString on the Date instance).</p>
<p>I tried to set up a custom sort function for the DataGridColumn instance that contained the dates, but because I was using a custom label format function for the column, Flex passed the labels to me, and not the data items (which would allow me to get access to the Date instance). Because of this, I couldn&#8217;t sort on the date.</p>
<p><span id="more-863"></span></p>
<p>There is an <a href="http://www.macromedia.com/support/documentation/en/flex/1_5/releasenotes.html#latenews">example on Macromedia.com</a> that shows how to sort by dates, but it requires that you override and implement all sorting for the DataGrid (something which seemed unecessary and overkill to me). Peter Ent also <a href="/pent/archives/006686.cfm">posted an example</a>, but it required massaging the data on the server first, something which was not an option for me since I was using a public web service API.</p>
<p>So, after much trial and error, and help from <a href="/mchotin/">Matt Chotin</a>, I finally got it working, and figured I would post it here.</p>
<p>Basically, I listen for the headerRelease event for the DataGrid. If it is in response to the date column being clicked, then I sort the dataprovider that the DataGrid is hooked up to (otherwise, I do nothing, and let the DataGrid do the sorting).</p>
<p>Here is an example:</p>
<p>    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub shockwave/cabs/flash/swflash.cab#version=7,0,14,0" width="475" height="350"><param name="movie" value="/mesh/files/DateSortExample/DateSortExample.swf"/><param name="quality" value="high"/><param name="bgcolor" value="#ffffff"/><embed src="/mesh/files/DateSortExample/DateSortExample.swf" quality="high" bgcolor="#ffffff" width="475" height="350" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/gogetflashplayer"></embed></object></p>
<p>Here is the Code:</p>
<p>&#8212;&#8212;&#8212;-DateSortExample.mxml&#8212;&#8212;&#8212;-</p>
<p><code>
<pre>&lt;?xml version="1.0"?&gt;

&lt;mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" initialize="initTag()"
	backgroundColor="0xFFFFFF" marginTop="0" marginLeft="0" marginRight="0" marginBottom="0"&gt;		

	&lt;mx:Script source="DateSortExample.as" /&gt;   

	&lt;mx:Panel title="DataGrid Date sorting example" width="475" height="350"&gt;

	    &lt;mx:DataGrid id="dg" height="100%" width="100%"&gt;
	        	&lt;mx:columns&gt;
		        &lt;mx:Array&gt;
            	        &lt;mx:DataGridColumn headerText="Letters" width="50" columnName="letter" /&gt;
            	        &lt;mx:DataGridColumn headerText="Numbers" width="50" columnName="number" /&gt;
            	        &lt;mx:DataGridColumn headerText="Dates" columnName="date" /&gt;
            	   &lt;/mx:Array&gt;
            	&lt;/mx:columns&gt;
	    &lt;/mx:DataGrid&gt;

	&lt;/mx:Panel&gt;
&lt;/mx:Application&gt;</pre>
<p></code></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>&#8212;&#8212;&#8212;-DateSortExample.as&#8212;&#8212;&#8212;-</p>
<p><code>
<pre>

private var dp:Array;
private var sortOrder:Number = 1;

private  function initTag():Void
{
	//listend for the headerRelease event on the datagrid, which is broadcast
	//when any of the column headers are clicked.
	dg.addEventListener("headerRelease",
		mx.utils.Delegate.create(this, onDateHeaderRelease));

	dp = new Array();

	//pupulate the date grid with some data.
	var item:Object;
	var randomDay:Number;
	var randomMonth:Number;
	for(var i:Number = 0; i &lt; 15; i++)
	{
		randomDay = Math.floor(Math.random() * 30);
		randomMonth = Math.floor(Math.random() * 12);

		item = new Object();
		item.date = new Date(2005, randomMonth, randomDay);
		item.letter = String.fromCharCode(i + 65);
		item.number = i;

		dp.push(item);
	}

	//set the dataProvider for the datagrid
	dg.dataProvider = dp;
}

//Note, this should be in a DateUtils class
/*
	returns
	-1 : first date is larger than the second
	 1 : first date is smaller than the second
	 0 : Both dates are the same
*/
private static function compareDates(d1:Date, d2:Date):Number
{
	var d1ms:Number = d1.getTime();
	var d2ms:Number = d2.getTime();

	if(d1ms &gt; d2ms)
	{
		return -1;
	}
	else if(d1ms &lt; d2ms)
	{
		return 1;
	}
	else
	{
		return 0;
	}
}

//compares the dates
private function dateFieldCompare(item1:Object, item2:Object, bit:Number):Number
{
	//determine which way the column should be sorted (ASC or DESC
	var toggle:Number = (bit == Array.DESCENDING)? 1 : -1;

	//call compare date function, and then toggle the sort direction
	return toggle * compareDates(item1.date,item2.date);
}

//called when any of the datagrids column headings are clicked
private function onDateHeaderRelease(eventObj:Object):Void
{
	//Only sort if the Date column head was clicked
	if(eventObj.columnIndex == 2)
	{
		//sort the dataProvider directly, passing the function to do the sort
		//and a bit indicating whether to sort ascending or descending
		dp.sortItems(dateFieldCompare, ((sortOrder == 1)? 0: Array.DESCENDING));

		//reverse the sort order so the next time the column is clicked, it is
		//sorted in the reverse order
		sortOrder *= -1;
	}
}</pre>
<p></code></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>You can download the source from <a href="/mesh/files/DateSortExample/DateSortExample.zip">here</a> (or right click on the example).</p>
<p><!-- Creative Commons License --><br />
<a rel="license" href="http://creativecommons.org/licenses/by/2.0/"><img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights20.gif" /></a></p>
<p>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/2.0/">Creative Commons License</a>.<br />
<!-- /Creative Commons License --></p>
<p><!--</p>
<p><rdf:RDF xmlns="http://web.resource.org/cc/"<br />
    xmlns:dc="http://purl.org/dc/elements/1.1/"<br />
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><br />
<Work rdf:about=""></p>
<license rdf:resource="http://creativecommons.org/licenses/by/2.0/" />
</Work></p>
<p><License rdf:about="http://creativecommons.org/licenses/by/2.0/"></p>
<permits rdf:resource="http://web.resource.org/cc/Reproduction" />
<permits rdf:resource="http://web.resource.org/cc/Distribution" />
   <requires rdf:resource="http://web.resource.org/cc/Notice" /><br />
   <requires rdf:resource="http://web.resource.org/cc/Attribution" /></p>
<permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
</License></p>
<p></rdf:RDF><br />
&#8211;></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikechambers.com/blog/2005/04/27/sorting-date-fields-in-a-datagrid-in-the-flex-framework/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Subclassing the mx:Application Tag in Flex</title>
		<link>http://www.mikechambers.com/blog/2004/10/08/subclassing-the-mxapplication-tag-in-flex/</link>
		<comments>http://www.mikechambers.com/blog/2004/10/08/subclassing-the-mxapplication-tag-in-flex/#comments</comments>
		<pubDate>Fri, 08 Oct 2004 20:25:59 +0000</pubDate>
		<dc:creator>mikechambers</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.mikechambers.com/blog/?p=821</guid>
		<description><![CDATA[Now that there is a Free non-commercial license for Flex, I thought I would spend a little time playing around with it. I went through this great tutorial by Robert Crooks, and was pretty impressed by how quick it was to put together the simple application. However, one thing felt weird to me, and that [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.mikechambers.com%2Fblog%2F2004%2F10%2F08%2Fsubclassing-the-mxapplication-tag-in-flex%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif&amp;source=mesh&amp;style=normal&amp;service=bit.ly&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Now that there is a <a href="http://www.macromedia.com/macromedia/proom/pr/2004/flex_ncni_license.html">Free non-commercial license for Flex</a>, I thought I would spend a little time playing around with it.</p>
<p>I went through this <a href="http://www.macromedia.com/devnet/flex/articles/first_flexapp.html">great tutorial</a> by Robert Crooks, and was pretty impressed by how quick it was to put together the simple application. However, one thing felt weird to me, and that was mixing ActionScript in with my MXML. I am used to creating a class for my application controller. Including functions in an include file just felt weird to me (although behind the scenes they do get compiled into a class).</p>
<p>So, I asked around at Macromedia if it was possible for me to subclass the &lt;mx:Application&gt; tag with my custom class, and it turns out it is.</p>
<p>So, here is the modified code for the Coffee Application from Robert Crook&#8217;s <a href="http://www.macromedia.com/devnet/flex/articles/first_flexapp.html">tutorial</a>. This one uses a custom controller class that extends the Flex Application class.</p>
<p><span id="more-821"></span></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;CoffeeApp.mxml&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p><code>
<pre>
&lt;?xml version="1.0"?&gt;

&lt;mc:CoffeeApp xmlns:mc="mc.*" xmlns:mx="http://www.macromedia.com/2003/mxml"&gt;

	&lt;mx:Panel title="My First Flex App"&gt;
		&lt;mx:Label text="Coffee Blends" /&gt;
		&lt;mx:ComboBox id="coffeeCombo" dataProvider="{coffeeArray}" /&gt;
		&lt;mx:Text text="Description: {coffeeCombo.selectedItem.data}" width="100%" /&gt;
		&lt;mx:Button label="Add to Cart" click="addToCart()" /&gt;
		&lt;mx:List id="cart" /&gt;
	&lt;/mx:Panel&gt;

&lt;/mc:CoffeeApp&gt;</pre>
<p></code></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;CoffeeApp.as&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p><code>
<pre>
//located in /WEB-INF/flex/user_classes/mc

class mc.CoffeeApp extends mx.core.Application
{
	var coffeeArray:Array;
	var cart:mx.controls.List;
	var coffeeCombo:mx.controls.ComboBox;

	function CoffeeApp()
	{
		coffeeArray = new Array();

		coffeeArray.push({label:"Red Sea", data:"Smooth and Fragrant"});
		coffeeArray.push({label:"Andes", data:"Rich and Pungent"});
		coffeeArray.push({label:"Blue Mountain", data:"Delicate and Refined"});
	}	

	function addToCart():Void
	{
		cart.addItem(coffeeCombo.selectedItem.label, coffeeCombo.selectedItem.data);
	}	

}
</pre>
<p></code></p>
<p>This works well, and feels a little more familiar to me. There are some draw backs to this though:</p>
<ul>
<li>You have to declare references to your MXML components within your ActionScript code and keep them in sync.</li>
<li>You are adding an extra class which has a small impact on memory usage.</li>
</ul>
<p>Personally, I am used to the first issue from doing development in Flash, and I don&#8217;t think the second issue is significant.</p>
<p>Anyways, I am still early in the process of understanding Flex and MXML, so I am not sure if this is a &#8220;good&#8221; or &#8220;bad&#8221; way to structure this.</p>
<p>Btw, thanks to Elliot Greenfield, Elliot Winfield and Matt Chotin for helping me figure out how to get this working.</p>
<p>Update : [10.11.2004] : Well after getting this to work, and developing for a couple of hours, I gave up on structuring my applications like this. Flex wasn&#8217;t really designed for this, so I ran into a couple of issues:</p>
<ul>
<li>Couldn&#8217;t declare my constructor as &#8220;function Constructor(Void)&#8221; as this confused flex and caused errors (this was easy to work around).</li>
<li>Flex would over-write my constructor (again, something I could work around).</li>
<li>Flex got confused when I gave a tag an ID, and then added a reference to the tag in the ActionScript class. Flex was including it twice in the auto-generated ActionScript code, which led to warnings.</li>
</ul>
<p>Again, Flex was really designed for this structure, and I didn&#8217;t feel like fighting to get it to work. I have gone back to just using the mx:Script tag and including my functions from an external as file. Thus far things have worked pretty well.</p>
<p>You can find more information on the new Free / Non-Commercial license for Flex <a href="http://www.macromedia.com/macromedia/proom/pr/2004/flex_ncni_license.html">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikechambers.com/blog/2004/10/08/subclassing-the-mxapplication-tag-in-flex/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

