<?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>lukesh &#187; Flash</title>
	<atom:link href="http://lukesh.com/blog/tag/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://lukesh.com/blog</link>
	<description>interactive</description>
	<lastBuildDate>Mon, 17 May 2010 21:52:09 +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>Hotwire: Quick and dirty event wireups in AS3</title>
		<link>http://lukesh.com/blog/2010/02/hotwire-quick-and-dirty-event-wireups-in-as3/</link>
		<comments>http://lukesh.com/blog/2010/02/hotwire-quick-and-dirty-event-wireups-in-as3/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 10:39:08 +0000</pubDate>
		<dc:creator>lukesh</dc:creator>
				<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Technology and Science]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://lukesh.com/blog/?p=127</guid>
		<description><![CDATA[Recently, I was tasked with building a quick AS3 project outside of our normal Flex framework projects. It was refreshing to just write a plain and simple AS3 project outside of the team environment where I could explore a few things without impacting the team by breaking our current project standards. One thing I&#8217;ve been [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I was tasked with building a quick AS3 project outside of our normal Flex framework projects. It was refreshing to just write a plain and simple AS3 project outside of the team environment where I could explore a few things without impacting the team by breaking our current project standards. One thing I&#8217;ve been wanting to explore is Penner&#8217;s <a href="http://github.com/robertpenner/as3-signals" target="_blank">Signals</a> project, but after looking at it, I decided that: 1. it was still too heavy for my project, 2. I didn&#8217;t see a way to listen to events that Flash dispatched&#8211;mouse events, stage events, etc. I&#8217;ve been using a derivative of <a href="http://code.google.com/p/k2xl/source/browse/trunk/as3classes/src/util/k2xl/EventManager.as" target="_blank">EventManager</a> for a while, and it&#8217;s excellent, but I wanted to explore a different strategy for managing events, so I ended up writing <a href="http://github.com/lukesh/hotwire" target="_blank">Hotwire</a>.</p>
<p>Some goals I wanted to achieve were:</p>
<ol>
<li>As little code as possible to wire up and unwire events.</li>
<li>Lean more toward convention over configuration.</li>
<li>Easy to see which events were being listened for (remotely like the delegate concept in Objective-C)</li>
<li>It&#8217;s not a goal, but I didn&#8217;t care about proper use of accessors (one drawback of Hotwire)</li>
</ol>
<p>The source for Hotwire is 62 lines long, so you could probably <a href="http://github.com/lukesh/hotwire" target="_blank">clone it</a> and analyze it quicker than I can describe it, but I&#8217;ll outline a few use cases anyway.</p>
<h2>Usage 1: As Simple As Possible</h2>
<p>This is as basic as it gets. You store a reference to an instance of Hotwire, which sets up at least a Event.REMOVE listener, then you call unwire(), which removes all the event listeners setup by the wire() call.</p>
<p>By default, Hotwire attempts to register the event with a listener with the prefix &#8220;handle&#8221; then a properly-cased version of the event name. Therefore, since Event.ENTER_FRAME is the string &#8220;enterFrame&#8221;, the listener that Hotwire will wire up is &#8220;handleEnterFrame&#8221;.</p>
<p><a href="http://lukesh.com/blog/wp-content/uploads/2010/02/Screen-shot-2010-02-23-at-5.03.30-AM.png"><img class="alignnone size-full wp-image-130" title="Hotwire Simple Demo" src="http://lukesh.com/blog/wp-content/uploads/2010/02/Screen-shot-2010-02-23-at-5.03.30-AM.png" alt="" width="577" height="421" /></a></p>
<h2>Usage 2: Listening to Other Dispatchers</h2>
<p>In the Hotwire constructor, the first argument is the dispatcher, and is the only required argument. The second argument is the handler, and if it is not specified or null, Hotwire will consider the handler and the dispatcher the same object. In my projects, I used custom bubbled events a-plenty for child display objects, and never specified a different handler from my dispatcher until I needed to handle Stage events, which don&#8217;t bubble. (I haven&#8217;t run across another instance where I couldn&#8217;t simply use bubbled events the way I wanted to, but I&#8217;m sure I will.)</p>
<p><a href="http://lukesh.com/blog/wp-content/uploads/2010/02/Screen-shot-2010-02-23-at-5.17.48-AM.png"><img class="alignnone size-full wp-image-131" title="Hotwire Stage Listener" src="http://lukesh.com/blog/wp-content/uploads/2010/02/Screen-shot-2010-02-23-at-5.17.48-AM.png" alt="" width="497" height="644" /></a></p>
<h2>Usage 3: If you don&#8217;t like &#8220;handle&#8221;</h2>
<p>Personally, I like the word &#8220;handle&#8221; as my handler prefix. I can type handle+Ctrl+Space and get a list of all my handlers, and it&#8217;s descriptive. I know that many people like to use &#8220;on&#8221; however. If you want to change your prefix for one instance, it&#8217;s the third argument in the constructor, as you may have noticed in the example above. If you <em>hate</em> &#8220;handle&#8221; just change the source code. It&#8217;s 62 lines. Don&#8217;t hate.</p>
<p><a href="http://lukesh.com/blog/wp-content/uploads/2010/02/Screen-shot-2010-02-23-at-5.22.38-AM.png"><img class="alignnone size-full wp-image-134" title="Hotwire Using On" src="http://lukesh.com/blog/wp-content/uploads/2010/02/Screen-shot-2010-02-23-at-5.22.38-AM.png" alt="" width="412" height="390" /></a></p>
<h2>Finally</h2>
<p>So that&#8217;s it. I think Hotwire might be useful if you wanted to wire / unwire groups of events easily also, just by creating separate instances of Hotwire. (Although, I might argue your class is getting too complicated?)</p>
<p>There are some cons to Hotwire that may make your architecture blood boil (for some reason I&#8217;ve been much less OCD about all this, so I&#8217;m just letting it roll and enjoying the short time of non-obsession):</p>
<ol>
<li>Public handlers.<strong> </strong>Yeah, if you make private or protected handlers, the instance of Hotwire can&#8217;t wire them up. Well, hey. It&#8217;s a mixin-y class. Put some Baileys in your latté and discuss architecture with me when I come back to my senses.</li>
<li>Handler names derived from constants. This could be pretty bad if you are wiring up to Event.ENTER_FRAME which is currently &#8220;enterFrame&#8221; but Adobe decides to change to &#8220;zomgAppleSucks&#8221;. Yes, this might be a problem. In the remote chance this happens, <em>:%s/handleEnterFrame/handleZomgAppleSucks/g</em> and go back to your latté.</li>
</ol>
<p>If you find it useful, let me know. If you have improvements, <a href="http://github.com/lukesh/hotwire" target="_blank">fork it</a>. If you think it&#8217;s horrible and want to throw your latté at me, please do, I love constructive criticism and alternative perspectives. I&#8217;ll just passively-aggressively unfollow you on <a href="http://twitter.com/lukesh" target="_blank">Twitter</a>.</p>
<p>If you still aren&#8217;t clear on how to get Hotwire, even though I linked to it like <span style="text-decoration: line-through;">a million</span> 3 times, it&#8217;s hosted on <a href="http://github.com/lukesh/hotwire" target="_blank">GitHub, and you can get it here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://lukesh.com/blog/2010/02/hotwire-quick-and-dirty-event-wireups-in-as3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Thoughts On Sproutcore and App Dev In General</title>
		<link>http://lukesh.com/blog/2010/01/thoughts-on-sproutcore-and-app-dev-in-general/</link>
		<comments>http://lukesh.com/blog/2010/01/thoughts-on-sproutcore-and-app-dev-in-general/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 15:34:31 +0000</pubDate>
		<dc:creator>lukesh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[ria]]></category>
		<category><![CDATA[silverlight]]></category>
		<category><![CDATA[sproutcore]]></category>

		<guid isPermaLink="false">http://lukesh.wordpress.com/?p=117</guid>
		<description><![CDATA[I've been intentionally learning how to develop using Sproutcore for about a month now, so I've been more aware of the buzz about it, and I have to say that most things I read are missing the point about the value promise of Sproutcore.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been intentionally learning how to develop using <a href="http://sproutcore.com" target="_blank">Sproutcore</a> for about a month now, so I&#8217;ve been more aware of the <a href="http://www.google.com/search?q=sproutcore" target="_blank">buzz</a> <a href="https://search.twitter.com/search?q=sproutcore" target="_blank">about</a> it, and I have to say that <a href="http://dynamicflash.com/2008/07/the-problem-with-sproutcore/" target="_blank">most</a> <a href="http://www.roughlydrafted.com/2008/06/14/cocoa-for-windows-flash-killer-sproutcore/" target="_blank">things</a> <a href="http://arstechnica.com/apple/news/2008/06/sproutcore-rich-web-apps-in-javascript-no-flash-needed.ars" target="_blank">I read</a> <a href="http://www.theregister.co.uk/2008/07/02/inside_sproutcore/" target="_blank">are</a> <a href="http://www.infoworld.com/d/developer-world/sproutcore-apples-flash-silverlight-killer-469" target="_blank">missing</a><a href="http://ajaxian.com/archives/sproutcore-being-talked-of-as-a-flash-killer-really" target="_blank"> the point</a> about the <a href="http://www.infoq.com/news/2009/09/sproutcore-1-0" target="_blank">value promise</a> of Sproutcore.</p>
<p>The impetus behind my learning is that it is an application development framework for the HTML5/JavaScript platform, versus the <a href="http://www.adobe.com/flashplatform/" target="_blank">Flash</a> <a href="http://www.adobe.com/products/flex/" target="_blank">Platform</a> that I&#8217;m used to developing for. The key here is that it is an application development framework. It is not another <a href="http://jquery.com/" target="_blank">DOM access library</a>, <a href="http://developer.yahoo.com/yui/" target="_blank">widget set</a>, or MVC, and it shouldn&#8217;t even be compared to them. It&#8217;s not a &#8220;<a href="http://www.google.com/search?q=Adobe+%22Flash+killer%22" target="_blank">Flash-killer</a>&#8220;. It&#8217;s not even a &#8220;<a href="http://www.google.com/search?hl=en&amp;q=Adobe+%22Flex+killer%22" target="_blank">Flex-killer</a>&#8221; per se, although in my mind it is an alternative in part.</p>
<p>Flash is just a display technology. Flex boils down to just a widget set and bindings library. Intrinsically, Flex lacks a good application development pattern. That&#8217;s partially why Seppuku is a viable alternative to maintaining the average Flex app built by someone else. There&#8217;s no built-in MVC, or unit testing strategy or IoC methodology.</p>
<p>I realize that Adobe&#8217;s building in support for <a href="http://www.flexunit.org/" target="_blank">FlexUnit4</a> in Flash Builder 4 / Flex 4 SDK which is wonderful. <a href="http://www.digitalprimates.net/" target="_blank">Michael Labriola et al</a> are doing a fantastic work there that is critical for the Flex project. These necessessities have been the mother of invention with MVC frameworks like <a href="http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm" target="_blank">Cairgorm</a>, <a href="http://mate.asfusion.com/" target="_blank">Mate</a>, <a href="http://www.flightxd.com/flightframework/" target="_blank">FlightFramework</a>, and <a href="hydramvc.com/" target="_blank">HydraMVC</a> for MVC. Lack of IoC has also inspired Mate, and Flight, as well as the excellent <a href="http://swizframework.org/" target="_blank">Swiz framework</a>, and the <a href="hydraframework.com/" target="_blank">DI part of HydraFramework</a>. And, don&#8217;t even get me started on <a href="http://www.adobe.com/products/livecycle/" target="_blank">server</a> <a href="http://www.google.com/search?q=soap+generation+flex" target="_blank">interaction</a> <a href="http://www.themidnightcoders.com/products.html" target="_blank">complexities</a>.</p>
<p>I say all that to illustrate that the Flex development stack really fundamentally consists of Flash -&gt; Flex (widget set, bindings, themes) -&gt; MVC -&gt; IoC -&gt; Unit Testing -&gt; Development environment (IDE, code tools, code gen) -&gt; Support (documentation, community). I feel like that stack is essential to consistently producing good applications built using the Flex SDK, and I think <a href="http://www.techcrunch.com/2008/06/09/want-to-try-out-mobileme-check-out-sproutcore/" target="_blank">other</a> <a href="http://silverlight.net/getstarted/riaservices/" target="_blank">companies</a> realize this too.</p>
<p>If you look at what Microsoft is doing with Silverlight, they are positioning themselves to <a href="http://silverlight.net/getstarted/" target="_blank">own that stack</a>, and not only that, but they have the advantage of not being the first in that they can fix all the things that Adobe has <a href="http://olegfilipchuk.com/2009/07/24/unload-you-module/" target="_blank">done</a><a href="http://www.xtyler.com/code/20" target="_blank"> wrong</a>. It all looks really promising except for a few things, which I&#8217;ll discuss in a moment.</p>
<p>Let me begin by saying that <a href="http://twitter.com/justflex/status/3736065277" target="_blank">contrary to</a> <a href="http://www.meetup.com/Harrisburg-Flex-Group/" target="_blank">popular belief</a>, I don&#8217;t necessarily <a href="http://www.webkitchen.be/2009/05/27/adobe-versus-the-open-web/" target="_blank">enjoy being married to Adobe</a> and the Flash Platform. I really do embrace the ideology of an open, standards-driven web. The market has helped drive Flex because you really could deliver a richer &#8220;desktop-like experience&#8221; on the web, spawning the <a href="http://en.wikipedia.org/wiki/Rich_Internet_application" target="_blank">RIA buzzword</a>. HTML5 and browser implementations are undeniably slower to progress than a company-owned platform like Adobe has. It was the evolution of Flash as a vector graphics rendering plugin for graphically <a href="http://www.addictinggames.com/index.html" target="_blank">fun</a> and <a href="http://mrdoob.com/" target="_blank">interesting</a> content that facilitated it&#8217;s insane propagation, not it&#8217;s ability to <a href="http://blog.flexexamples.com/2007/08/13/validating-flex-forms-using-the-validator-classes/" target="_blank">draw text inputs and combo boxes</a>.</p>
<p>Ok, back to Silverlight. First bad thing: you are locked into <a href="http://www.joelonsoftware.com/items/2009/12/30.html" target="_blank">Microsoft</a>. That&#8217;s a <a href="http://everything2.com/title/Why+Microsoft+is+evil" target="_blank">bad thing</a>, just like being locked into Adobe is a bad thing. However, I would argue that specifically for web development, being locked into Microsoft is better than being locked into Adobe. They own the whole stack, and if you drink the MS Kool-Aid you never have to really leave Visual Studio. Also, Silverlight plays much nicer than Flash with the <a href="http://www.silverlightshow.net/items/Interaction-between-Silverlight-and-HTM.aspx" target="_blank">HTML DOM</a>, which means you as the developer have a greater level of flexibility in how you implement Silverlight as part of your solution.</p>
<p>Second bad thing: you have to work in Windows. It&#8217;s not just that I really dislike working in Windows; it&#8217;s more that I dislike that I&#8217;m forced to. At least Adobe provides Windows, Mac, and (kinda) Linux support for their IDE and Player. I sincerely believe that a web development platform should be OS agnostic.</p>
<p>Ok, wasn&#8217;t I writing about Sproutcore? Oh yeah. I&#8217;m already way past the tl;dr threshold for most people, but there&#8217;s a lot to <span style="text-decoration: line-through;">blab about</span> discuss. All that background was to make the point that an application development platform is more than the display layer and widgets, and even goes beyond the language you&#8217;re using. I beleive the fundamentals of an application development platform are:</p>
<ol>
<li><a href="http://wiki.sproutcore.com/" target="_blank">A prescriptive methodology</a>: You or other developers need to be able to look at your source and not have to figure out how you&#8217;ve interpreted solutions to basic problems.</li>
<li><a href="http://wiki.sproutcore.com/Basics-Introduction" target="_blank">Consistent development workflow</a>: You or other developers should be able to intrinsically understand how your application can be scaled or altered as it evolves.</li>
<li><a href="http://wiki.sproutcore.com/Basics-Introducing+SproutCore+MVC" target="_blank">MVC methodology</a>: You or other developers should be able to intrinsically understand how your application separates concerns.</li>
<li><a href="http://wiki.sproutcore.com/DataStore-About+DataSources" target="_blank">Data access consistency</a>: You or other developers should strive to unify data access methodology so that applications are easier to debug regardless of server technology.</li>
<li><a href="http://wiki.sproutcore.com/UnitTesting-About+Unit+Testing" target="_blank">Unit tests</a>: The application platform should provide a way of structuring unit tests for all aspects of the platform, including establishing Fixtures for data access logic.</li>
<li><a href="http://wiki.sproutcore.com/Abbot-Setting+Up" target="_blank">Build tools</a>: Scaffolding, configuration, etc. tools should minimize &#8220;monkey work&#8221; and give the developer the ability to go from thought to implementation as quickly as possible.</li>
<li><a href="http://wiki.sproutcore.com/" target="_blank">Good documentation</a>: it goes without saying that docs should ideally help the new learner ramp up, and serve as a <a href="http://docs.sproutcore.com/" target="_blank">reference</a> to experienced devs.</li>
<li><a href="http://blog.sproutcore.com/" target="_blank">Helpful</a> <a href="http://www.google.com/search?q=%23sproutcore+irc" target="_blank">community</a>: I could write an entire post about this one based on my experiences in the Ruby community, but it is critical to have mentors and people who are willing to accept that fact that you are an annoying little n00b and require hand holding like a little child as you ask questions and sound like an idiot for a few days. Also, when you are off the teet and developing like a madman, you need intelligent people to bounce ideas off of. If you go from n00b to the smartest one in the community in a week, you&#8217;ve got problems with the community.</li>
</ol>
<p>Granted, I&#8217;ve only been evaluating Sproutcore as I&#8217;ve been finding time around regular work, holidays, and spending time with my family, but I&#8217;m definitely over the 0 &#8211; 1 level of proficiency and actually starting to build things and ask real questions, and I can say that so far, when I need to do something, it feels like Sproutcore has provided for it in a very logical way. All my personal requirements for a good framework are accounted for. I&#8217;m not going to port HydraFramework to Sproutcore, because it&#8217;s unnecessary in Sproutcore; it already has a wonderful MVC and bindings methodology. I&#8217;m not scrounging for a unit testing methodology; it also has been provided for. Skinning / theming couldn&#8217;t be easier. Build tools are great. I can develop on my 486 running Ubuntu if I wanted to. There&#8217;s always someone idling in #sproutcore who is helpful. The docs are great. It may not have achieved feature parity with the Flex development stack yet but it shows tremendous promise.</p>
<p>So again, the question isn&#8217;t Sproutcore vs. jQuery. In fact, you can (and probably will) use jQuery if you develop Sproutcore apps. The question really isn&#8217;t even Sproutcore vs. Flash vs. Silverlight, but it&#8217;s so easy to frame it up like that. The point of Sproutcore is that it provides the beginnings of an end-to-end application development strategy in HTML5 that competes with Adobe&#8217;s Flash Platform (Flash + Flex + Cairngorm + FlexUnit) and Silverlight&#8217;s presentation layer and tools.</p>
<p>There are a few additional things I want to point out. I&#8217;m not saying it&#8217;s the only way by any means. You can write an open standards desktop experience using <a href="http://javascriptmvc.com/" target="_blank">any</a> <a href="http://code.google.com/webtoolkit/">recipe</a> <a href="http://www.extjs.com/" target="_blank">you&#8217;d</a> <a href="http://ajaxian.com/" target="_blank">like</a>. Maybe my point is that I feel that choosing an application development platform is more than the sum of its parts.</p>
<p>I have also been <a href="http://www.sandofsky.com/desktop-class-applications-in-javascript.html" target="_blank">evaluating</a> <a href="http://cappuccino.org/" target="_blank">Cappuccino</a> by <a href="http://280north.com/" target="_blank">280 North</a>. For all intents and purposes, it competes directly with Sproutcore, and I&#8217;m not blatantly ignoring it. However, my #1 hangup with it is the Objective-J abstraction. I understand using Objective-C for Cocoa development. I understand JavaScript for web development. But to me, I see not much more than a syntactical advantage for Cocoa developers as the point of Objective-J. For me, it makes more sense to stick with JavaScript as JavaScript. I&#8217;m going to try to keep my eye on it, especially the <a href="http://280atlas.com/" target="_blank">Atlas project</a>.</p>
<p>I&#8217;d definitely be interested in hearing your experiences with Sproutcore or your own recipe for RIA *choke* or Desktop Experience type applications. I&#8217;ll also try to post more details as I continue evaluating.</p>
]]></content:encoded>
			<wfw:commentRss>http://lukesh.com/blog/2010/01/thoughts-on-sproutcore-and-app-dev-in-general/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ArrayCollections, WebORB deserialization, .NET generics</title>
		<link>http://lukesh.com/blog/2009/10/arraycollections-weborb-deserialization-net-generics/</link>
		<comments>http://lukesh.com/blog/2009/10/arraycollections-weborb-deserialization-net-generics/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 21:30:04 +0000</pubDate>
		<dc:creator>lukesh</dc:creator>
				<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[weborb]]></category>

		<guid isPermaLink="false">http://lukesh.wordpress.com/?p=103</guid>
		<description><![CDATA[The problem is that unless you refer to the class "MyChildType" somewhere in your project, the Flash runtime has no idea that the "MyChildType" exists. Typically, you'd refer to this class in a view or something, so this problem is very esoteric and you most likely won't encounter it, but if you do, keep this in mind.]]></description>
			<content:encoded><![CDATA[<p>From the &#8220;don&#8217;t-beat-your-head-against-the-same-wall&#8221; department: Here&#8217;s the original situation:</p>
<p>1. .NET class (MyContainerType) with a public List&lt;MyChildType&gt; Data { get; set; }</p>
<p>2. Flex has both IMyContainerType and IMyChildType and their corresponding value object classes.</p>
<p>3. Both deserialize properly when service method calls return either class directly, but NOT the MyChildType objects in the Data property of MyContainerType; they return as simple AS3 Objects.</p>
<p>The problem is that unless you refer to the class &#8220;MyChildType&#8221; somewhere in your project, the Flash runtime has no idea that the &#8220;MyChildType&#8221; exists. Typically, you&#8217;d refer to this class in a view or something, so this problem is very esoteric and you most likely won&#8217;t encounter it, but if you do, keep this in mind.</p>
<p>The safest thing you can do is mention the class you intend for your ArrayCollection to contain in your value object (in lieu of Flex Generics) as follows:</p>
<p><img class="alignnone size-full wp-image-112" title="AS3 ArrayCollection &quot;Generic&quot;" src="http://lukesh.com/blog/wp-content/uploads/2009/10/screen-shot-2009-10-09-at-5-11-56-pm3.png" alt="AS3 ArrayCollection &quot;Generic&quot;" width="474" height="146" /></p>
<p>Ensure that the compiler includes the Class that the ArrayCollection will contain.</p>
]]></content:encoded>
			<wfw:commentRss>http://lukesh.com/blog/2009/10/arraycollections-weborb-deserialization-net-generics/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Immutable Strings, Arrays, Lists, and dataProviders PSA</title>
		<link>http://lukesh.com/blog/2009/06/immutable-strings-arrays-lists-and-dataproviders-psa/</link>
		<comments>http://lukesh.com/blog/2009/06/immutable-strings-arrays-lists-and-dataproviders-psa/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 23:05:43 +0000</pubDate>
		<dc:creator>lukesh</dc:creator>
				<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[dataprovider]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://lukesh.wordpress.com/?p=99</guid>
		<description><![CDATA[First, click here to view a quick demo of the problem. (Source here). When the lists load, roll over one of the items labeled &#8220;something&#8221; and notice the hover behavior. The problem is, that these Lists are bound to and Array and an ArrayCollection of Strings (which are immutable in AS3). Likewise, if multiple entries [...]]]></description>
			<content:encoded><![CDATA[<p>First, <a href="http://lukesh.com/files/fx3list/" target="_blank">click here</a> to view a quick demo of the problem. (Source <a href="http://gist.github.com/129284" target="_blank">here</a>). When the lists load, roll over one of the items labeled &#8220;something&#8221; and notice the hover behavior.</p>
<p>The problem is, that these Lists are bound to and Array and an ArrayCollection of Strings (which are immutable in AS3). Likewise, if multiple entries in an Array referenced the same object, the same issue would occur.</p>
<p>This is a particularly annoying implementation challenge, where you might commonly want to bind an Array of String to a List. This may or may not actually be a bug&#8211;well it might be, in that the requirement for uniqueness in dataProviders isn&#8217;t very well documented&#8211;but it is consistent with how Arrays work in AS3. If you have two strings in an ArrayCollection, for example, the only way to retrieve a particular value is to do so by index; you cannot call .getItem(&#8220;stringvalue&#8221;) because the collection has no idea which one you are referring to.</p>
<p>The workaround is either to wrap each item in a new object, such that [{label: "string value"}, {label: "string value"}] so that each object actually exists as a unique object in memory, or to wrap ArrayCollection so that it recognizes primitives and wraps them automatically.</p>
<p>This &#8220;bug&#8221; is being tracked here: <a href="https://bugs.adobe.com/jira/browse/SDK-17182" target="_blank">https://bugs.adobe.com/jira/browse/SDK-17182</a> reported by Albert Chang.</p>
<p>This effect was brought to my attention by <a href="http://wintondeshong.com/" target="_blank">Winton De Shong</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://lukesh.com/blog/2009/06/immutable-strings-arrays-lists-and-dataproviders-psa/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>HydraMVC 0.1.3 Released</title>
		<link>http://lukesh.com/blog/2009/04/hydramvc-013-released/</link>
		<comments>http://lukesh.com/blog/2009/04/hydramvc-013-released/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 22:10:03 +0000</pubDate>
		<dc:creator>lukesh</dc:creator>
				<category><![CDATA[Design and Creativity]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Technology and Science]]></category>
		<category><![CDATA[design patterns]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[mvc]]></category>

		<guid isPermaLink="false">http://lukesh.wordpress.com/?p=89</guid>
		<description><![CDATA[&#8230;And it seems to be the magic number for now. I&#8217;ve been using this version for a while and it seems stable and complete enough to actually use f&#8217;real. If you don&#8217;t know what it is, click here to read about it and get it. Besides all the obvious goals for HydraMVC (read about them [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-90" title="HydraMVC.com Screenshot" src="http://lukesh.com/blog/wp-content/uploads/2009/04/ac3bf0605bbc32940c854b762d3895a0.png" alt="HydraMVC.com Screenshot" width="500" height="370" />&#8230;And it seems to be the magic number for now. I&#8217;ve been using this version for a while and it seems stable and complete enough to actually use f&#8217;real. If you don&#8217;t know what it is, <a href="http://www.hydramvc.com" target="_blank">click here</a> to read about it and get it.</p>
<p>Besides all the obvious goals for HydraMVC (read about them on the website), I have a few big plans for the framework. Firstly, I&#8217;d absolutely love to get an AIR debug console written for it. I just ran across <a href="http://demonsterdebugger.com/" target="_blank">this gem </a>today, which is pretty close to what I would like to develop for Hydra, except that instead of debugging the AS3 code per se, it would debug the application logic of the MVC by trapping the paths of Notifications as they are handled by the various actors in the MVC. Since De MonsterDebugger is open source, there&#8217;s nothing preventing me from actually <em>augmenting </em>it with a HydraMVC debug console. Talk about pure hotness. Anyway, with deadlines (seriously) looming, don&#8217;t look for this anytime this month. But it will happen. Mark my words.</p>
<p>Secondly, something that would also be wonderful if it was integrated with a debug console would be a unit testing interface. That&#8217;s all I&#8217;m gonna say. See, the beauty of it is that we could just compile out two HydraMVC SWC&#8217;s&#8211;a debug version and a production version. The debug version would provide the hooks for the debugger and the production version would bypass them. Then, when you&#8217;re ready to deploy a HydraMVC application, just switch SWC&#8217;s. I wonder if we could even make this a compiler directive for a single SWC? Hmm&#8230; Anyway, I&#8217;m super excited. This framework is not only pretty cool as-is, but represents to me a ton of realizable potential that would really provide a very accessible, learnable, structured way to develop medium to large, <em>scalable, debuggable</em> Flex applications. Stay tuned. Download HydraMVC and let me know what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://lukesh.com/blog/2009/04/hydramvc-013-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Aurora Borealis in ActionScript</title>
		<link>http://lukesh.com/blog/2008/12/aurora-borealis-in-actionscript/</link>
		<comments>http://lukesh.com/blog/2008/12/aurora-borealis-in-actionscript/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 15:51:25 +0000</pubDate>
		<dc:creator>lukesh</dc:creator>
				<category><![CDATA[Design and Creativity]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Math and Information Theory]]></category>
		<category><![CDATA[Aurora]]></category>
		<category><![CDATA[Borealis]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Holiday]]></category>

		<guid isPermaLink="false">http://lukesh.wordpress.com/?p=64</guid>
		<description><![CDATA[This weekend I threw together an algo to generate Aurora for a holiday ecard. I was really happy with the outcome. You can see the card here.]]></description>
			<content:encoded><![CDATA[<p><a href="http://lukesh.com/files/hapcard2008/default.html" target="_blank"><img class="alignnone size-full wp-image-65" title="Screenshot" src="http://lukesh.com/blog/wp-content/uploads/2008/12/picture-3.png" alt="Screenshot" width="510" height="407" /></a></p>
<p><a href="http://lukesh.com/blog/wp-content/uploads/2008/12/picture-3.png"></a>This weekend I threw together an algo to generate Aurora for a holiday ecard. I was really happy with the outcome. You can see the card <a href="http://lukesh.com/files/hapcard2008/default.html" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://lukesh.com/blog/2008/12/aurora-borealis-in-actionscript/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>In defense of AS3</title>
		<link>http://lukesh.com/blog/2008/07/in-defense-of-as3/</link>
		<comments>http://lukesh.com/blog/2008/07/in-defense-of-as3/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 19:41:04 +0000</pubDate>
		<dc:creator>lukesh</dc:creator>
				<category><![CDATA[Design and Creativity]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[philosophy]]></category>

		<guid isPermaLink="false">http://lukesh.wordpress.com/?p=41</guid>
		<description><![CDATA[As someone who has worked with Flash since FutureSplash was acquired by Macromedia, and as someone with both a design / animation and programming background, I agree with Adobe&#8217;s decision to go with a more structured implementation of ActionScript in Flash with AS3. I believe it is a strategic move to position Flash as a [...]]]></description>
			<content:encoded><![CDATA[<div class="comment-content">
<p>As someone who has worked with Flash since FutureSplash was acquired by Macromedia, and as someone with both a design / animation and programming background, I agree with Adobe&#8217;s decision to go with a more structured implementation of ActionScript in Flash with AS3. I believe it is a strategic move to position Flash as a viable platform for true RIA development.</p>
<p>There&#8217;s no reason that a toolkit couldn&#8217;t be written that abstracts the API to provide some of the functionality mentioned in the article. It would streamline development for designers / animators, yet maintain the architectural integrity of AS3.</p>
<p>It&#8217;s undeniable that the new VM is harder, better, faster, stronger. The level of complexity of the API needed to increase to provide access to the host of new features&#8211;not only for the contemporary version of Flash, but also to elegantly scale for the future.</p>
<p>Consider even the nomenclature of the AS2 display object hierarchy. &#8220;MovieClip&#8221;? Think about how someone from a development background (not Flash) would approach the idea of an interface comprised of &#8220;MovieClips.&#8221; They&#8217;re not interested in frame-based animation. They don&#8217;t want to play a movie. They want to draw vector graphics on the screen. So they create a &#8220;MovieClip&#8221;? I think Adobe has done a fantastic job of maintaining cohesiveness between a logically engineered AS3 API and the legacy AS2 API that anyone who has evolved as a designer / developer with Flash would be familiar with.</p>
<p>I believe that AS3 allows a developer to logically approach Flash as a UI platform with some amazing capabilities. I think AS3 alone may prove to be a challenge to a designer without any programming background, but this is not unmitigable with a well-written toolkit for designers. Maybe that&#8217;s the core of what I&#8217;m saying&#8211;that you can go one way but not the other. You can abstract an API to make it easier for a designer to use, but you can&#8217;t go the other way and take an abstracted API and make it more powerful for developers.</p>
<p>Specifically related to Charge #6&#8211;that&#8217;s definitely biting the hand that feeds you. SOME errors are better than NO errors. I think it was incredibly cumbersome to code to AS2 for the example that was cited in the article. I agree with the verdict NOT GUILTY.</p>
<p>I would also like to say that I concur with the other, arguably non-AS3, issues mentioned in the article, specifically &#8220;Failure to Unload,&#8221; which has caused me much grief in the past.</p>
<p>My intent is not to come off as a pretentious &#8220;real Flash developer&#8221; to all you &#8220;plebeian designers&#8221; or something, nor is it to slam Colin, whom I hold in very high regard, but I hope that this provides some counter-rationale.</p>
<div class="comment-content">
<p>Ok, I re-read <a href="http://www.insideria.com/2008/07/the-charges-against-actionscri.html" target="_blank">the article</a>, and I have to concede that perhaps my previous comment was slightly a knee-jerk reaction. As a Flash platform evangelist, I really appreciated the architectural changes in AS3 vs AS2. By the time I got to the bottom and read the previous comments, I forgot that Colin&#8217;s &#8220;What Should ___ Do?&#8221; commentary was really well thought through and addressed both the concerns of the designer and developer.</p>
<p>&#8220;But despite all the talk of GPU blitting, pixel shading, and ligatures, a non-negligible percentage of the Flash community is rightfully asking: is Adobe still committed to the simple, agile authoring practices on which Flash was founded? It&#8217;s a rational enough concern. After all, Flash built its success on &#8216;ease of use.&#8217;&#8221;</p>
<p>I think it is a valid concern, but &#8220;ease of use&#8221; is relative versus the audience, purpose, and power of what is being evaluated. I agree that Flash should be easy to use, but that does not mean what it did 10 years ago.</p>
<p>&#8220;Or maybe the time has come for someone to make an entirely new application for building simple Flash websites and animations. Such a tool could even be written in ActionScript, and deployed as an AIR app.&#8221;</p>
<p>I wonder when the convergence between Desktop, AIR (runtimes), Browser, Flash Player will happen. I feel like the industry is so confused with levels of abstraction, we&#8217;re writing browsers for various OS&#8217;s, that render HTML documents, which contain Flash players, that render RIA&#8217;s, or animations or whatever, which can also be deployed in an AIR runtime, which can contain a browser, etc&#8230; Forgive my rant, but I just don&#8217;t see things working like this sustainably for very long. Ultimately, it will come down to a contiguous platform that will allow left-to-right-brained people to interact and produce content in a continuum of connected devices. The moment we have immediate high-bandwidth connectivity everywhere is the moment the game entirely changes, and it&#8217;s almost here. But I digress&#8230;</p></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://lukesh.com/blog/2008/07/in-defense-of-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mediator strategy in PureMVC</title>
		<link>http://lukesh.com/blog/2008/06/mediator-strategy-in-puremvc/</link>
		<comments>http://lukesh.com/blog/2008/06/mediator-strategy-in-puremvc/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 12:41:15 +0000</pubDate>
		<dc:creator>lukesh</dc:creator>
				<category><![CDATA[Design and Creativity]]></category>
		<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Technology and Science]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[patterns]]></category>
		<category><![CDATA[puremvc]]></category>

		<guid isPermaLink="false">http://lukesh.wordpress.com/?p=38</guid>
		<description><![CDATA[If you aren&#8217;t using an MVC framework like Cairngorm, Model-Glue, Guasax, or PureMVC for your Flex development, you really should think about starting. Our adoption of PureMVC at andCulture has allowed us to structure our ideas around a concrete paradigm and move on to arguing about more important things. I&#8217;ve implemented PureMVC in both Flash [...]]]></description>
			<content:encoded><![CDATA[<p>If you aren&#8217;t using an <a href="http://en.wikipedia.org/wiki/Model-view-controller" target="_blank">MVC framework</a> like <a href="http://labs.adobe.com/wiki/index.php/Cairngorm" target="_blank">Cairngorm</a>, <a href="http://www.model-glue.com/flex.cfm" target="_blank">Model-Glue</a>, <a href="http://www.guasax.com/guasax/web/en/index.php" target="_blank">Guasax</a>, or <a href="http://puremvc.org/" target="_blank">PureMVC</a> for your Flex development, you really should think about starting. Our adoption of PureMVC at <a href="http://andculture.com">andCulture</a> has allowed us to structure our ideas around a concrete paradigm and move on to arguing about <a href="http://www.cornilliac.com/blog/2008/01/handling-deferred-view-component-creation-within-the-puremvc-framework/" target="_blank">more important things</a>.</p>
<p>I&#8217;ve implemented PureMVC in both Flash and Flex projects and I&#8217;ve noticed that <a href="http://www.websector.de/blog/2007/12/25/10-tips-for-working-with-puremvc/" target="_blank">#3 of this post</a> really applies. I mean <em>really</em> applies. As a general philosophy, I believe it&#8217;s better to start out with as few Mediators as possible, and structure them (or it) around the logical parts of the application or module—not the View Components or even their hierarchy as much. And, when the Mediator starts to become cumbersome, think about refactoring. </p>
<p>For instance, for a Flash kiosk I just finished, I more-or-less had a Mediator for each VC—not entirely, but I definitely ended up with a disorganized mess of Mediators, which I affectionately refer to now as Mediator Soup. </p>
<p>One of the biggest issues is state. Often elements that have their own Mediators should actually be a complex VC with a single, intelligent Mediator. Or, if that doesn&#8217;t flow architecturally, approach the VC as a separate Module or component, with it&#8217;s own MVC, and interface to it via it&#8217;s own API.</p>
<p>I&#8217;ve noticed that this approach allows me to think of the application in a more logical way, and seems to keep the code cleaner. I&#8217;d appreciate any thoughts or feedback on this.</p>
]]></content:encoded>
			<wfw:commentRss>http://lukesh.com/blog/2008/06/mediator-strategy-in-puremvc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Policy file changes for Flash Player 9.0.124.0 strict security</title>
		<link>http://lukesh.com/blog/2008/06/policy-file-changes-for-flash-player-901240-strict-security/</link>
		<comments>http://lukesh.com/blog/2008/06/policy-file-changes-for-flash-player-901240-strict-security/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 21:26:34 +0000</pubDate>
		<dc:creator>lukesh</dc:creator>
				<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[Technology and Science]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[services]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://lukesh.wordpress.com/?p=37</guid>
		<description><![CDATA[Adobe has enhanced the security policy in Flash Player 9.0.115 and 9.0.124 that may cause some issues if you&#8217;re interacting with Web Services. Typically when I start a Flex project, I just throw a simple, open crossdomain.xml file on the root of the service site (or elsewhere) and go to town (which is poor practice to [...]]]></description>
			<content:encoded><![CDATA[<p>Adobe has <a href="http://www.adobe.com/devnet/flashplayer/articles/flash_player9_security_update.html" target="_blank">enhanced the security policy</a> in Flash Player 9.0.115 and 9.0.124 that may cause some issues if you&#8217;re interacting with Web Services. Typically when I start a Flex project, I just throw a simple, open crossdomain.xml file on the root of the service site (<a href="http://livedocs.adobe.com/flex/201/langref/flash/system/Security.html#loadPolicyFile()" target="_blank">or elsewhere</a>) and go to town (which is <a href="http://shiflett.org/blog/2006/sep/the-dangers-of-cross-domain-ajax-with-flash" target="_blank">poor</a> <a href="http://www.hardened-php.net/library/poking_new_holes_with_flash_crossdomain_policy_files.html" target="_blank">practice</a> <a href="http://www.petefreitag.com/item/595.cfm" target="_blank">to leave</a> when you deploy). </p>
<p>The &#8220;come and get it&#8221; policy file typically looks like this:</p>
<pre>&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE cross-domain-policy SYSTEM
"http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"&gt;
&lt;cross-domain-policy&gt;
    &lt;allow-access-from domain="*" /&gt;
&lt;/cross-domain-policy&gt;</pre>
<p> </p>
<p>However, we noticed that an intranet project we&#8217;ve deployed stopped working on certain computers, throwing the following error:</p>
<pre>[RPC Fault faultString="<span class="searchTerm">Security</span> <span class="searchTerm">error</span> <span class="searchTerm">accessing</span> <span class="searchTerm">url</span>" faultCode="Channel.Security.Error" 
faultDetail="Unable to load WSDL. If currently online, please verify the URI and/or format
of the WSDL (***YOUR WSDL ENDPOINT HERE***)"]
      at mx.rpc.wsdl::WSDLLoader/mx.rpc.wsdl:WSDLLoader::faultHandler()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.rpc::AbstractInvoker/<a rel="nofollow" href="http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent(" target="_blank">http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent(</a>)
      at mx.rpc::AbstractInvoker/<a rel="nofollow" href="http://www.adobe.com/2006/flex/mx/internal::faultHandler(" target="_blank">http://www.adobe.com/2006/flex/mx/internal::faultHandler(</a>)
      at mx.rpc::Responder/fault()
      at mx.rpc::AsyncRequest/fault()
      at ::DirectHTTPMessageResponder/securityErrorHandler()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at flash.net::URLLoader/flash.net:URLLoader::redirectEvent()</pre>
<p> </p>
<p>When you check out the <a href="http://www.adobe.com/xml/schemas/PolicyFile.xsd" target="_blank">XSD for policy files</a>, you&#8217;ll notice that (among other things) they&#8217;ve added a &#8220;allow-http-request-headers-from&#8221; element. So the new &#8220;come and get it&#8221; policy file looks like this:</p>
<pre>&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE cross-domain-policy SYSTEM
"http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"&gt;
&lt;cross-domain-policy&gt;
    &lt;allow-access-from domain="*" to-ports="*" /&gt;
    &lt;allow-http-request-headers-from domain="*" headers="SOAPAction"/&gt;
&lt;/cross-domain-policy&gt;</pre>
<p> </p>
<p>This should allow you to consume your services from basically anywhere. Remember to lock your stuff down when you deploy.</p>
]]></content:encoded>
			<wfw:commentRss>http://lukesh.com/blog/2008/06/policy-file-changes-for-flash-player-901240-strict-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Funny little bug in Flash E4X</title>
		<link>http://lukesh.com/blog/2008/05/funny-little-bug-in-flash-e4x/</link>
		<comments>http://lukesh.com/blog/2008/05/funny-little-bug-in-flash-e4x/#comments</comments>
		<pubDate>Fri, 30 May 2008 17:44:11 +0000</pubDate>
		<dc:creator>lukesh</dc:creator>
				<category><![CDATA[Flash Platform]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[e4x]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://lukesh.wordpress.com/?p=30</guid>
		<description><![CDATA[This works (outputs ID&#8217;s): new Array(); var attributes:XMLList = _data.Attributes..AttributeDescriptor; for each(var attribute:XML in attributes) { trace(attribute.@ID); } This doesn&#8217;t (outputs nulls): var attributes:XMLList = _data.Attributes..AttributeDescriptor; for each(var attribute:XML in attributes) { trace(attribute.@ID); } Any questions? Update: Kudos to Larry (developmentastic.com) for beating his head against this brick wall on the Winestore project.]]></description>
			<content:encoded><![CDATA[<p>This works (outputs ID&#8217;s):</p>
<pre>
new Array();
var attributes:XMLList = _data.Attributes..AttributeDescriptor;
for each(var attribute:XML in attributes)
{
	trace(attribute.@ID);
}
</pre>
<p>This doesn&#8217;t (outputs nulls):</p>
<pre>
var attributes:XMLList = _data.Attributes..AttributeDescriptor;
for each(var attribute:XML in attributes)
{
	trace(attribute.@ID);
}
</pre>
<p>Any questions?</p>
<p>Update: Kudos to Larry (<a href="http://developmentastic.com/">developmentastic.com</a>) for beating his head against this brick wall on the Winestore project.</p>
]]></content:encoded>
			<wfw:commentRss>http://lukesh.com/blog/2008/05/funny-little-bug-in-flash-e4x/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
