<?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>Kyle Hayes &#124; Proficiency by Derivation &#187; Flex</title>
	<atom:link href="http://www.kylehayes.info/category/adobe-flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kylehayes.info</link>
	<description>Rich Internet solutions utilizing Flex, ActionScript, JavaScript, Dojo, Objective-C, and the iPhone</description>
	<lastBuildDate>Wed, 16 Jun 2010 14:54:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Scroll Through Tabs in Flex with Mouse Wheel</title>
		<link>http://www.kylehayes.info/2008/05/08/scroll-through-tabs-in-flex-with-mouse-wheel/</link>
		<comments>http://www.kylehayes.info/2008/05/08/scroll-through-tabs-in-flex-with-mouse-wheel/#comments</comments>
		<pubDate>Thu, 08 May 2008 10:05:00 +0000</pubDate>
		<dc:creator>Kyle Hayes</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[Innovation]]></category>
		<category><![CDATA[interaction]]></category>

		<guid isPermaLink="false">http://www.kylehayes.info/blog/index.cfm/2008/05/08/Scroll-Through-Tabs-in-Flex-with-Mouse-Wheel</guid>
		<description><![CDATA[I blogged the other day about an Office 2007 feature for the tabs that are apart of the ribbon in that you can use your scroll wheel to change the selected tab. I thought this was actually pretty cool. I decided to implement it in Flex because I figure it would be extremely easy&#8230; and [...]]]></description>
			<content:encoded><![CDATA[<p>I <a href="http://www.kylehayes.info/blog/index.cfm/2008/5/5/ScrollWheel-Functionality-in-Office-2007-Tabs">blogged the other day</a> about an Office 2007 feature for the tabs that are apart of the ribbon in that you can use your scroll wheel to change the selected tab. I thought this was actually pretty cool.</p>
<p>I decided to implement it in Flex because I figure it would be extremely easy&#8230; and it was! Took about 15 minutes total. However, it seems it is having issue when playing without a breakpoint in the code. Just playing through normally, when I scroll up or down, it actually seems to skip a tab when going through them. Yet, if I put a breakpoint at the beginning of the event handler and play through it that way, it goes to the next tab as it should.</p>
<p>Here is a demo of what I have done. Source is included&#8230;</p>
<p><a href="http://www.kylehayes.info/tabby/TabThumbWheel.html">http://www.kylehayes.info/tabby/TabThumbWheel.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kylehayes.info/2008/05/08/scroll-through-tabs-in-flex-with-mouse-wheel/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Why Flex and AIR?</title>
		<link>http://www.kylehayes.info/2008/03/02/why-flex-and-air/</link>
		<comments>http://www.kylehayes.info/2008/03/02/why-flex-and-air/#comments</comments>
		<pubDate>Sun, 02 Mar 2008 00:03:00 +0000</pubDate>
		<dc:creator>Kyle Hayes</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.kylehayes.info/blog/index.cfm/2008/03/02/Why-Flex-and-AIR</guid>
		<description><![CDATA[My first 30onair video:]]></description>
			<content:encoded><![CDATA[<p>My first <a href="http://www.30onair.com">30onair</a> video:<br />
<object width="425" height="373"><param name="movie" value="http://www.youtube.com/v/Ohf_B4Jk_UI&#038;color1=0x3a3a3a&#038;color2=0x999999&#038;border=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/Ohf_B4Jk_UI&#038;color1=0x3a3a3a&#038;color2=0x999999&#038;border=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="373"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kylehayes.info/2008/03/02/why-flex-and-air/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>10% off Flex Builder 3</title>
		<link>http://www.kylehayes.info/2008/02/26/Flex-Builder-30-10-off/</link>
		<comments>http://www.kylehayes.info/2008/02/26/Flex-Builder-30-10-off/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 19:02:00 +0000</pubDate>
		<dc:creator>Kyle Hayes</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.kylehayes.info/blog/index.cfm/2008/02/26/Flex-Builder-30-10-off</guid>
		<description><![CDATA[Yep, that&#8217;s right. Thanks to the handy-dandy site RetailMeNot.com I found a coupon code for 10% off any Adobe product sold in the online store. If your math is right, you will see that this makes the PRO upgrade at about $270 instead of $300. While you are at it, you might as well purchase [...]]]></description>
			<content:encoded><![CDATA[<p>Yep, that&#8217;s right. Thanks to the handy-dandy site <a href="http://www.retailmenot.com">RetailMeNot.com</a> I found a coupon code for 10% off any Adobe product sold in the online store. If your math is right, you will see that this makes the PRO upgrade at about $270 instead of $300. While you are at it, you might as well purchase the Creative Suite Web Premium bundle for $50 off.</p>
<p>Oh yeah, and the code you use is: DESIGNQ108</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kylehayes.info/2008/02/26/Flex-Builder-30-10-off/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Remotely Connect Your Flex/AIR App Without Services-Config</title>
		<link>http://www.kylehayes.info/2008/02/26/remotely-connect-your-flexair-app-without-servicesconfig/</link>
		<comments>http://www.kylehayes.info/2008/02/26/remotely-connect-your-flexair-app-without-servicesconfig/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 09:02:00 +0000</pubDate>
		<dc:creator>Kyle Hayes</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.kylehayes.info/blog/index.cfm/2008/02/26/Remotely-Connect-Your-FlexAIR-App-Without-ServicesConfig</guid>
		<description><![CDATA[Many developers have the question of how to define the infamous connections to the various AMF gateways to which they need to communicate through to their server-side code. The process, while usually handled through the famed services-config.xml file, can actually be handled directly in your ActionScript very easily. The examples below are showing connecting to [...]]]></description>
			<content:encoded><![CDATA[<p>Many developers have the question of how to define the infamous connections to the various AMF gateways to which they need to communicate through to their server-side code. The process, while usually handled through the famed services-config.xml file, can actually be handled directly in your ActionScript very easily.</p>
<p>The examples below are showing connecting to a AMFPHP endpoint as opposed to a ColdFusion one, only because that is what I have been learning and working on recently. For ColdFusion, simply replace the latter part of the string with <em>/flex2gateway/</em></p>
<p>First, define a new string in your model that references the URI to which you are going to connect with your RemoteObjects:</p>
<p><code><br />
var endpointUri:String = "http://mysite.com:8000/amfphp/gateway.php";<br />
</code></p>
<p>Then, simply define a new ChannelSet, and Channel to add to the ChannelSet that references your URI:</p>
<p><code><br />
var cs:ChannelSet = new ChannelSet();<br />
var customChannel:Channel = new AMFChannel("my-amfphp", endpointUri);<br />
cs.addChannel(customChannel);<br />
</code></p>
<p>Finally, define your RemoteObject to access this ChannelSet that you just created and set the destination to the name you gave your AMFChannel:</p>
<p><code><br />
<mx:RemoteObject id="employeeService" channelSet="{cs}" destination="my-amfphp" source="com.yourcompany.app.employee.EmployeeService"<br />
		showBusyCursor="true" /><br />
</code></p>
<p>It is as simple as that! Be sure to take out the services-config declaration in your compiler arguments to test this out appropriately.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kylehayes.info/2008/02/26/remotely-connect-your-flexair-app-without-servicesconfig/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>Adobe Flex 3 and AIR SDK Are Here!</title>
		<link>http://www.kylehayes.info/2008/02/24/adobe-flex-3-and-air-sdk-are-here/</link>
		<comments>http://www.kylehayes.info/2008/02/24/adobe-flex-3-and-air-sdk-are-here/#comments</comments>
		<pubDate>Sun, 24 Feb 2008 20:02:00 +0000</pubDate>
		<dc:creator>Kyle Hayes</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.kylehayes.info/blog/index.cfm/2008/02/24/Adobe-Flex-3-and-AIR-SDK-Are-Here</guid>
		<description><![CDATA[W00T!!!!!!! I am so happy that the final releases of the long awaited Adobe Flex 3 (and builder) and AIR SDK are here. And they have a couple of other cool bits and pieces about them to go with this major update to the famed leading RIA platform. First of all, as you can see [...]]]></description>
			<content:encoded><![CDATA[<p>W00T!!!!!!!</p>
<p>I am so happy that the final releases of the long awaited <a href="http://www.adobe.com/products/flex/">Adobe Flex 3 (and builder)</a> and <a href="http://www.adobe.com/products/air/">AIR SDK</a> are here. And they have a couple of other cool bits and pieces about them to go with this major update to the famed leading RIA platform.</p>
<p>First of all, as you can <a href="http://www.adobe.com/go/buyflexbuilder_std">see at the store</a>, the upgrade price is only $99! Also, if you have a keen eye, you will notice that it is no longer a separate license for PC and Mac&#8230;they come together now!</p>
<p>This is huge news and is truly making Flex be even more affordable and better than ever. One thing to note, is that the $99 upgrade is for Flex Builder 3.0 standard. Chock up an additional $200 and you&#8217;ve got the Pro version which includes advanced charting components and testing tools.</p>
<p>Keep in mind that the Flex framework is still free and open source. The prices above are for the Flex Builder 3.0 IDE products.</p>
<p>Be sure to <a href="http://weblogs.macromedia.com/flexteam/">thank the Flex team for all their hard work!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kylehayes.info/2008/02/24/adobe-flex-3-and-air-sdk-are-here/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yahoo! Flex Skin Buggy</title>
		<link>http://www.kylehayes.info/2008/02/21/yahoo-flex-skin-buggy/</link>
		<comments>http://www.kylehayes.info/2008/02/21/yahoo-flex-skin-buggy/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 10:02:00 +0000</pubDate>
		<dc:creator>Kyle Hayes</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.kylehayes.info/blog/index.cfm/2008/02/21/Yahoo-Flex-Skin-Buggy</guid>
		<description><![CDATA[Lately I have been using the Yahoo! Flex skin in a few of my interfaces as it greatly improves the overall standard look of the Flex widgets. It&#8217;s very easy to implement (thanks to Adobe for creating a simple workflow for this). Recently, however, I have noticed a couple of bugs in the skin that [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I have been using the Yahoo! Flex skin in a few of my interfaces as it greatly improves the overall standard look of the Flex widgets. It&#8217;s very easy to implement (thanks to Adobe for creating a simple workflow for this). Recently, however, I have noticed a couple of bugs in the skin that are worth bringing up and should definitely be fixed. Suffice it to say that I am not sure if they are Adobe&#8217;s fault or Yahoo!&#8217;s fault.</p>
<p><img src="/share/YahooFlexSkin_bug.jpg" align="right" /></p>
<p>As you can see there is an issue on the bottom where a partial row of the datagrid is showing and the other part of it is hidden. It&#8217;s the hidden part that is causing the skin to appear invisible. Note that, as soon as I scroll the datagrid it goes away. However, if I move my mouse over that row it comes back. Same goes for the [+] button. You can see that it&#8217;s bounds are causing an anomaly on the control bar.</p>
<p>Like I said, I am not sure if this is an Adobe issue or a Yahoo! issue, but it is annoying enough that I might be swapping the skin out. I don&#8217;t want to, but I may have to.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kylehayes.info/2008/02/21/yahoo-flex-skin-buggy/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Copying Text To the User&#8217;s Clipboard in Flex</title>
		<link>http://www.kylehayes.info/2008/02/13/Copying-Text-To-the-Users-Clipboard-in-Flex/</link>
		<comments>http://www.kylehayes.info/2008/02/13/Copying-Text-To-the-Users-Clipboard-in-Flex/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 14:02:00 +0000</pubDate>
		<dc:creator>Kyle Hayes</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.kylehayes.info/blog/index.cfm/2008/02/13/Copying-Text-To-the-Users-Clipboard-in-Flex</guid>
		<description><![CDATA[Sometimes there is a requirement or a desired usability enhancement for text to be placed on the user&#8217;s clipboard. This is a great little feature in an your application if you are able to provide it and have a good reason to. In Flex, it couldn&#8217;t be any easier. The setClipboard() function lives inside the [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes there is a requirement or a desired usability enhancement for text to be placed on the user&#8217;s clipboard. This is a great little feature in an your application if you are able to provide it and have a good reason to. In Flex, it couldn&#8217;t be any easier. The <em>setClipboard()</em> function lives inside the System package. Simply call it like so:<br />
<code><br />
...<br />
import flash.system.System;<br />
import mx.controls.Alert;</p>
<p>public function copyText(txt:String):void<br />
{<br />
   System.setClipboard(txt);<br />
   Alert.show("'" + txt + "' has been copied to your clipboard");<br />
}<br />
...<br />
</code></p>
<p>Simple as that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kylehayes.info/2008/02/13/Copying-Text-To-the-Users-Clipboard-in-Flex/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Lean Out Your ActionScript Imports</title>
		<link>http://www.kylehayes.info/2008/02/07/Lean-Out-Your-ActionScript-Imports/</link>
		<comments>http://www.kylehayes.info/2008/02/07/Lean-Out-Your-ActionScript-Imports/#comments</comments>
		<pubDate>Thu, 07 Feb 2008 10:02:00 +0000</pubDate>
		<dc:creator>Kyle Hayes</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.kylehayes.info/blog/index.cfm/2008/02/07/Lean-Out-Your-ActionScript-Imports</guid>
		<description><![CDATA[I have been working on a new Flex application at work lately which I am pretty excited about. Not only has it received a lot of positive attention, but I also get to learn how to build a Flex application that is to be using a PHP middle-tier. Luckily for me, I do have experience [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working on a new Flex application at work lately which I am pretty excited about. Not only has it received a lot of positive attention, but I also get to learn how to build a Flex application that is to be using a PHP middle-tier. Luckily for me, I do have experience with PHP, plus there seems to be <a href="http://www.adobe.com/devnet/flex/flex_php.html">some great resources</a> on the topic.</p>
<p>Anyway, the application is being programmed with the help of the Cairngorm micro-architecture and as such, there is a lot of copying and pasting of files as I create new commands, events, and delegates. One thing that has bugged me in the past about doing this, is figuring out which import statements belong in the newly created class and which don&#8217;t. Many a times, I just didn&#8217;t even bother. That has now changed, now that I discovered an easy, automagic way of doing so.</p>
<p>Knowing that Eclipse always has some gems hidden in the right-click context menus, I perused them to see if there was anything about import statements. <a href="http://www.merriam-webster.com/dictionary/lo+and+behold">Lo and behold</a>, if you right-click on any of the lines that contain import statements, and go to the submenu &#8220;Source&#8221;, there is an option called &#8220;Organize Imports&#8221; (Or my preference: [Mac] Command + Shift + O, [PC] Ctrl + Shift + O). Not only does it actually organize your import statements by package alphabetically (starting with the root package), but it also eliminates any import statements that you do not need in that class. Pretty neat!</p>
<p>Some features I would like to see added to this:</p>
<ol>
<li>Add statements that are required</li>
<li>Combine multiple import statements from the target package using wildcard (*) (Perhaps it could be defined in preferences, how many should be considered before it combines)</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.kylehayes.info/2008/02/07/Lean-Out-Your-ActionScript-Imports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cairngorm: One-to-One Events and Commands Doesn&#8217;t Make Sense</title>
		<link>http://www.kylehayes.info/2008/01/17/Cairngorm-OnetoOne-Events-and-Commands-Doesnt-Make-Sense/</link>
		<comments>http://www.kylehayes.info/2008/01/17/Cairngorm-OnetoOne-Events-and-Commands-Doesnt-Make-Sense/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 19:01:00 +0000</pubDate>
		<dc:creator>Kyle Hayes</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.kylehayes.info/blog/index.cfm/2008/01/17/Cairngorm-OnetoOne-Events-and-Commands-Doesnt-Make-Sense</guid>
		<description><![CDATA[I am struggling with a particular concept in Cairngorm. I don&#8217;t understand why it is considered best practice that your custom cairngorm events and commands are to have a one-to-one ratio. Flex itself is not even modeled this way. For example, when a button is clicked, you don&#8217;t listen for a class called ButtonClickEvent. Instead, [...]]]></description>
			<content:encoded><![CDATA[<p>I am struggling with a particular concept in Cairngorm. I don&#8217;t understand why it is considered best practice that your custom cairngorm events and commands are to have a one-to-one ratio. Flex itself is not even modeled this way. For example, when a button is clicked, you don&#8217;t listen for a class called ButtonClickEvent. Instead, you listen for the ButtonEvent.CLICK or ButtonEvent.DOWN or whatever the case is. In Cairngorm, how come you cannot do the same thing and list multiple event types in your event classes.</p>
<p>I am not suggesting to put all your types in one event class. But let&#8217;s say you have a UserEvent. You could call UserEvent.ADD_USER, UserEvent.DELETE_USER, UserEvent.LOGIN_USER, etc. That is all in one class instead of having three separate classes. Can someone please explain to me the reasoning for the one-to-one ratio please?</p>
<p>Thanks in advance!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kylehayes.info/2008/01/17/Cairngorm-OnetoOne-Events-and-Commands-Doesnt-Make-Sense/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Persisting an ActionScript Data Model</title>
		<link>http://www.kylehayes.info/2008/01/06/Persisting-an-ActionScript-Data-Model/</link>
		<comments>http://www.kylehayes.info/2008/01/06/Persisting-an-ActionScript-Data-Model/#comments</comments>
		<pubDate>Sun, 06 Jan 2008 17:01:00 +0000</pubDate>
		<dc:creator>Kyle Hayes</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.kylehayes.info/blog/index.cfm/2008/01/06/Persisting-an-ActionScript-Data-Model</guid>
		<description><![CDATA[A very common practice in Java when you want to persist or save the current state of your application to a physical file is known as serialization or serializing an object. What this basically means is that you are taking the machine code that represents an object in your application, and converting it to a [...]]]></description>
			<content:encoded><![CDATA[<p>A very common practice in Java when you want to persist or save the current state of your application to a physical file is known as serialization or serializing an object. What this basically means is that you are taking the machine code that represents an object in your application, and converting it to a format that can be written to a file.</p>
<p>The benefits of serialization is that you maintain the actual instance of the object&#8211;not just a data representation of the object. When you read the serialized file back in to the application, it reads in as a native object to that application.</p>
<p>Traditionally in web applications, we accommodate this need by writing entries in a database. Even when it comes down to session information. For the most part, this is fine, works great and I would recommend it for the majority of use cases. However, the serialization method described above could be used as a more efficient means to storing the state of a rich Internet application. Such a method is possible in ActionScript to use in your Flex application.</p>
<p>The high level process is:</p>
<ol>
<li>Represent your data model as an ActionScript object</li>
<li>Serialize your data model into the same AMF format that is used to communicate with middle-tiers like ColdFusion</li>
<li>Send the raw AMF message packet to ColdFusion in a RemoteObject call, or similar</li>
<li>ColdFusion writes the message packet to a local file on the server</li>
</ol>
<p>Naturally, you would create this functionality in a series of classes and CFCs. In ActionScript, you will be using the Flash ByteArray class. This class converts any ActionScript object into a ByteArray which is basically serializing the object.</p>
<p><code><br />
var bytes:ByteArray = new ByteArray();<br />
    bytes.writeObject(myDataModel);<br />
</code></p>
<p>From this point, <strong>bytes</strong> can now be sent to ColdFusion to be written to a file. If you are using ColdFusion, you will want your service function to be expecting an arguments of type=&#8221;Binary&#8221;. From there, ColdFusion can encode the Binary into a writable format like Base64. You migh have a function that looks something like the following:</p>
<p><code><br />
<cffunction name="saveData" access="public" returntype="void"><br />
	<cfargument name="value" type="Binary" required="true" default="#binaryDecode('','Base64')#" /><br />
	<cfset variables.instance.data = duplicate(arguments.value) /><br />
	<cffile action="write" file="myData.dat" output="#binaryEncode(variables.instance.data, 'Base64')#" /><br />
</cffunction><br />
</code></p>
<p>It is really that easy. Once you call the save function you will notice that file now exists on the server. If you were to open it, it would just be a series of what appears to be random data.</p>
<p>To read that data back into a usable object in Flex, you will need to setup a service call to ColdFusion to return the binary data from the file.</p>
<p>On the ColdFusion side, the code would look something like this:<br />
<code><br />
<cffunction name="load" access="public" returntype="void"><br />
	<cfset var data = "" /><br />
	<cffile action="read" file="#getFullPath()#" variable="data" /><br />
	<cfset setData(binaryDecode(data, 'Base64')) /><br />
</cffunction></p>
<p><cffunction name="getData" access="public" returntype="binary"><br />
	<cfreturn variables.instance.data /><br />
</cffunction><br />
</code></p>
<p>And your ActionScript RemoteObject handler would probably have the following:<br />
<code><br />
private function myRO_handler(event:ResultEvent):void<br />
{<br />
	var myDataModel:Object = ByteArray(event.result).readObject();<br />
}<br />
</code></p>
<p>Obviously, the above code is very procedural still since the functionality is not encapsulated within well-defined functions. It is only meant to serve as a basis for understanding the concept. For your convenience, and quite frankly for mine as well, I have created an ActionScript class as well as a set of ColdFusion components to encapsulate all this functionality. You may download the files below.</p>
<p>The files below are provided as is without any guarantee of support or documentation:</p>
<ul>
<li><a href="/code/Serialization.zip" alt="Serialization.swc">Serialization.swc (Compiled with the Flex 3 Beta 3 SDK)</a></li>
<li><a href="/code/cfAMF.zip" alt="ColdFusion AMF Package">ColdFusion AMF Package</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kylehayes.info/2008/01/06/Persisting-an-ActionScript-Data-Model/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
