<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>All your flex are belong to us!</title>
	<atom:link href="http://allyourflex.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://allyourflex.wordpress.com</link>
	<description>Flex, ActionScript, Incoherent Ramblings</description>
	<lastBuildDate>Wed, 06 May 2009 17:30:08 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='allyourflex.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/2c149acc1af540e8a0e3876cc190f1c3?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>All your flex are belong to us!</title>
		<link>http://allyourflex.wordpress.com</link>
	</image>
			<item>
		<title>FlexCamp OC &#8211; Cocomo Overview</title>
		<link>http://allyourflex.wordpress.com/2009/02/05/flexcamp-oc-cocomo-overview/</link>
		<comments>http://allyourflex.wordpress.com/2009/02/05/flexcamp-oc-cocomo-overview/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 20:19:44 +0000</pubDate>
		<dc:creator>mbir</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Cocomo]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[360Flex]]></category>
		<category><![CDATA[FlexCamp]]></category>

		<guid isPermaLink="false">http://allyourflex.wordpress.com/?p=39</guid>
		<description><![CDATA[So FlexCamp OC is a wrap.  It was great to see everyone out there, even with the odd security at Boeing (sorry Suraj &#8211; REJECTED)&#8230;  All in all it was a lot of fun, unfortunately I did miss the middle sessions as I had to run back to my daughters Science Fair in Irvine (Gabi [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=allyourflex.wordpress.com&blog=3328552&post=39&subd=allyourflex&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So FlexCamp OC is a wrap.  It was great to see everyone out there, even with the odd security at Boeing (sorry Suraj &#8211; REJECTED)&#8230;  All in all it was a lot of fun, unfortunately I did miss the middle sessions as I had to run back to my daughters Science Fair in Irvine (Gabi won top honors in her category!).</p>
<p>So as promised, here are the recommended links from my Cocomo presentation:</p>
<p>Cocomo page on Adobe labs:<a href="http://labs.adobe.com/technologies/cocomo/"> http://labs.adobe.com/technologies/cocomo/</a></p>
<p>Cocomo Developer Portal: <a href="https://cocomo.acrobat.com/">https://cocomo.acrobat.com/</a></p>
<p>Cocomo Dev Blogs: <a href="http://blogs.adobe.com/collabmethods/">http://blogs.adobe.com/collabmethods/</a></p>
<p>In addition here is my PowerPoint file (<a href="http://allyourflex.files.wordpress.com/2009/02/flexcampoc-marc-bir-cocomo.ppt">Cocomo Overview</a>), although without the discussion from the conference not really sure how useful it is.  <a href="http://flexfrenzy.com/">Jeremy</a> is promising we will have the videos from the conference online &#8220;soon&#8221;&#8230; Will update this post with a link when available.</p>
<p><a href="http://allyourflex.files.wordpress.com/2009/02/flexcampoc-marc-bir-cocomo.ppt"></a></p>
<p>All the demos presented at the session were straight out of the CocomoSDK, so go sign up now and start collaborating!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/allyourflex.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/allyourflex.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/allyourflex.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/allyourflex.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/allyourflex.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/allyourflex.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/allyourflex.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/allyourflex.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/allyourflex.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/allyourflex.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=allyourflex.wordpress.com&blog=3328552&post=39&subd=allyourflex&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://allyourflex.wordpress.com/2009/02/05/flexcamp-oc-cocomo-overview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/885e10200e5bcc402e15c42023ec01db?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mbir</media:title>
		</media:content>
	</item>
		<item>
		<title>E4X is Good4U &#8211; MAX Session</title>
		<link>http://allyourflex.wordpress.com/2008/11/17/e4x-is-good4u-max-session/</link>
		<comments>http://allyourflex.wordpress.com/2008/11/17/e4x-is-good4u-max-session/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 05:17:30 +0000</pubDate>
		<dc:creator>mbir</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[E4X]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[Adobe MAX]]></category>

		<guid isPermaLink="false">http://allyourflex.wordpress.com/?p=35</guid>
		<description><![CDATA[Just wrapped my session at Adobe MAX on E4X.  I think the session went well, although there were not as many questions during the session compared to the previous times I&#8217;ve given this topic.  Don&#8217;t know if that means I&#8217;m getting better at covering the topic or losing the audience&#8230;
I did get several good questions [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=allyourflex.wordpress.com&blog=3328552&post=35&subd=allyourflex&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Just wrapped my session at Adobe MAX on E4X.  I think the session went well, although there were not as many questions during the session compared to the previous times I&#8217;ve given this topic.  Don&#8217;t know if that means I&#8217;m getting better at covering the topic or losing the audience&#8230;</p>
<p>I did get several good questions at the very end of the session (post closing &#8211; so unfortunately it did not go on the recording).</p>
<p>The two followups I have from the session are on XSLT and data validation (XSD/DTD).  Stay tuned for updates on those.</p>
<p>Presentation slides (warning, it is a big file -700k- because of the Adobe images):</p>
<p><a href="http://www.rapidninja.com/blog/MAX2008/Marc_Bir_E4X.ppt" target="_blank">http://www.rapidninja.com/blog/MAX2008/Marc_Bir_E4X.ppt<br />
</a></p>
<p>The code for the samples</p>
<p><a href="http://www.rapidninja.com/blog/MAX2008/E4XSamples.zip" target="_blank">http://www.rapidninja.com/blog/MAX2008/E4XSamples.zip</a></p>
<p>And finally the CSV2XML converter I used to create the Sessions XML file.</p>
<p><a href="http://www.rapidninja.com/blog/MAX2008/CSV2XML.zip" target="_blank">http://www.rapidninja.com/blog/MAX2008/CSV2XML.zip</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/allyourflex.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/allyourflex.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/allyourflex.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/allyourflex.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/allyourflex.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/allyourflex.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/allyourflex.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/allyourflex.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/allyourflex.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/allyourflex.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=allyourflex.wordpress.com&blog=3328552&post=35&subd=allyourflex&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://allyourflex.wordpress.com/2008/11/17/e4x-is-good4u-max-session/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/885e10200e5bcc402e15c42023ec01db?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mbir</media:title>
		</media:content>
	</item>
		<item>
		<title>360Flex E4X</title>
		<link>http://allyourflex.wordpress.com/2008/08/19/360flex-e4x/</link>
		<comments>http://allyourflex.wordpress.com/2008/08/19/360flex-e4x/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 15:55:47 +0000</pubDate>
		<dc:creator>mbir</dc:creator>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[360Flex]]></category>
		<category><![CDATA[360Flex08]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[E4X]]></category>

		<guid isPermaLink="false">http://allyourflex.wordpress.com/?p=17</guid>
		<description><![CDATA[Here are the materials for my session on introducing E4X at 360Flex 08 San Jose.  If you aren&#8217;t at 360Flex you are REALLY missing out, Tom and John really know how to put on a fun show.  
First is the e4xSamples project archive that include all the sample E4X code:
http://www.rapidninja.com/blog/360FlexE4X/E4XSamples.zip
*updated 8/20 2PM PST
Second is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=allyourflex.wordpress.com&blog=3328552&post=17&subd=allyourflex&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Here are the materials for my session on introducing E4X at 360Flex 08 San Jose.  If you aren&#8217;t at <a href="http://www.360flex.com">360Flex</a> you are REALLY missing out, Tom and John really know how to put on a fun show.  <span id="more-17"></span></p>
<p>First is the e4xSamples project archive that include all the sample E4X code:</p>
<p><a href="http://www.rapidninja.com/blog/360FlexE4X/E4XSamples.zip">http://www.rapidninja.com/blog/360FlexE4X/E4XSamples.zip</a></p>
<p><em><strong>*updated 8/20 2PM PST</strong></em></p>
<p>Second is the simple XMLPresenter that I used instead of PowerPoint.</p>
<p><a href="http://www.rapidninja.com/blog/360FlexE4X/XMLPresenter.zip">http://www.rapidninja.com/blog/360FlexE4X/XMLPresenter.zip</a></p>
<p>I actually forgot to mention during the presentation that my &#8220;slides&#8221; were run through a super simple Flex app using e4x, so check out the XMLPresenter project for how I did that.  Having recently converted to Mac I was planning to run Powerpoint in a VM, but was warned Powerpoint gets tripped up on the resolution changes to support the projector (1024&#215;768 ) and it causes nothing but problems.  So to avoid that headache I just wrote the &#8220;XMLPresenter&#8221; yesterday afternoon.</p>
<p>I&#8217;ll be updating this entry with feedback from the session as attendees ask questions, including updating the sample code, so check back often if you want more information.</p>
<p>Here are the promised links for reference material:</p>
<p><a href="http://www.adobe.com/devnet/flex/articles/e4x.html">http://www.adobe.com/devnet/flex/articles/e4x.html</a></p>
<p><a href="http://dispatchevent.org/roger/as3-e4x-rundown/">http://dispatchevent.org/roger/as3-e4x-rundown/</a> <a href="http://www.xml.com/pub/a/2007/11/28/introducing-e4x.html?page=2"> </a></p>
<p><a href="http://www.xml.com/pub/a/2007/11/28/introducing-e4x.html?page=2">http://www.xml.com/pub/a/2007/11/28/introducing-e4x.html?page=2 </a><a href="http://www.adobe.com/devnet/flex/quickstart/accessing_xml_data/"></a></p>
<p><a href="http://www.adobe.com/devnet/flex/quickstart/accessing_xml_data/">http://www.adobe.com/devnet/flex/quickstart/accessing_xml_data/ </a></p>
<p><a href="http://www.adobe.com/devnet/flex/quickstart/accessing_xml_data/"></a><a href="http://learn.adobe.com/wiki/display/Flex/E4X">http://learn.adobe.com/wiki/display/Flex/E4X </a></p>
<p><a href="http://learn.adobe.com/wiki/display/Flex/E4X"></a><a href="http://blogs.adobe.com/flexdoc/2008/04/masterdetail_flex_application_1.html">http://blogs.adobe.com/flexdoc/2008/04/masterdetail_flex_application_1.html </a></p>
<p><a href="http://blogs.adobe.com/flexdoc/2008/04/masterdetail_flex_application_1.html"></a><a href="http://www.devx.com/webdev/Article/33393/1954">http://www.devx.com/webdev/Article/33393/1954</a></p>
<p>Link to the free Adobe Video for this session coming soon&#8230;.<br />
<em><strong>*Update 8/20 2PM PST* </strong></em> Now available <a href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741160964?src=mrss">here</a></p>
<p>Thanks Ted and Stacy!  Check out all the <a href="http://onflex.org/">360Flex Sessions here</a>.</p>
<h2>Post session feedback</h2>
<p>Had a lot of fun at the session including some great audience participation Q&amp;A both during and after the session.  Couple quick notes:</p>
<p><strong>Code will be commented shortly</strong>.  The presentation had a pretty limited screen size so I intentionally kept all the code very terse, obviously once it is distributed and you have it in your Flex Builder some comments would help.  Expect an update by end of week with more &#8220;documentation&#8221;. <em><strong>*Done 8/20 2PM PST*</strong></em></p>
<p><strong>Sorting</strong>.  One of the questions was on sorting the result of an e4x expression and I totally missed the XMLListCollection which adds sorting and filtering (code based filtering, not e4x style).    Thankfully one of the attendees came up after the session to let me know about XMLListCollection, and I just wanted to state I really appreciate it when I get feedback (critiques, tips, answers) but unfortunately did not catch the name of the individual that stepped up (he also helped with an earlier session question as well).  I&#8217;ve updated the sample code and will publish it as soon as I get the other updates ready. <em><strong>*Done 8/20 2PM PST* See the e4xSimple component.<br />
</strong></em></p>
<p><strong>Distinct Results of e4x queries</strong>.  So what happens when you want a distinct result list from an e4x query?  Unfortunately that isn&#8217;t supported natively, but you can accomplish it with a little code to manage the distinct search.  Check out <a href="http://developer.yahoo.com/flash/articles/e4x-beginner-to-advanced.html">Josh Tynjala&#8217;s article on the Yahoo! Developer Network</a> for a quick summary on how to make that happen.  I&#8217;ll also drop Josh&#8217;s technique into the sample code asap. <em><strong>*Done 8/20 2PM PST* See the e4xFiltering component.<br />
</strong></em></p>
<p><strong>Unknown XML Files</strong>.  What if you don&#8217;t know the structure of the xml you are loading?  Is e4x still helpful then?  The answer is yes, you can still use combinations of the descendants, child, attribute, and wildcard methods to effectively navigate the structure.</p>
<p><strong>Comparing two XML files</strong>.  The question then arose can you use e4x to write a differencing tool to see the differences in two XML files, and the answer is yes AND it is a perfect sample code for the previous question.  Update coming soon&#8230; <em><strong>*Done 8/20 2PM PST* See e4xCompare component.<br />
</strong></em></p>
<h3>Thanks again to everyone that attended the session, it was an amazingly packed house.</h3>
<p><em><strong>*Update 8/20 2PM PST*</strong></em></p>
<p>Just posted the updated sample code with several new examples.  If you have any questions on how to do things in e4x please ask, would love to extend the sample app to be a pretty extensive sample set.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/allyourflex.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/allyourflex.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/allyourflex.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/allyourflex.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/allyourflex.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/allyourflex.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/allyourflex.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/allyourflex.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/allyourflex.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/allyourflex.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/allyourflex.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/allyourflex.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=allyourflex.wordpress.com&blog=3328552&post=17&subd=allyourflex&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://allyourflex.wordpress.com/2008/08/19/360flex-e4x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/885e10200e5bcc402e15c42023ec01db?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mbir</media:title>
		</media:content>
	</item>
		<item>
		<title>360 Flex San Jose 08, E4X</title>
		<link>http://allyourflex.wordpress.com/2008/05/21/360-flex-san-jose-08-e4x/</link>
		<comments>http://allyourflex.wordpress.com/2008/05/21/360-flex-san-jose-08-e4x/#comments</comments>
		<pubDate>Wed, 21 May 2008 17:54:14 +0000</pubDate>
		<dc:creator>mbir</dc:creator>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[360Flex]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[E4X]]></category>

		<guid isPermaLink="false">http://allyourflex.wordpress.com/?p=16</guid>
		<description><![CDATA[
Just got my confirmation to present at 360 Flex this August in San Jose.  The sessions will focus on E4X, starting out fairly basic but hopefully moving very quickly to the more interesting advanced things that E4X lets you do in AS3.  I normally run with a fairly fluid agenda so we can [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=allyourflex.wordpress.com&blog=3328552&post=16&subd=allyourflex&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div class="post-content">
<p>Just got my confirmation to present at <a href="http://www.360conferences.com/360flex/">360 Flex</a> this August in San Jose.  The sessions will focus on E4X, starting out fairly basic but hopefully moving very quickly to the more interesting advanced things that E4X lets you do in AS3.  I normally run with a fairly fluid agenda so we can get conversations going during the session.  So bring questions!  We will be working through a ton of code samples as well.</p>
<p>Let me know if there are any specific areas of E4X that you find especially tricky (either to get working or even just remember) and I&#8217;ll see what I can do.</p>
<p>See you Tuesday Aug 19th @ 10am</p>
</div>
<div class="post-content">In case you don&#8217;t know <a href="http://www.360conferences.com/360flex/2007/06/360flex-what-were-about.html">about the 360 Flex conferences</a> it is an awesome conference designed to actually be affordable for developers.  I&#8217;ve known the guys running the show for about 4 years now (before they were cool) and they really care about making the show something worth attending and it shows.  So head on over and <a href="http://360flex.eventbrite.com/">register</a> now!</div>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/allyourflex.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/allyourflex.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/allyourflex.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/allyourflex.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/allyourflex.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/allyourflex.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/allyourflex.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/allyourflex.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/allyourflex.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/allyourflex.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/allyourflex.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/allyourflex.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=allyourflex.wordpress.com&blog=3328552&post=16&subd=allyourflex&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://allyourflex.wordpress.com/2008/05/21/360-flex-san-jose-08-e4x/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/885e10200e5bcc402e15c42023ec01db?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mbir</media:title>
		</media:content>
	</item>
		<item>
		<title>Fun with Canvas and DragDrop</title>
		<link>http://allyourflex.wordpress.com/2008/04/28/fun-with-canvas-and-dragdrop/</link>
		<comments>http://allyourflex.wordpress.com/2008/04/28/fun-with-canvas-and-dragdrop/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 23:24:46 +0000</pubDate>
		<dc:creator>mbir</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[acceptDragDrop]]></category>
		<category><![CDATA[Canvas]]></category>
		<category><![CDATA[DragDrop]]></category>
		<category><![CDATA[Flex3]]></category>

		<guid isPermaLink="false">http://allyourflex.wordpress.com/?p=14</guid>
		<description><![CDATA[So we were working on a simple little drag and drop interface for a project and ran into a weird bug that wouldn&#8217;t allow us to accept a drop onto a canvas no matter what we tried.  Fortunately I remember running into the same problem with Flex 2 a couple years ago, unfortunately I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=allyourflex.wordpress.com&blog=3328552&post=14&subd=allyourflex&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div><span style="font-size:10pt;font-family:'Courier New';color:#000000;">So we were working on a simple little drag and drop interface for a project and ran into a weird bug that wouldn&#8217;t allow us to accept a drop onto a canvas no matter what we tried.  Fortunately I remember running into the same problem with Flex 2 a couple years ago, unfortunately I couldn&#8217;t remember what I did to resolve it.  I just don&#8217;t use drag/drop very often and didn&#8217;t remember the details.</span></div>
<p><span style="font-size:10pt;font-family:'Courier New';color:#000000;">So what is the issue?  Here is the sample app:</span></p>
<p><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> </span></span></span></span><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> </span></span></span><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span id="more-14"></span><code><br />
<span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> </span></span></span></span></code><br />
<span style="font-size:10pt;font-family:'Courier New';color:#000000;">&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;</span>
</p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#0000ff;">&lt;mx:Application</span><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> xmlns:mx=&#8221;</span><span style="font-size:10pt;font-family:'Courier New';color:#990000;">http://www.adobe.com/2006/mxml</span><span style="font-size:10pt;font-family:'Courier New';color:#000000;">&#8221; layout=&#8221;</span><span style="font-size:10pt;font-family:'Courier New';color:#990000;">horizontal</span><span style="font-size:10pt;font-family:'Courier New';color:#000000;">&#8221; </span><span style="font-size:10pt;font-family:'Courier New';color:#0000ff;">&gt;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#006633;">&lt;mx:Script&gt;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;">&lt;![CDATA[</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">import</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> mx.controls.Image</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">import</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> mx.core.DragSource;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">import</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> mx.core.UIComponent</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">import</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> mx.events.DragEvent</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">import</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> mx.managers.DragManager</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">private</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> </span><strong><span style="font-size:10pt;font-family:'Courier New';color:#339966;">function</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> doDragEnter(event:DragEvent):</span><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">void</span></strong></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;">{<span> </span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span>DragManager.acceptDragDrop(UIComponent(event.target));</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;">}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">private</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> </span><strong><span style="font-size:10pt;font-family:'Courier New';color:#339966;">function</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> doDragDrop(event:DragEvent):</span><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">void</span></strong></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;">{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span></span><strong><span style="font-size:10pt;font-family:'Courier New';color:#6699cc;">var</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> img:Image;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span></span><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">if</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> (event.dragInitiator.parent == dropCanvas)<span> </span><span> </span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span>img = event.dragInitiator </span><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">as</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> Image;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span></span><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">else</span></strong></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span>{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span>img = </span><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">new</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> Image();</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span>img.source = (event.dragInitiator </span><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">as</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> Image).source;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span>img.addEventListener(MouseEvent.MOUSE_DOWN, doDragStart);</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span>dropCanvas.addChild(img);<span> </span><span> </span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span>}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span>img.x = event.localX - (event.dragSource.dataForFormat(</span><strong><span style="font-size:10pt;font-family:'Courier New';color:#990000;">"localX"</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;">) </span><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">as</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> Number);</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span>img.y = event.localY - (event.dragSource.dataForFormat(</span><strong><span style="font-size:10pt;font-family:'Courier New';color:#990000;">"localY"</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;">) </span><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">as</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> Number);</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;">}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">private</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> </span><strong><span style="font-size:10pt;font-family:'Courier New';color:#339966;">function</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> doDragStart(event:MouseEvent):</span><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">void</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> </span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;">{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span></span><strong><span style="font-size:10pt;font-family:'Courier New';color:#6699cc;">var</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> dragInitiator:Image = event.currentTarget </span><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">as</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> Image;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span></span><strong><span style="font-size:10pt;font-family:'Courier New';color:#6699cc;">var</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> dragSource:DragSource = </span><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">new</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> DragSource();</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span></span><strong><span style="font-size:10pt;font-family:'Courier New';color:#6699cc;">var</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> dragProxy:Image = </span><strong><span style="font-size:10pt;font-family:'Courier New';color:#0033ff;">new</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> Image();</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span>dragProxy.source = dragInitiator.source;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span>dragProxy.width = dragInitiator.width;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span>dragProxy.height= dragInitiator.height;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span>dragSource.addData(event.localX, </span><strong><span style="font-size:10pt;font-family:'Courier New';color:#990000;">"localX"</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;">);</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span>dragSource.addData(event.localY, </span><strong><span style="font-size:10pt;font-family:'Courier New';color:#990000;">"localY"</span></strong><span style="font-size:10pt;font-family:'Courier New';color:#000000;">);</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span>DragManager.doDrag(dragInitiator, dragSource, event, dragProxy);</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;">}</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;">]]&gt;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#006633;">&lt;/mx:Script&gt;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span></span><span style="font-size:10pt;font-family:'Courier New';color:#0000ff;">&lt;mx:VBox&gt;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;">
<div class="MsoNormal" style="line-height:normal;margin:0;">
<div><span style="font-size:10pt;font-family:'Courier New';color:#000000;"></p>
<p></span></div>
<p align="left">
<p align="left"><span style="font-size:x-small;color:#0000ff;">&lt;mx:Image</span><span style="font-size:x-small;"> source=&#8221;</span><span style="font-size:x-small;color:#990000;">@Embed(&#8216;assets/Hawk.jpg&#8217;)</span><span style="font-size:x-small;">&#8221; mouseDown=&#8221;doDragStart(event)&#8221; </span><span style="font-size:x-small;color:#0000ff;">/&gt;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span></span><span style="font-size:10pt;font-family:'Courier New';color:#0000ff;">&lt;/mx:VBox&gt;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#000000;"><span> </span></span><span style="font-size:10pt;font-family:'Courier New';color:#0000ff;">&lt;mx:Canvas</span><span style="font-size:10pt;font-family:'Courier New';color:#000000;"> id=&#8221;</span><span style="font-size:10pt;font-family:'Courier New';color:#990000;">dropCanvas</span><span style="font-size:10pt;font-family:'Courier New';color:#000000;">&#8221; width=&#8221;</span><span style="font-size:10pt;font-family:'Courier New';color:#990000;">100%</span><span style="font-size:10pt;font-family:'Courier New';color:#000000;">&#8221; height=&#8221;</span><span style="font-size:10pt;font-family:'Courier New';color:#990000;">100%</span><span style="font-size:10pt;font-family:'Courier New';color:#000000;">&#8221; borderColor=&#8221;</span><span style="font-size:10pt;font-family:'Courier New';color:#990000;">#1C5CC7</span><span style="font-size:10pt;font-family:'Courier New';color:#000000;">&#8221; dragEnter=&#8221;doDragEnter(event)&#8221; dragDrop=&#8221;doDragDrop(event)&#8221;<span> </span>borderStyle=&#8221;</span><span style="font-size:10pt;font-family:'Courier New';color:#990000;">solid</span><span style="font-size:10pt;font-family:'Courier New';color:#000000;">&#8221; cornerRadius=&#8221;</span><span style="font-size:10pt;font-family:'Courier New';color:#990000;">20</span><span style="font-size:10pt;font-family:'Courier New';color:#000000;">&#8221; borderThickness=&#8221;</span><span style="font-size:10pt;font-family:'Courier New';color:#990000;">6</span><span style="font-size:10pt;font-family:'Courier New';color:#000000;">&#8220;</span><span style="font-size:10pt;font-family:'Courier New';color:#0000ff;">/&gt;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:'Courier New';color:#0000ff;">&lt;/mx:Application&gt;</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:small;font-family:Calibri;"> </span></p>
<p><a title="Drag Drop" href="http://www.rapidninja.com/blog/swfs/DragDrop/DragDrop.html" target="_blank">Link to compiled SWF (with source view)</a> *updated Sept 6 to working link*</p>
<p>Now try to drag the image from the left. You&#8217;ll notice that as it hits the border it switches to accept the drag, however once you get inside the border it no longer accepts the drag. This was absolutely frustrating to research. Finally we figured out that not setting the backgroundColor means it interprets it as 100% transparent. Therefore when you are dragging on the transparent canvas it is looking to the application for the drag accept. The solution? Just set the backgroundColor. Using <span style="font-size:x-small;"><span style="font-family:Courier New;">backgroundColor=&#8221;<span style="font-size:10pt;color:#990000;">#7E92FC</span><span style="font-size:10pt;color:#000000;">&#8221; on the dropCanvas yields the results as expected.</span></span></span></p>
<p><a title="Drag Drop with Background Set" href="http://www.rapidninja.com/blog/swfs/DragDropWorks/DragDrop.html" target="_blank">Link to compiled working SWF</a> *updated Sept 6 to working link*</p>
<p>It totally makes sense once you think about it, but if you don&#8217;t know why it is happening it is absolutely frustrating, just ask <a href="http://www.anthonytanaka.com">Anthony</a> <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Note, the transparency rule applies to all drag targets (as we discovered when we were trying different containers like HBox, VBox, etc.</p></div>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/allyourflex.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/allyourflex.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/allyourflex.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/allyourflex.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/allyourflex.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/allyourflex.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/allyourflex.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/allyourflex.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/allyourflex.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/allyourflex.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/allyourflex.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/allyourflex.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=allyourflex.wordpress.com&blog=3328552&post=14&subd=allyourflex&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://allyourflex.wordpress.com/2008/04/28/fun-with-canvas-and-dragdrop/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/885e10200e5bcc402e15c42023ec01db?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mbir</media:title>
		</media:content>
	</item>
		<item>
		<title>Flex Builder Shortcuts</title>
		<link>http://allyourflex.wordpress.com/2008/04/26/flex-builder-shortcuts/</link>
		<comments>http://allyourflex.wordpress.com/2008/04/26/flex-builder-shortcuts/#comments</comments>
		<pubDate>Sat, 26 Apr 2008 09:49:36 +0000</pubDate>
		<dc:creator>mbir</dc:creator>
				<category><![CDATA[Flex Builder]]></category>

		<guid isPermaLink="false">http://allyourflex.wordpress.com/?p=5</guid>
		<description><![CDATA[I've found that many developers don't know some of the coolest time saving features available to them. This can be anything from patterns, frameworks, plugins, even databases. This post is focused on the one thing that most Flex developers use everyday, the IDE. One of the great things about Flex Builder being built on the Eclipse Platform is getting most the features Java (and other) developers have been used to for years.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=allyourflex.wordpress.com&blog=3328552&post=5&subd=allyourflex&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve found that many developers don&#8217;t know some of the coolest time saving features available to them.  This can be anything like patterns, frameworks, plugins, even databases.  This post is focused on the one thing that most <strong>Flex </strong>developers use everyday, the IDE.   I know some of you out there are using Notepad (or more likely TextMate or VI), but this post is for the rest of us that choose to suffer through the slings and arrows of Flex Builder.</p>
<p>One of the great things about Flex Builder being built on the Eclipse Platform is getting most (unfortunately not all) the features Java (and other) developers have been used to for years.  This post focuses on the shortcuts I like to use <em>nearly </em>everyday.</p>
<p><span id="more-5"></span></p>
<h2>Navigation</h2>
<ul>
<li>To kick off the list is <strong>[ctrl]+[click]</strong>.  This has to be the single fastest way to navigate through the code when following an execution path.  Note, this is the same as <strong>[F3]</strong>, or <strong>[rt click]</strong>-&gt;&#8221;<strong>Goto Definition</strong>&#8220;.</li>
<li><strong> [ctrl]+[o]</strong>.  Along the same lines as the above shortcut for quick navigation, <strong>[ctrl]+[o]</strong> brings up the quick outline.  Note that the box on top is a filter box (a common theme in the IDE) that filters the contents  (note it does not support wild cards)<br />
<a href="http://allyourflex.files.wordpress.com/2008/04/quickoutline.jpg"><img class="alignnone size-full wp-image-6" src="http://allyourflex.files.wordpress.com/2008/04/quickoutline.jpg?w=400&#038;h=300" alt="" width="400" height="300" /></a></li>
<li><strong>[ctrl]+[f6]</strong> (same as <strong>[ctrl]+[tab]</strong>), <strong>[ctrl]+[f7]</strong>, &amp; <strong>[ctrl]+[f8]</strong>.  These all basically do the same thing, just for different aspects.  They bring up a list of Editors, Views, or Perspectives in last visited order.  This means you can toggle between the last two items very quickly.  I also find this much faster for finding a specific file than scanning the tabs across the top.<br />
<a href="http://allyourflex.files.wordpress.com/2008/04/editors.jpg"><img src="http://allyourflex.files.wordpress.com/2008/04/editors.jpg" alt="" /></a><a href="http://allyourflex.files.wordpress.com/2008/04/views.jpg"><img class="alignnone size-full wp-image-9" style="vertical-align:top;" src="http://allyourflex.files.wordpress.com/2008/04/views.jpg" alt="Views" /></a><a href="http://allyourflex.files.wordpress.com/2008/04/perspectives.jpg"><img style="vertical-align:top;" src="http://allyourflex.files.wordpress.com/2008/04/perspectives.jpg" alt="Perspectives" /></a></li>
<li><strong>[ctrl]+[e]</strong> &#8211; Similar to <strong>[ctrl]+[f6]</strong>, the big advantage this feature has is the search box (including pattern matching).  If I&#8217;m switching between more than just two files this is my preferred method.<img class="alignnone size-full wp-image-12" src="http://allyourflex.files.wordpress.com/2008/04/otheropeneditors.jpg" alt="" width="192" height="340" /></li>
<li><strong>[ctrl]+[pg up] </strong>&amp;<strong> [ctrl]+[pg down]</strong> Since we are talking about moving through views, these are the easiest way to sequentially move through editors.  Since I have a tendency to have a dozen or more open at a time I use this less than two methods above.</li>
<li><strong>[ctrl]+[shift]+[t] </strong>&amp;<strong> </strong><strong>[ctrl]+[shift]+[r]</strong>.  Open Type and Open Resource, both dialogs are great time savers for opening a target file or class.  If you are like me and hate to use the mouse any more than absolutely necessary these two dialogs eliminate any need to use the navigator to find a file.  Both dialogs are effectively the same, but Open Type only lists types which makes it faster for Type searches.<img class="alignnone size-full wp-image-11" src="http://allyourflex.files.wordpress.com/2008/04/openresource.jpg" alt="" width="415" height="387" /></li>
<li><strong>[ctrl]+[shift]+[g]</strong> &#8211; Search for References in the current workspace.  This is great when assessing code change impacts.  Just place the cursor on the symbol you want to hunt for and hit <strong>[ctrl]+[shift]+[g]</strong> the search view will spit out every reference in your current workspace.  There is also <strong>[ctrl]+[g]</strong> for searching for Definitions, I just don&#8217;t use it very often.</li>
<li><strong>[alt]+[left] [alt]+[right]</strong> &#8211; Moves through the last areas you edited.  Basically a super <strong>weak</strong> version of Bookmarks.</li>
<li><strong>[ctrl]+[m]</strong> Maximize Window toggle, same a double clicking the tab for the editor.  I use this constantly to see more code and then jump back to debug view.</li>
<li><strong>[ctrl]+[shift]+[p]</strong> &#8211; Goto matching bracket, really useful on larger blocks of code.</li>
<li><strong>[ctrl]+[L] </strong>- Goto Line #.  Especially useful when debugging an error spit out at runtime with a stack trace.</li>
<li><strong>[ctrl]+[,] </strong>&amp;<strong> [ctrl]+[.]</strong> &#8211; Next and Previous problem.</li>
<li><strong>[ctrl]+[f]</strong> Opens the find dialog, <strong>[ctrl]+[k]</strong> repeats the last search (same as [f3] in most windows based IDE&#8217;s)</li>
<li><strong>[ctrl]+[3]</strong> Quick Access <em>Uber tool</em>.  This little gem basically lets you execute anything.  You can switch editors, views, perspectives, execute commands, it even has a list of your previous choices to provide quick access to any commands that don&#8217;t have their own shortcuts.  Note again that this includes a filter, although it does not support wildcards <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  <img class="alignnone size-full wp-image-13" src="http://allyourflex.files.wordpress.com/2008/04/quickaccess.jpg" alt="" width="350" height="421" /></li>
</ul>
<h2>Code Editing</h2>
<ul>
<li><strong>[ctrl]+[space]</strong>.   Seriously, I&#8217;ve been asked more than once &#8220;what is that key that brings up the list of available methods?&#8221;  This is one of those features that makes life so much easier.  Even more than standard code completion, this great feature will automatically add the selected class to your imports if needed!  This is great when copying code between classes, I just delete the last character and trigger code completion, done!</li>
<li><strong>[ctrl]+[shift]+[space]</strong>, similar to code completion Parameter Assist is critical when working with libraries (like the Flex Framework).  It provides a summary of the parameters of the current method invocation.</li>
<li><strong>[ctrl]+[/] </strong>Super quick way to comment/uncomment lines of code</li>
<li><strong>[ctrl]+[d]</strong> Delete the current line</li>
<li><strong>[alt]+[up]</strong> &amp; <strong>[alt]+[down]</strong> Move current line up (or down).  Great for quickly moving code around.  Also works with groups of code by highlighting multiple lines.</li>
<li><strong>[ctrl]+[alt]+[up] </strong>- Duplicate current (or selected) lines.</li>
<li><strong>[ctrl]+[shift]+[o] </strong>- Organize Imports, basically just removes any unnecessary imports.</li>
</ul>
<p>One last shortcut that must be listed</p>
<p><strong>[ctrl]+[shift]+[L]</strong> lists all shortcuts, hit <strong>[ctrl]+[shift]+[L]</strong> with the list open to open the editor.</p>
<p>With all that said, I sorely miss two things from my CodeGear/MSVS IDE&#8217;s.  First is autoformatting.  I know a lot of people hate to have the format forced on you, however I find it a great time saver and keeps things nice and tidy.  And yes I know that Eclipse has autoformatting features, but not for MXML/AS (at least not that I can find, PLEASE let me know if I&#8217;m wrong).</p>
<p>Second is bookmarks.  I&#8217;m used to setting a bookmark with <strong>[ctrl]+[shift]+[1]</strong>, then I can be anywhere else in the project and hit <strong>[ctrl]+[1]</strong> to jump to the bookmark.</p>
<p>Actually, make that three things &#8211; Refactoring Tools.  This is another one where Java tools in Eclipse have the features, but AS doesn&#8217;t.</p>
<p>Ok so this post started as a quick hit list of my most used shortcuts, but I made the mistake of leaving the draft up while I was working on a project.  Each time I used a shortcut I dropped it on the post, now it has gone from a quick list to a pretty long list&#8230;  One of these days I&#8217;ll learn how to be more timely with my posts to keep them from being to long winded&#8230;</p>
<p>So what are your favorite shortcuts?</p>
<p><strong>Update May 6th, 2009</strong></p>
<p>Ernest Pasour has answered one of my wish list items and created an open source Flex Formatter (works with AS &amp; MXML).  You can grab it off SourceForge <a href="http://sourceforge.net/projects/flexformatter/">here</a>.  My recommendation is to add a new Remote Site in Eclipse with:</p>
<pre>Name: Flex Formatter
URL: http://flexformatter.googlecode.com/svn/trunk/FlexFormatter/FlexPrettyPrintCommandUpdateSite</pre>
<p>This allows you to keep up to date with changes easily. (And Ernest is obviously quite busy adding features).</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/allyourflex.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/allyourflex.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/allyourflex.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/allyourflex.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/allyourflex.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/allyourflex.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/allyourflex.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/allyourflex.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/allyourflex.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/allyourflex.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/allyourflex.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/allyourflex.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=allyourflex.wordpress.com&blog=3328552&post=5&subd=allyourflex&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://allyourflex.wordpress.com/2008/04/26/flex-builder-shortcuts/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/885e10200e5bcc402e15c42023ec01db?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mbir</media:title>
		</media:content>

		<media:content url="http://allyourflex.files.wordpress.com/2008/04/quickoutline.jpg" medium="image" />

		<media:content url="http://allyourflex.files.wordpress.com/2008/04/editors.jpg" medium="image" />

		<media:content url="http://allyourflex.files.wordpress.com/2008/04/views.jpg" medium="image">
			<media:title type="html">Views</media:title>
		</media:content>

		<media:content url="http://allyourflex.files.wordpress.com/2008/04/perspectives.jpg" medium="image">
			<media:title type="html">Perspectives</media:title>
		</media:content>

		<media:content url="http://allyourflex.files.wordpress.com/2008/04/otheropeneditors.jpg" medium="image" />

		<media:content url="http://allyourflex.files.wordpress.com/2008/04/openresource.jpg" medium="image" />

		<media:content url="http://allyourflex.files.wordpress.com/2008/04/quickaccess.jpg" medium="image" />
	</item>
		<item>
		<title>ASyncToken and IResponder</title>
		<link>http://allyourflex.wordpress.com/2008/03/31/asynctoken-and-iresponder/</link>
		<comments>http://allyourflex.wordpress.com/2008/03/31/asynctoken-and-iresponder/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 06:34:17 +0000</pubDate>
		<dc:creator>mbir</dc:creator>
				<category><![CDATA[MX Core]]></category>
		<category><![CDATA[asynctoken]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[iresponder]]></category>
		<category><![CDATA[webservices]]></category>

		<guid isPermaLink="false">http://allyourflex.wordpress.com/?p=3</guid>
		<description><![CDATA[So here is a weird little problem I ran into while using the generated webservice code in Flex 3. Basically if using the ASyncToken returned by the proxy class with an IResponder, the token never triggered any of the IResponder we never got a response.  We tried to use the standard code like:

var service:MyWebService [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=allyourflex.wordpress.com&blog=3328552&post=3&subd=allyourflex&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So here is a weird little problem I ran into while using the generated webservice code in Flex 3. Basically if using the ASyncToken returned by the proxy class with an IResponder, the token never triggered any of the IResponder we never got a response.  We tried to use the standard code like:</p>
<p><code><br />
var service:MyWebService = new MyWebService();<br />
var token:ASyncToken = service.myTestFunction();<br />
token.addResponder(this);</code></p>
<p><span id="more-3"></span></p>
<p>However the responder functions (result and fault) are never called. The easy work around is using addEventListener, but it doesn&#8217;t explain why the ASyncToken never fires. I know in Flex 3 they extended the ASyncToken to user an array of responders instead of just one, unfortunately I have not been able to trace the dispatch code to the level required to see why the following sample fails. Am I just completely misunderstanding the framework??</p>
<p><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;</code><code><span style="color:#0000ff;"><br />
&lt;mx:Application xmlns:mx="<span style="color:#990000;">http://www.adobe.com/2006/mxml</span>" implements="<span style="color:#990000;">mx.rpc.IResponder</span>" layout="<span style="color:#990000;">vertical</span>"<span style="color:#0000ff;">&gt;</span></span></code></p>
<p><span style="color:#0000ff;"><span style="color:#006633;">&lt;mx:Script&gt;</span></span></p>
<p><span style="color:#0000ff;">&lt;![CDATA[<br />
<strong><span style="color:#0033ff;">import</span></strong> mx.rpc.events.ResultEvent;<br />
<strong><span style="color:#0033ff;">import</span></strong> mx.rpc.AsyncToken;<br />
<strong><span style="color:#0033ff;">import</span></strong> mx.controls.Alert;<br />
<strong><span style="color:#0033ff;">import</span></strong> mx.rpc.IResponder;<br />
<strong><span style="color:#0033ff;">import</span></strong> mx.rpc.events.FaultEvent;</span></p>
<p><span style="color:#ff0000;">import mx.core.mx_internal;<br />
use namespace mx_internal;</span></p>
<p><code><span style="color:#0000ff;"><strong><span style="color:#0033ff;">public</span></strong> <strong><span style="color:#339966;">function</span></strong> result(data:Object):<strong><span style="color:#0033ff;">void</span></strong><br />
{<br />
Alert.show(<strong><span style="color:#990000;">"result"</span></strong>);<br />
}<br />
<strong><span style="color:#0033ff;">public</span></strong> <strong><span style="color:#339966;">function</span></strong> fault(info:Object):<strong><span style="color:#0033ff;">void</span></strong><br />
{<br />
Alert.show(<strong><span style="color:#990000;">"fault"</span></strong>);<br />
}</span></code><code> </code><code><strong></strong></code></p>
<p><code><strong><span style="color:#0033ff;">public</span></strong> <strong><span style="color:#339966;">function</span></strong> test():<strong><span style="color:#0033ff;">void</span></strong><br />
{<br />
<strong><span style="color:#6699cc;"> var</span></strong> token:AsyncToken = <strong><span style="color:#0033ff;">new</span></strong> AsyncToken(<strong><span style="color:#0033ff;">null</span></strong>);<br />
token.addResponder(<strong><span style="color:#0033ff;">this</span></strong>);<br />
Alert.show(<strong><span style="color:#990000;">"dispatching"</span></strong>);  token.dispatchEvent(ResultEvent.createEvent(result,token,<strong><span style="color:#0033ff;">null</span></strong>)); </code></p>
<p><code><span style="color:#ff0000;">ResultEvent.createEvent(result,token,null).<strong>callTokenResponders</strong>();</span><br />
}<br />
</code></p>
<p><code><strong><span style="color:#0033ff;">public</span></strong> <strong><span style="color:#339966;">function</span></strong> testWithEventListener():<strong><span style="color:#0033ff;">void</span></strong><br />
{<br />
<strong><span style="color:#6699cc;"> var</span></strong> token:AsyncToken = <strong><span style="color:#0033ff;">new</span></strong> AsyncToken(<strong><span style="color:#0033ff;">null</span></strong>);<br />
Alert.show(<strong><span style="color:#990000;">"this works"</span></strong>); </code></p>
<p>token.addEventListener(ResultEvent.RESULT, result);</p>
<p><code>token.dispatchEvent(ResultEvent.createEvent(result,token,<strong><span style="color:#0033ff;">null</span></strong>));</code></p>
<p><code>}</code></p>
<p><code> ]]&gt;<br />
<span style="color:#006633;">&lt;/mx:Script&gt;</span><br />
<span style="color:#0000ff;">&lt;mx:Button</span> label=&#8221;<span style="color:#990000;">TestMe</span>&#8221; click=&#8221;test();&#8221; <span style="color:#0000ff;">/&gt;</span></code></p>
<p><code><span style="color:#0000ff;">&lt;/mx:Application&gt;</span></code></p>
<p><strong>Update 4/23:</strong></p>
<p>I added some code to the above sample (highlighted in <span style="color:#ff0000;">Red</span>) to show how to get the token to actually call the responders.  The weird thing is a) the method is mx_internal b) the generated webservice does not reference it.  Seems like they expect you to use addEventListener instead of the token responders.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/allyourflex.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/allyourflex.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/allyourflex.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/allyourflex.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/allyourflex.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/allyourflex.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/allyourflex.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/allyourflex.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/allyourflex.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/allyourflex.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/allyourflex.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/allyourflex.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=allyourflex.wordpress.com&blog=3328552&post=3&subd=allyourflex&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://allyourflex.wordpress.com/2008/03/31/asynctoken-and-iresponder/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/885e10200e5bcc402e15c42023ec01db?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">mbir</media:title>
		</media:content>
	</item>
	</channel>
</rss>