<?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>The good times keep coming</title>
	<atom:link href="http://www.leonardsouza.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.leonardsouza.com</link>
	<description>general musings of leonard</description>
	<lastBuildDate>Thu, 22 Mar 2012 21:36:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>SXSW12 &#8211; Architecture meets Interaction Slides</title>
		<link>http://www.leonardsouza.com/hardware/arch_int/</link>
		<comments>http://www.leonardsouza.com/hardware/arch_int/#comments</comments>
		<pubDate>Sat, 10 Mar 2012 22:17:34 +0000</pubDate>
		<dc:creator>Leonard Souza</dc:creator>
				<category><![CDATA[architecture]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[illustration]]></category>
		<category><![CDATA[inspiration]]></category>
		<category><![CDATA[phenomenology]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[user experience]]></category>

		<guid isPermaLink="false">http://www.leonardsouza.com/?p=462</guid>
		<description><![CDATA[Here are our slides from SXSW2012 - enjoy!]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.leonardsouza.com/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wp-content/thumbnails/462.png&amp;w=200&amp;h=200&amp;zc=1&amp;ft=jpg&amp;q=100' alt='post thumbnail' /></p>
<p><iframe src="http://app.sliderocket.com:80/app/fullplayer.aspx?id=0dbb0a25-0b28-45db-a786-1547881d5c23" width="960" height="770" scrolling=no frameBorder="0"></iframe></p>
<p><br/><br/><br />
Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardsouza.com/hardware/arch_int/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Objective-C for AS3 devs presentation at 360Flex 2012 &#8211; Denver!</title>
		<link>http://www.leonardsouza.com/flex/360flex-2012-denver/</link>
		<comments>http://www.leonardsouza.com/flex/360flex-2012-denver/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 18:22:29 +0000</pubDate>
		<dc:creator>Leonard Souza</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[objective-c]]></category>

		<guid isPermaLink="false">http://www.leonardsouza.com/?p=453</guid>
		<description><![CDATA[For AS3 developers who want to expand their skill-set into native iOS and Mac OS X development, this talk is for you. One of the things that I really wanted when I first started learning Objective-C was a syntactical translation of AS3 into Objective-C nomenclature. You see, both languages actually share quite a bit in [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.leonardsouza.com/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wp-content/thumbnails/453.png&amp;w=200&amp;h=200&amp;zc=1&amp;ft=jpg&amp;q=100' alt='post thumbnail' /></p>
<p>For AS3 developers who want to expand their skill-set into native iOS and Mac OS X development, this talk is for you. One of the things that I really wanted when I first started learning Objective-C was a syntactical translation of AS3 into Objective-C nomenclature. You see, both languages actually share quite a bit in common, but it&#8217;s difficult to gain this insight without first digging through the (at first) insane syntax of Objective-C. If I just had someone who could hand-hold me through seeing the similarities, the time it took to adopt Objective-C would have been drastically reduced. Now, I want to be that person for you all!</p>
<p>So go to <a href="http://www.360flex.com/">360Flex&#8217;s website</a> and get yourself a ticket. John Wilker always makes sure 360Flex is friendly, fun, filled with networking opportunities and a great learning experience.</p>
<p><br/>
<p>Look! I even got my speaker badge!</p>
<p><a href="http://www.360flex.com/"><img src="/files/badges_leonard_souza.png"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardsouza.com/flex/360flex-2012-denver/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Speaking at SXSW 2012</title>
		<link>http://www.leonardsouza.com/inspiration/speaking-at-sxsw-2012/</link>
		<comments>http://www.leonardsouza.com/inspiration/speaking-at-sxsw-2012/#comments</comments>
		<pubDate>Sun, 06 Nov 2011 17:11:22 +0000</pubDate>
		<dc:creator>Leonard Souza</dc:creator>
				<category><![CDATA[architecture]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[inspiration]]></category>
		<category><![CDATA[speaking]]></category>
		<category><![CDATA[user experience]]></category>

		<guid isPermaLink="false">http://www.leonardsouza.com/?p=438</guid>
		<description><![CDATA[I'm going to be speaking at SXSW 2012. Check out the post for more details.]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.leonardsouza.com/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wp-content/thumbnails/438.png&amp;w=200&amp;h=200&amp;zc=1&amp;ft=jpg&amp;q=100' alt='post thumbnail' /></p>
<p>I&#8217;m excited to announce that my and Sean Coulter&#8217;s session <a href="http://panelpicker.sxsw.com/ideas/view/11951">&#8220;Physical Architecture meets Interaction Design&#8221;</a> has been accepted as a panel at SXSW 2012! Sean is a very close friend of mine and an outstanding, award-winning architect. He&#8217;s incredibly smart and insightful, so I&#8217;m honored to be presenting such a great topic beside him. I really hope you will come if you are attending SXSW, it will be a lot of fun.</p>
<p style="font-weight:bold">Here&#8217;s the description:</p>
<p>Physical architecture is about how environments interact with people. Interaction design is about the mind moving through abstract spaces. Somehow the two must intersect. This session is aimed at taking two design disciplines (physical architecture and interaction design) and finding where they relate, and how they can learn from one another. Interaction design has taken a lot from the field of architecture&#8217;s creative and scientific process. For example, wireframes are very similar to blueprints (construction documents). These similarities are ever present between the two. Truly, both fields blend art and science, as well as both sides of the mind. Expect to come away with a high-level understanding of how phenomenology influences our interactions, tangible and intangible, and how cognitive science can be used to manipulate perception. This talk will be a lot of fun, so come down with an open mind and a lot of questions!</p>
<p style="font-weight:bold">And the take-aways:</p>
<ol>
<li>What are the similarities and shared principles of interaction design and physical architecture?</li>
<li>What can interaction designers learn by thinking in the mindset of a physical architect?</li>
<li>How are space and movement relative to the field of interaction design?</li>
<li>How can cognitive science be used to shape the perception of users?</li>
<li>How and what phenomenology is, and how it can be applied to any creative endeavor.</li>
</ol>
<p>Thanks to my wonderful employer <a href="www.effectiveui.com">EffectiveUI</a> for all of the support!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardsouza.com/inspiration/speaking-at-sxsw-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kinect and Stage3D Presentation</title>
		<link>http://www.leonardsouza.com/uncategorized/kinect-stage3d/</link>
		<comments>http://www.leonardsouza.com/uncategorized/kinect-stage3d/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 15:45:19 +0000</pubDate>
		<dc:creator>Leonard Souza</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.leonardsouza.com/?p=423</guid>
		<description><![CDATA[Hey all, thanks for coming to my presentation. As promised, here are the slides and sources!]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.leonardsouza.com/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wp-content/thumbnails/423.jpg&amp;w=200&amp;h=200&amp;zc=1&amp;ft=jpg&amp;q=100' alt='post thumbnail' /></p>
<p><a rel="attachment wp-att-16" href="http://www.leonardsouza.com/flex/fierce-hardware-integration/attachment/fierce_title_slide/"><img class="aligncenter size-large wp-image-16" title="kinect_title_slide" src="http://www.leonardsouza.com/files/kinect_molehill.jpg" alt="" width="960" height="720" /></a><a href="http://www.leonardsouza.com/files/kinect_molehill_files.zip"></a></p>
<p>Hey all, thanks for coming to my presentation. As promised, here are the <a href="http://www.leonardsouza.com/files/kinect_molehill_files.zip">slides and sources!</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardsouza.com/uncategorized/kinect-stage3d/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Social Climber Alpha Sign-up &#8211; Check it!</title>
		<link>http://www.leonardsouza.com/ios/social-climber-valpha-check-it/</link>
		<comments>http://www.leonardsouza.com/ios/social-climber-valpha-check-it/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 18:48:23 +0000</pubDate>
		<dc:creator>Leonard Souza</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[macos]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[startup]]></category>

		<guid isPermaLink="false">http://www.leonardsouza.com/?p=407</guid>
		<description><![CDATA[Thought I&#8217;d share a little project I&#8217;m working on with you all. Joel Hooks and I have embarked upon creating our first Mac OSX native (Lion) app under the moniker alphaBoy. It&#8217;s gonna be pretty cool, and will really help twitter peeps manage and grow their audience &#8211; all in great style. If you are [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.leonardsouza.com/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wp-content/thumbnails/407.png&amp;w=200&amp;h=200&amp;zc=1&amp;ft=jpg&amp;q=100' alt='post thumbnail' /></p>
<p><a href="http://www.socialclimberapp.com"><img src="http://www.leonardsouza.com/files/social_climber_large.png" alt="" title="title_slide" width="600" height="450" class="aligncenter size-full wp-image-276" /></a></p>
<p>Thought I&#8217;d share a little project I&#8217;m working on with you all. <a href="http://joelhooks.com/">Joel Hooks</a> and I have embarked upon creating our first Mac OSX native (Lion) app under the moniker alphaBoy. It&#8217;s gonna be pretty cool, and will really help twitter peeps manage and grow their audience &#8211; all in great style.<br/></p>
<p>If you are interested in getting in on the beta (read: free software for a limited time), then head over to <a href="http://www.socialclimberapp.com">Social Climber&#8217;s teaser page</a> and sign-up! It&#8217;s gonna be great, thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardsouza.com/ios/social-climber-valpha-check-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash and the City &#8211; The Art of Interaction Slides</title>
		<link>http://www.leonardsouza.com/uncategorized/art_of_interaction_slides/</link>
		<comments>http://www.leonardsouza.com/uncategorized/art_of_interaction_slides/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 20:59:16 +0000</pubDate>
		<dc:creator>Leonard Souza</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.leonardsouza.com/?p=395</guid>
		<description><![CDATA[As promised, here are the slides from my presentation. Thanks for coming everyone!]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.leonardsouza.com/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wp-content/thumbnails/395.jpg&amp;w=200&amp;h=200&amp;zc=1&amp;ft=jpg&amp;q=100' alt='post thumbnail' /></p>
<p><img src="http://www.leonardsouza.com/files/art_of_interaction_full.jpg"/></p>
<div style="padding: 20px; background-color: #FFFFFF">
As promised, <a href="http://www.leonardsouza.com/files/art_of_interaction.pdf">here</a> are the slides from my presentation. Thanks for coming everyone!
</div</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardsouza.com/uncategorized/art_of_interaction_slides/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jürgen Mayer H. &#8211; Architect Extraordinaire</title>
		<link>http://www.leonardsouza.com/inspiration/jurgen-mayer-h-architect-extraordinaire/</link>
		<comments>http://www.leonardsouza.com/inspiration/jurgen-mayer-h-architect-extraordinaire/#comments</comments>
		<pubDate>Thu, 19 May 2011 18:06:50 +0000</pubDate>
		<dc:creator>Leonard Souza</dc:creator>
				<category><![CDATA[architecture]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[inspiration]]></category>

		<guid isPermaLink="false">http://www.leonardsouza.com/?p=379</guid>
		<description><![CDATA[Yet another wonderful, little documentary from GestaltenTV about an architect named Jürgen Mayer H.]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.leonardsouza.com/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wp-content/thumbnails/379.jpg&amp;w=200&amp;h=200&amp;zc=1&amp;ft=jpg&amp;q=100' alt='post thumbnail' /></p>
<p><object id="null" width="960" height="540" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param value="true" name="allowfullscreen"/><param value="always" name="allowscriptaccess"/><param value="high" name="quality"/><param value="true" name="cachebusting"/><param value="#000000" name="bgcolor"/><param name="movie" value="http://www.gestalten.com/sites/all/modules/custom-modules/motion/player/player-embed.swf" /><param value="config=%7B%22playlist%22%3A%5B%22http%3A%2F%2Fwww.gestalten.com%2Fsites%2Fdefault%2Ffiles%2Fmotion%2Fimages%2Fgestalten.tv_podmayerhi-res640x360.jpg%22%2C%7B%22url%22%3A%22http%3A%2F%2Fp.dgvtv.gestalten.netdna-cdn.com%2Fvod%2Fdgvtv.gestalten%2FGestalten.tv_Juergen_Mayer_H.m4v%22%2C%22autoPlay%22%3Afalse%2C%22scaling%22%3A%22scale%22%2C%22accelerated%22%3Atrue%7D%5D%7D" name="flashvars"/><embed src="http://www.gestalten.com/sites/all/modules/custom-modules/motion/player/player-embed.swf" type="application/x-shockwave-flash" width="960" height="540" allowfullscreen="true" allowscriptaccess="always" cachebusting="true" flashvars="config=%7B%22playlist%22%3A%5B%22http%3A%2F%2Fwww.gestalten.com%2Fsites%2Fdefault%2Ffiles%2Fmotion%2Fimages%2Fgestalten.tv_podmayerhi-res640x360.jpg%22%2C%7B%22url%22%3A%22http%3A%2F%2Fp.dgvtv.gestalten.netdna-cdn.com%2Fvod%2Fdgvtv.gestalten%2FGestalten.tv_Juergen_Mayer_H.m4v%22%2C%22autoPlay%22%3Afalse%2C%22scaling%22%3A%22scale%22%2C%22accelerated%22%3Atrue%7D%5D%7D" bgcolor="#000000" quality="true"></p>
<div style="font-family: Verdana, Arial, sans-serif; font-size: 10px;">Source:<a href="http://www.gestalten.tv" target="_blank">Gestalten.tv</a></div></embed></object></p>
<div width="100%" style="background: #FFFFFF; padding: 10px;">
Enter the mind of <a href="http://www.jmayerh.de/home.htm">Jürgen Mayer H.</a>, an architect based in Berlin, in this <a href="http://www.gestalten.tv">Gestalten.tv</a> short documentary. Mayer has the rare ability to take amorphous, organic forms and tastefully reflect them in his work. Somewhat of a cleaned-up, modern day <a href="http://en.wikipedia.org/wiki/Antoni_Gaud%C3%AD">Antoni Gaudí</a>, Mayer also exudes a touch of <a href="http://en.wikipedia.org/wiki/Frank_Gehry">Frank Gehry&#8217;s</a> aestheticism. Times are good.</p>
<p><br/>All works are copyright of the artists and companies mentioned.
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardsouza.com/inspiration/jurgen-mayer-h-architect-extraordinaire/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speaking at 360Flex in April!</title>
		<link>http://www.leonardsouza.com/uncategorized/speaking-at-360flex-in-april/</link>
		<comments>http://www.leonardsouza.com/uncategorized/speaking-at-360flex-in-april/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 16:26:24 +0000</pubDate>
		<dc:creator>Leonard Souza</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.leonardsouza.com/?p=369</guid>
		<description><![CDATA[Just wanted to let you all know that I will be presenting Microsoft Kinect and Molehill at this upcoming 360Flex, April 10-13. Here is the description: &#8220;The Microsoft Kinect, with its stereoscopic, infrared wizardry, has given us a fascinating tool for rich interaction design. For the first time, a high-quality, depth-sensing camera is widely available [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.leonardsouza.com/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wp-content/thumbnails/369.jpg&amp;w=200&amp;h=200&amp;zc=1&amp;ft=jpg&amp;q=100' alt='post thumbnail' /></p>
<p>Just wanted to let you all know that I will be presenting <em>Microsoft Kinect and Molehill</em> at this upcoming 360Flex, April 10-13. Here is the description:</p>
<p>&#8220;The Microsoft Kinect, with its stereoscopic, infrared wizardry, has given us a fascinating tool for rich interaction design. For the first time, a high-quality, depth-sensing camera is widely available at a price many people can afford. While this is exciting, equally so is Adobe&#8217;s new Molehill API, which takes advantage of GPU acceleration, allowing Flash direct access to DirectX and OpenGL.</p>
<p>The Kinect and Molehill are a match made in heaven. Come learn how to get the Kinect up and running on your machine, while also exposing it to Flash. Also learn the basics of Molehill and watch how Molehill and Kinect can work together. &#8221;</p>
<p>Register <a href="http://www.360flex.com/">here!</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardsouza.com/uncategorized/speaking-at-360flex-in-april/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speaking at Flash and the City &#8211; June 9-12</title>
		<link>http://www.leonardsouza.com/flex/speaking-at-flash-and-the-city-june-9-12/</link>
		<comments>http://www.leonardsouza.com/flex/speaking-at-flash-and-the-city-june-9-12/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 22:20:15 +0000</pubDate>
		<dc:creator>Leonard Souza</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[user experience]]></category>

		<guid isPermaLink="false">http://www.leonardsouza.com/?p=361</guid>
		<description><![CDATA[Hey all, I will be giving a talk on <em>UX: The Art of Interaction</em> at Flash and the City coming up in June! ]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.leonardsouza.com/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wp-content/thumbnails/361.jpg&amp;w=200&amp;h=200&amp;zc=1&amp;ft=jpg&amp;q=100' alt='post thumbnail' /></p>
<p>Hey all, I will be giving a talk on <em>UX: The Art of Interaction</em> at Flash and the City coming up in June! Here is the description:</p>
<p><strong>UX: The Art of Interaction</strong></p>
<p>Explore the driving forces behind User Experience Design. Join Leonard Souza, an Experience Architect with EffectiveUI, for a in-depth session aimed at delving into the finer points of UX for beginners and seasoned veterans alike. Learn the practical application of UX fundamentals while witnessing them first-hand in examples backed by theory. So come on down with an open-mind and a lot of questions; this one is going to be fun!</p>
<p><strong>Topics explored: </strong></p>
<p>Promoting Optimum Experience<br />
Visual Psychology<br />
Powerful Game Mechanics<br />
Exploiting Cognitive Associations<br />
Interactive Storytelling<br />
and more&#8230;</p>
<p>This conference is the bees knees when it comes to Flash, plus it&#8217;s in NY. <img src='http://www.leonardsouza.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Register here: http://fatc11.eventbrite.com/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardsouza.com/flex/speaking-at-flash-and-the-city-june-9-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alex Trochut &#8211; A Typographic Superhero</title>
		<link>http://www.leonardsouza.com/typography/alex-trochut/</link>
		<comments>http://www.leonardsouza.com/typography/alex-trochut/#comments</comments>
		<pubDate>Fri, 05 Nov 2010 21:31:30 +0000</pubDate>
		<dc:creator>Leonard Souza</dc:creator>
				<category><![CDATA[illustration]]></category>
		<category><![CDATA[inspiration]]></category>
		<category><![CDATA[typography]]></category>

		<guid isPermaLink="false">http://www.leonardsouza.com/?p=330</guid>
		<description><![CDATA[A documentary from <a href="http://www.gestalten.tv/">Gestalten TV</a> about a phenomenally talented illustrator named Alex Trochut.]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.leonardsouza.com/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wp-content/thumbnails/330.png&amp;w=200&amp;h=200&amp;zc=1&amp;ft=jpg&amp;q=100' alt='post thumbnail' /></p>
<p><object id="null" width="960" height="540" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param value="true" name="allowfullscreen"/><param value="always" name="allowscriptaccess"/><param value="high" name="quality"/><param value="true" name="cachebusting"/><param value="#000000" name="bgcolor"/><param name="movie" value="http://www.gestalten.com/sites/all/modules/custom-modules/motion/player/player-embed.swf" /><param value="config=%7B%22playlist%22%3A%5B%22http%3A%2F%2Fwww.gestalten.com%2Fsites%2Fdefault%2Ffiles%2Fmotion%2Fimages%2Fgestalten.tv_podtrochuthi-res640x360.jpg%22%2C%7B%22url%22%3A%22http%3A%2F%2Fhdserve.gestalten.com%2Fpodcast%2FGestalten.tv_HD_alex_trochut.m4v%0A%22%2C%22autoPlay%22%3Afalse%2C%22scaling%22%3A%22orig%22%2C%22accelerated%22%3Atrue%7D%5D%7D" name="flashvars"/><embed src="http://www.gestalten.com/sites/all/modules/custom-modules/motion/player/player-embed.swf" type="application/x-shockwave-flash" width="960" height="540" allowfullscreen="true" allowscriptaccess="always" cachebusting="true" flashvars="config=%7B%22playlist%22%3A%5B%22http%3A%2F%2Fwww.gestalten.com%2Fsites%2Fdefault%2Ffiles%2Fmotion%2Fimages%2Fgestalten.tv_podtrochuthi-res640x360.jpg%22%2C%7B%22url%22%3A%22http%3A%2F%2Fhdserve.gestalten.com%2Fpodcast%2FGestalten.tv_HD_alex_trochut.m4v%0A%22%2C%22autoPlay%22%3Afalse%2C%22scaling%22%3A%22orig%22%2C%22accelerated%22%3Atrue%7D%5D%7D" bgcolor="#000000" quality="true"></p>
<div style="font-family: Verdana, Arial, sans-serif; font-size: 10px;">Source:<a href="http://www.gestalten.tv" target="_blank">Gestalten.tv</a></div></embed></object></p>
<div width="100%" style="background: #FFFFFF; padding: 10px;">
If you were to marry the pop-culture sensibilities of <a href="http://en.wikipedia.org/wiki/Takashi_Murakami">Takashi Murakami</a> and the fragmented abstractions of <a href="http://www.pbs.org/art21/slideshow/?artist=86">Arturo Herrera</a>, you&#8217;d receive Alex Trochut in a fancy box with a ribbon. A big thank you goes out to <a href="http://www.gestalten.tv/">Gestalten TV</a> for putting this wondering little documentary together. If you become enamored with Alex as I suspect you might, his website can be found <a href="http://www.alextrochut.com/ ">here</a>. All works are copyright of the artists and companies mentioned.
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardsouza.com/typography/alex-trochut/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adobe MAX Presentation &#8211; Screens of Possibilities</title>
		<link>http://www.leonardsouza.com/flex/screens-of-possibilities/</link>
		<comments>http://www.leonardsouza.com/flex/screens-of-possibilities/#comments</comments>
		<pubDate>Fri, 05 Nov 2010 18:44:21 +0000</pubDate>
		<dc:creator>Leonard Souza</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[livecycle]]></category>
		<category><![CDATA[pixelbender]]></category>
		<category><![CDATA[Spark]]></category>

		<guid isPermaLink="false">http://www.leonardsouza.com/?p=280</guid>
		<description><![CDATA[Here is the video for @scalenine (Juan Sanchez), @rjowen (RJ Owen) and I's presentation at Adobe MAX 2010. Enjoy!]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.leonardsouza.com/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wp-content/thumbnails/280.jpg&amp;w=200&amp;h=200&amp;zc=1&amp;ft=jpg&amp;q=100' alt='post thumbnail' /></p>
<p><object width="960" height="600" style="margin: 10 auto;"><param name="movie" value="http://images.tv.adobe.com/swf/player.swf"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="FlashVars" value="fileID=8262&#038;context=648&#038;embeded=true&#038;environment=production"></param><embed src="http://images.tv.adobe.com/swf/player.swf" flashvars="fileID=8262&#038;context=648&#038;embeded=true&#038;environment=production" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="960" height="600"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardsouza.com/flex/screens-of-possibilities/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flexerific Visual Effects &#8211; Quick Post</title>
		<link>http://www.leonardsouza.com/flex/flexerific/</link>
		<comments>http://www.leonardsouza.com/flex/flexerific/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 21:50:04 +0000</pubDate>
		<dc:creator>Leonard Souza</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[pixelbender]]></category>
		<category><![CDATA[Spark]]></category>

		<guid isPermaLink="false">http://www.leonardsouza.com/?p=268</guid>
		<description><![CDATA[Here is a link to the GitHub repo for my presentation today. And another for a direct download of a zip with the FXP and Keynote slides. Article to follow, so stay tuned!]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.leonardsouza.com/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wp-content/thumbnails/268.png&amp;w=200&amp;h=200&amp;zc=1&amp;ft=jpg&amp;q=100' alt='post thumbnail' /></p>
<p><img src="http://www.leonardsouza.com/wp-content/uploads/2010/09/title_slide1.jpg" alt="" title="title_slide" width="600" height="450" class="aligncenter size-full wp-image-276" /></p>
<p>Here is a <a href="http://github.com/leonardsouza/Flexerific-Visual-Effects">link</a> to the GitHub repo for my presentation today.</p>
<p>And <a href="http://www.leonardsouza.com/files/flexerific.zip">another</a> for a direct download of a zip with the FXP and Keynote slides.</p>
<p>Article to follow, so stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardsouza.com/flex/flexerific/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Speaking at 360Flex &#8211; Washington D.C.</title>
		<link>http://www.leonardsouza.com/uncategorized/360flex-dc/</link>
		<comments>http://www.leonardsouza.com/uncategorized/360flex-dc/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 16:26:53 +0000</pubDate>
		<dc:creator>Leonard Souza</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.leonardsouza.com/?p=258</guid>
		<description><![CDATA[I&#8217;ll be speaking at 360Flex, which is in Washington D.C., September 19-22. If you&#8217;ve never experienced a 360, then you are missing out on one of the best Flex/Flash conferences. The level of training is insane, as well as the amount of networking opportunities. This will be my third time speaking at this conference, and [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.leonardsouza.com/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wp-content/thumbnails/258.jpg&amp;w=200&amp;h=200&amp;zc=1&amp;ft=jpg&amp;q=100' alt='post thumbnail' /></p>
<p><img src="http://360flex.com/images/speakerbadge.png?utm_source=360%7CFlex+DC+Speakers&#038;utm_campaign=3c7aa16d25-360_Flex_DC_Speaker_Update_17_16_2010&#038;utm_medium=email" alt="360Flex Speaker Badge" style="float: left; padding: 0 10px 10px 0" /></p>
<p>I&#8217;ll be speaking at 360Flex, which is in Washington D.C., September 19-22. If you&#8217;ve never experienced a 360, then you are missing out on one of the best Flex/Flash conferences. The level of training is insane, as well as the amount of networking opportunities. This will be my third time speaking at this conference, and I have to say my own career has been propelled by the people I was fortunate enough to hang out with. My presentation will revolve around some awesome Flex effects, which include some pixel bender magic. The description is below. <a href="http://360flex.eventbrite.com/">Sign up</a> if you are interested!   </p>
<p><strong>Flexerific Visual Effects</strong></p>
<p>Flex has some amazing built-in visual effects and filters, which are probably one of the primary reasons to use the framework over other RIA platforms. As it turns out they are relatively easy to create. This session will dive into the drawing API, the base effect/filter classes and Pixel Bender. You&#8217;ll learn how to build them from the ground up in a way that is reusable for yourself and other interaction designers. Need to make a group turn into flickering static? Or shift the RGB of an image? How about create dynamic heatmaps? Then come down and learn!<br />
<br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardsouza.com/uncategorized/360flex-dc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Crazy with the Spark Layout Framework</title>
		<link>http://www.leonardsouza.com/flex/spark-layout-framework/</link>
		<comments>http://www.leonardsouza.com/flex/spark-layout-framework/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 20:22:23 +0000</pubDate>
		<dc:creator>Leonard Souza</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[Spark]]></category>

		<guid isPermaLink="false">http://www.leonardsouza.com/?p=174</guid>
		<description><![CDATA[Learn how to build some tantalizing layouts with the new Spark Layout Framework in Flex 4.]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.leonardsouza.com/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wp-content/thumbnails/174.jpg&amp;w=200&amp;h=200&amp;zc=1&amp;ft=jpg&amp;q=100' alt='post thumbnail' /></p>
<p><img src="http://www.leonardsouza.com/wp-content/uploads/2010/06/get_laid_title.jpg" alt="Get Crazy with the Spark Layout Framework" title="get_laid_title" width="610" height="283" class="alignnone size-full wp-image-252" /></p>
<p><strong>SOMETIMES GOOD JUST HAPPENS</strong></p>
<p>I gotta say, Flex 4 has come with some serious improvements. This is notable considering how wonderful Flex 3 was. The Flex SDK team keep bringing on the good like it aint&#8217; no thang. After learning Spark skinning and then delving into all that is Spark, I became smitten with their new philosophy toward the Flex component architecture. It is clean, decoupled and a joy to work with. Out of all the improvements however, I keep finding myself playing around with the <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/layouts/supportClasses/LayoutBase.html" target="_blank">LayoutBase class</a>. </p>
<p>You see, layouts are no longer coupled to a container such as mx::canvas. They are freely interchangeable as long as they extend LayoutBase. This presents some exciting opportunities for guys like me who love to break from typical layout conventions and play with moving elements in interesting ways. Want a 3D carousel? Just create a 3DCarousel class which extends LayoutBase and slap that puppy in there. BOOM! You have yourself a 3D Carousel. But the best part is that you can swap those layouts in realtime, so if that carousel just isn&#8217;t scratching that itch, slap a SolitaireLayout in there. BOOM! Simple as pie. </p>
<p><strong>EXAMPLES</strong></p>
<p>The two examples I&#8217;m showing today are below. The first is a modified version of the example <a href="http://examples.robotlegs.org/imagegallery/index.html" target="_blank">RobotLegs Flickr gallery app</a> created by <a href="http://joelhooks.com/" target="_blank">Joel Hooks</a>, and when I say modified, I mean simply swapping the layout for the datagroup holding the image item renderers and making a few changes to its mediator. The second is an app I created to demonstrate the power of the layout manager and hopefully inspire some folks to see just how far the layout manager can go. Grab the Git repositories; the first is <a href="http://github.com/leonardsouza/FlickrGalleryLayout" target="_blank">here</a> and the second <a href="http://github.com/leonardsouza/ImageLayoutGallery" target="_blank">here</a>.</p>
<p><a href="http://www.leonardsouza.com/files/flickrgallery/" target="_blank"><br />
<img src="http://www.leonardsouza.com/wp-content/uploads/2010/06/flickr_thumb-e1277618813886.jpg" alt="" title="flickr_thumb" width="610" height="376" class="alignnone size-full wp-image-193" /><br />
Flickr Gallery Layout</a></p>
<p>Wait a minute for the images to load. Once all of the thumbnails are visible, click on one and watch the magic happen. All of the animation and grid layout are taking place in the Layout class. </p>
<p><a href="http://www.leonardsouza.com/files/imagelayout/" target="_blank"><br />
<img src="http://www.leonardsouza.com/wp-content/uploads/2010/06/image_thumb-e1277618827108.jpg" alt="" title="image_thumb" width="610" height="414" class="alignnone size-full wp-image-194" /><br />
Image Analysis Layout</a></p>
<p>The elements on the right are being laid out by analyzing the thumbnail image on the left. Click the drop down for some more images or add your own with the input beneath. Feel free to play with the Layout properties, such as grid density and contrast threshold. Even use the scratch pad to draw out your own Layout! </p>
<p><strong>SPARK LAYOUT</strong></p>
<p>So the above examples extend the Spark LayoutBase class. It&#8217;s a rather simple Spark class, aside from the methods to manage scrolling and drag/dropping. To get started, you really only need to override updateDisplayList(), and if you want it to play nice with other components then measure() as well (NOTE: my image layout component does not override measure). The Flickr Gallery example actually takes the existing s:TileLayout class and just adds an animation method to it, while also tying it to a specific item renderer type (yes, I should have used an interface so that the class is not tightly coupled, but I didn&#8217;t). So if you take a look at updateDisplayList(), it&#8217;s the same as the native s:TileLayout&#8217;s. </p>
<p>I&#8217;m almost 100% sure anything can be improved with a little bit of qualified animation &#8211; I use &#8220;qualified&#8221; because bad animation can and will ruin all that is great. However, if used appropriately, animation has the ability to inject a tremendous amount of character into a design. I will be exploring this concept in a future blog post, so stay tuned. Anyways, I wanted to make my grid act a little crazy, which is why I added a few methods. They are below. Check out <a href="http://coenraets.org/blog/2010/02/flexstore-revisited-building-an-animated-spark-layout/" target="_blank">Christophe Coenraet&#8217;s tutorial</a> on adding animation to a Layout for more info.</p>
<pre class="brush: as3; first-line: 1730; title: ; wrap-lines: false; notranslate">
/* Animation Code */

private var _flipEffects:Parallel;
public var isPieces:Boolean = true;
private var _oldHorizontalGap:int;
private var _oldVerticalGap:int;

public function animateFlip(vec:Vector.&lt;BitmapData&gt; = null):void
{
	if (_flipEffects != null &amp;&amp; _flipEffects.isPlaying) return;
	target.autoLayout = false; // Do not call updateDisplayList()

	_flipEffects = new Parallel();
	var numElements:int = target.numElements;
	if (numElements == 0) return;

	var itemRenderer:GalleryImageThumbnailItemRenderer;
	var flipEffect:AnimateProperty;

	var delayCount:int = 0;
	var reduceCount:int = 0;
	for (var i:int = 0; i &lt; requestedColumnCount; i++)
	{
		for (var j:int = 0; j &lt; requestedRowCount; j++)
		{
			try
			{
				delayCount += 5;
				itemRenderer = GalleryImageThumbnailItemRenderer(target.getElementAt((i*(requestedRowCount))+j));
				// This doesn't work! Boo! Neither does translating the matrix3d manually! It also kills all mouse events on the renderer, lame.
				// itemRenderer.maintainProjectionCenter = true;
				itemRenderer.imagePiece = vec[(i*(requestedRowCount))+j];
				flipEffect = new AnimateProperty(itemRenderer);
				flipEffect.startDelay = delayCount;
				flipEffect.duration = 400;
				flipEffect.property = &quot;rotationX&quot;;
				flipEffect.fromValue = 0;
				flipEffect.toValue = 360;
				flipEffect.addEventListener(TweenEvent.TWEEN_UPDATE, function f(event:TweenEvent):void
				{
					var item:GalleryImageThumbnailItemRenderer = GalleryImageThumbnailItemRenderer(event.target.target);
					if (event.value &gt;= 180)
					{
						showPieces(item, isPieces);
						AnimateProperty(event.currentTarget).removeEventListener(TweenEvent.TWEEN_UPDATE, f);
					}
				});
				flipEffect.addEventListener(TweenEvent.TWEEN_END, function f(event:TweenEvent):void
				{
					var item:GalleryImageThumbnailItemRenderer = GalleryImageThumbnailItemRenderer(event.target.target);
					if (item.isPiece == isPieces) showPieces(item, isPieces);
				});

				// Flip Effects

				_flipEffects.addChild(flipEffect);
				_flipEffects.addEventListener(EffectEvent.EFFECT_START, function f(event:EffectEvent):void
				{
					if (!isPieces)
					{
						_oldHorizontalGap = horizontalGap;
						_oldVerticalGap = verticalGap;
					}
				});
				_flipEffects.addEventListener(EffectEvent.EFFECT_END, tweenGap);
				_flipEffects.addEventListener(EffectEvent.EFFECT_END, function f():void
				{
					target.autoLayout = true;
				});
			}
			catch (error:Error)
			{
				trace(error.message);
			}
		}
		if (reduceCount == 0) reduceCount = delayCount * .7;
		delayCount -= reduceCount;
	}

	_flipEffects.play();
}

protected function showPieces(item:GalleryImageThumbnailItemRenderer, bool:Boolean):void
{
	bool ? item.showThumb() : item.showPiece();
}

protected function tweenGap(event:EffectEvent):void
{
	var tween:GTween;
	if (!isPieces)
		tween = new GTween(this, .2, {horizontalGap: 0, verticalGap: 0}, {ease:Back.easeIn});
	else
		tween = new GTween(this, .2, {horizontalGap: _oldHorizontalGap, verticalGap: _oldVerticalGap}, {ease:Back.easeOut});
}
</pre>
<p>Essentially the above code will flip every grid item in a falloff sequence making it shimmer like a ripple. I can then call this animation method from outside the layout class. So when you click on a tile, which is an Image that needs to be loaded, I fire off animateFlip after the load is complete and replace each tile with pieces of the larger image and pull them together. This all happens in the view&#8217;s mediator, which is where the following code exists.</p>
<pre class="brush: as3; highlight: [30]; light: true; title: ; wrap-lines: false; notranslate">
protected function selectImage(image:GalleryImage):void
{
	galleryView.animatedLayout.isPieces = galleryView.animatedLayout.isPieces ? false : true;

	if (!galleryView.animatedLayout.isPieces)
		dispatch(new GallerySearchEvent(GallerySearchEvent.SEARCH_NOT_AVAILABLE));
	else
		dispatch(new GallerySearchEvent(GallerySearchEvent.SEARCH_AVAILABLE));

	progress.alpha = 0;
	PopUpManager.addPopUp(progress, galleryView, false);
	PopUpManager.centerPopUp(progress);

	var toY:int = progress.y;
	progress.y = -progress.height;

	var tween1:GTween = new GTween(progress, .5, {alpha:1}, {ease:Sine.easeOut});
	var tween2:GTween = new GTween(progress, .5, {y:toY}, {ease:Back.easeOut});

	var loader:Loader = new Loader();
	loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
		function f(event:Event):void
		{
			selectedImageVector = divideAndConquer(Bitmap(event.target.content));
			var tween1:GTween = new GTween(progress, .5, {alpha:0}, {ease:Sine.easeIn});
			var tween2:GTween = new GTween(progress, .5, {y:galleryView.height}, {ease:Back.easeIn});
			tween2.dispatchEvents = true;
			tween2.addEventListener(Event.COMPLETE, function f():void
			{
				galleryView.animatedLayout.animateFlip(selectedImageVector);
			});
		});
	loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,
		function f(event:IOErrorEvent):void
		{
			var tween1:GTween = new GTween(progress, .5, {alpha:0}, {ease:Sine.easeIn});
			var tween2:GTween = new GTween(progress, .5, {y:galleryView.height}, {ease:Back.easeIn});
			Alert.show(&quot;Error loading image!&quot;);
		});

	loader.load(new URLRequest(image.URL));
}

private function divideAndConquer(source:Bitmap, rectWidth:int = 30, rectHeight:int = 30):Vector.&lt;BitmapData&gt;
{
	var columns:int = galleryView.animatedLayout.requestedColumnCount;
	var rows:int = galleryView.animatedLayout.requestedRowCount;

	var background:BitmapData = new BitmapData(galleryView.dgContainer.width, galleryView.dgContainer.height, false, 0x000000);
	var bgActualHeight:Number = background.height - (galleryView.animatedLayout.verticalGap * galleryView.animatedLayout.requestedRowCount) + galleryView.animatedLayout.verticalGap;
	var bgActualWidth:Number = background.width - (galleryView.animatedLayout.horizontalGap * galleryView.animatedLayout.requestedColumnCount) + galleryView.animatedLayout.horizontalGap;

	var scaleFactor:Number = getScaleFactor(source, bgActualWidth, bgActualHeight);
	var matrix:Matrix = new Matrix(scaleFactor, 0, 0, scaleFactor, (bgActualWidth/2 - (source.width*scaleFactor)/2), (bgActualHeight/2 - (source.height*scaleFactor)/2));
	background.draw(source.bitmapData, matrix); 

	var bitmapVector:Vector.&lt;BitmapData&gt; = new Vector.&lt;BitmapData&gt;();
	for (var i:int = 0; i &lt; rows; i++)
	{
		for (var j:int = 0; j &lt; columns; j++)
		{
			var rect:Rectangle = new Rectangle(j * rectWidth, i * rectHeight, rectWidth, rectHeight);
			var bm:BitmapData = new BitmapData(rectWidth, rectHeight, false, 0x000000);
			bm.copyPixels(background, rect, new Point());
			bitmapVector.push(bm);
		}
	}
	return bitmapVector;
}
</pre>
<pre class="brush: as3; first-line: 126; title: ; wrap-lines: false; notranslate">
&lt;s:DataGroup
	id=&quot;dgThumbnails&quot;
	dataProvider=&quot;{this.dataProvider}&quot;
	itemRenderer=&quot;org.robotlegs.demos.imagegallery.views.components.renderers.GalleryImageThumbnailItemRenderer&quot;&gt;
	&lt;s:layout&gt;
		&lt;layouts:GalleryTileLayout
			id=&quot;animatedLayout&quot;
			verticalGap=&quot;5&quot; horizontalGap=&quot;5&quot; requestedColumnCount=&quot;20&quot; requestedRowCount=&quot;10&quot; /&gt;
	&lt;/s:layout&gt;
&lt;/s:DataGroup&gt;
</pre>
<p>And voila, you now have an animated grid that flips as expected!</p>
<p><strong>IMAGE ANALYSIS LAYOUT</strong></p>
<p>My second example, the ImageLayout class, does not blatantly steal any code from the existing Spark Layout classes. It is a relatively small class, with two methods who do most of the work: updateDisplayList() and arrangeByImage(). The ImageLayout takes a bitmap as a source property and when the container&#8217;s display list is invalidated, it will chop up the bitmap source into a grid, then lay its element according to the brightness values of the grid squares. For a finer analysis, increase the grid density or reverse it for the opposite effect. Not only does it place the elements on the X and Y axis, but will place on the Z according to the brightness intensity. This creates a bumpmap-like effect, similar to what you would see in 3D rendering though much more primitive. </p>
<pre class="brush: as3; first-line: 172; title: ; wrap-lines: false; notranslate">
protected function arrangeByImage():void
{
	if (!target || !_source) return;

	_layoutVector = new Vector.&lt;Vector3D&gt;();

	// scale the image to the width and height of the target to interpolate the points
	var nonScaledWidth:int = _source.width / _source.scaleX;
	var nonScaledHeight:int = _source.height / _source.scaleY;

	_source.scaleX = target.width / nonScaledWidth;
	_source.scaleY = target.height / nonScaledHeight;

	var scaledSource:BitmapData = new BitmapData(_source.width, _source.height, true, 0x000000);
	scaledSource.draw(_source, _source.transform.matrix);

	var rectWidth:Number = _source.width / gridInterval;
	var rectHeight:Number = _source.height / gridInterval;

	var columnCount:Number = _source.width / rectWidth;
	var rowCount:Number = _source.height / rectHeight;

	var i:Number;
	var j:Number;

	var reqElements:int = 0;

	for (i = 0; i &lt; rowCount; i++)
	{
		for (j = 0; j &lt; columnCount; j++)
		{
			var rect:Rectangle = new Rectangle(j * rectWidth, i * rectHeight, rectWidth, rectHeight);
			var bm:BitmapData = new BitmapData(rectWidth, rectHeight, false, 0x000000);
			bm.copyPixels(scaledSource, rect, new Point(0, 0));

			var brightnessPercentage:Number = averageColor(bm)/0xFFFFFF;
			if (brightnessPercentage * 100 &gt;= contrastThreshold)
			{
				_layoutVector.push(new Vector3D(j * rectWidth, i * rectHeight, brightnessPercentage * depthFactor));
				reqElements++;
			}
			else
			{
				_layoutVector.push(null);
			}

			bm.dispose();
		}
	}

	requiredElements = reqElements;
	dispatchEvent(new ImageLayoutElementEvent(ImageLayoutElementEvent.ELEMENT_CHANGE, requiredElements, target.numElements));
	scaledSource.dispose();
}

/*
** Overrides
*/

override public function updateDisplayList(w:Number, h:Number):void
{
	if (!target || !_source || _source.height + _source.width &lt; 2) return;
	super.updateDisplayList(w, h);

	arrangeByImage();

	var el:ILayoutElement;
	var numElements:uint = target.numElements;
	var matrix:Matrix3D;
	var i:int = 0;

	if (!_layoutVector)
	{
		for (i = 0; i &lt; numElements; i++)
		{
			el = target.getElementAt(i);
			if (!el || !el.includeInLayout) continue;

			matrix = new Matrix3D();
			matrix.appendTranslation(0, 0, 0);
			el.setLayoutMatrix3D(matrix, false);
		}
		return;
	}

	var vec3D:Vector3D;
	var elementCounter:int = 0;
	for (i = 0; i &lt; _layoutVector.length; i++)
	{
		try
		{
			el = target.getElementAt(elementCounter);
			if (elementCounter &gt;= numElements) throw RangeError(&quot;Not enough elements&quot;);
			vec3D = _layoutVector[i];
			if (vec3D != null)
			{

				if (!el || !el.includeInLayout) continue;
				UIComponent(el).visible = true;
				matrix = el.getLayoutMatrix3D();

				if (animate)
				{
					var originVector:Vector.&lt;Vector3D&gt; = matrix.decompose();
					//originVector[0] = new Vector3D(Math.random()*animationStrength, Math.random()*animationStrength, randNeg()*Math.random()*animationStrength);
					originVector[0] = new Vector3D(vec3D.x, vec3D.y, randNeg()*Math.random()*animationStrength);
					var tweenProxyObject:Object = {x:originVector[0].x, y:originVector[0].y, z:originVector[0].z};
					matrix.recompose(originVector);
					el.setLayoutMatrix3D(matrix, false);

					var tween:GTween = new GTween();
					tween.autoPlay = false;
					tween.target = tweenProxyObject;
					tween.data = {element:el, origin:originVector};
					tween.setValues({x:vec3D.x, y:vec3D.y, z:vec3D.z});
					tween.ease = animationEase;
					tween.duration = animationDuration;
					tween.onChange = function f():void
					{
						var el:ILayoutElement = ILayoutElement(this.data.element);
						var mtx:Matrix3D = el.getLayoutMatrix3D();
						Vector.&lt;Vector3D&gt;(this.data.origin)[0] = new Vector3D(this.target.x, this.target.y, this.target.z);
						mtx.recompose(Vector.&lt;Vector3D&gt;(this.data.origin));
						el.setLayoutMatrix3D(mtx, false);
					}
					tween.paused = false;
				}
				else
				{
					var newVector:Vector.&lt;Vector3D&gt; = matrix.decompose();
					newVector[0] = vec3D;
					matrix.recompose(newVector);
					el.setLayoutMatrix3D(matrix, false);
				}
				elementCounter++;
			}
			else
			{
				UIComponent(el).visible = false;
			}
		}
		catch (error:RangeError)
		{
			//trace(error.message);
		}
	}

	// Remove any remaining elements from the grid
	if (elementCounter &lt; numElements)
	{
		for (var v:int = elementCounter; v &lt; numElements; v++)
		{
			el = target.getElementAt(v);
			UIComponent(el).visible = false;
		}
	}
}
</pre>
<pre class="brush: as3; first-line: 112; title: ; wrap-lines: false; notranslate">
&lt;s:DataGroup
	id=&quot;dgThumbnails&quot;
	dataProvider=&quot;{this.dataProvider}&quot;
	width=&quot;400&quot;
	height=&quot;400&quot;&gt;
	&lt;s:layout&gt;
		&lt;layouts:ImageLayout
			animate=&quot;true&quot;
			animationDuration=&quot;1&quot;
			animationEase=&quot;Back.easeInOut&quot;
			animationStrength=&quot;800&quot;
			depthFactor=&quot;-15&quot;
			gridInterval=&quot;35&quot;
			contrastThreshold=&quot;40&quot;
			id=&quot;imageLayout&quot;/&gt;
	&lt;/s:layout&gt;
&lt;/s:DataGroup&gt;
</pre>
<p>The animation uses Grant Skinner&#8217;s <a href="http://gskinner.com/libraries/gtween/" target="_blank">GTween library</a>, which at a small size provides several awesome features and wicked performance. If you find the performance of the app slowing down because of the grid density (anything above 500 elements tends to kill the framerate), you can turn animation off with the checkbox control on the left, which should help when you modify the bitmap source. </p>
<p>Anyhow, that&#8217;s it! I hope you&#8217;ve enjoyed this tutorial and feel free to ask any questions; I will be more than happy to answer anything I can! Stay tuned for more.</p>
<p>Follow me on twitter <a href="http://www.twitter.com/creativism" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardsouza.com/flex/spark-layout-framework/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flash to Peggy 2.0 &#8211; LED Insanity</title>
		<link>http://www.leonardsouza.com/flex/flash-to-peggy/</link>
		<comments>http://www.leonardsouza.com/flex/flash-to-peggy/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 14:17:35 +0000</pubDate>
		<dc:creator>Leonard Souza</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[hardware]]></category>

		<guid isPermaLink="false">http://www.leonardsouza.com/?p=55</guid>
		<description><![CDATA[Learn how to render video to a Peggy from Flash/Flex/Air!]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.leonardsouza.com/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wp-content/thumbnails/55.jpg&amp;w=200&amp;h=200&amp;zc=1&amp;ft=jpg&amp;q=100' alt='post thumbnail' /></p>
<p><strong>IN THE BEGINNING</strong></p>
<p>Alright, so I really have to thank <a href="http://planetclegg.com/projects/Twi2Peggy.html">Jay Clegg</a> up front for setting this in motion. Without his existing Peggy and Arduino code, this ditty of a project would not have been possible. Take a look at his article for help with wiring.</p>
<p>I’ve been looking for a good Flex/Flash/LED solution for some time now, but nothing had really caught my attention until I read Jay’s article. The <a href="http://evilmadscience.com/tinykitlist/75">Peggy 2.0</a> was perfect; tons of LEDs, super fast bus and downright <a href="”http://en.wikipedia.org/wiki/2007_Boston_bomb_scare”">infamous</a> (actually those aren&#8217;t Peggys, they are what inspired the Peggys). This isn’t to say creating an array of <a href="”http://www.sparkfun.com/commerce/product_info.php?products_id=8579”">BlinkM LEDs</a> or some other solution isn’t worth considering, it’s just that the Peggy has the whole package built right in.</p>
<p>So let&#8217;s get started! <a href="http://www.leonardsouza.com/files/fierce_files.zip">Download the source here.</a></p>
<p><br/><strong>THE BASICS</strong></p>
<p>The Peggy can render video using the <a href="http://en.wikipedia.org/wiki/I²C">I²C/TWI/SPI</a> interface. Fortunately it’s easy to get an Arduino to output data over TWI/SPI. Better yet, it’s easy to get data to the Arduino from almost any programming language. So the basic setup is this.</p>
<p><img src="http://www.leonardsouza.com/wp-content/uploads/2010/03/hardware_schematic.jpg" alt="Basic Hardware Setup for Flash to Peggy" title="Basic Hardware Setup for Flash to Peggy" width="610" height="283" class="alignnone size-full wp-image-102" /></p>
<p>Simple enough. The code that Jay Clegg wrote for the Peggy listens over TWI for a packet that contains a 0xDEADBEEF10 header and a series of brightness values defined by bits, which is sent to a frame buffer as fast as Peggily-possible (60Hz). This means I needed to generate a byte array in my programming language of choice, Actionscript 3, and get it to the Arduino, which would send it to the Peggy over TWI.</p>
<p><br/><strong>GOALS</strong></p>
<p>Now that I had my theoretical hardware setup, what was I going to do with it? Render a grid of pixels in Flash (in this case 25&#215;25) and send it over to the Peggy with little to no latency at &gt;30FPS of course! I knew this was possible using Quartz/Objective-C, but I didn’t know if it was possible using Flash.</p>
<p>In the past, the only way I could get flash Flash to communicate with hardware was through a socket connection. That’s how Phidgets do it, that’s how Arduino does it, and that’s how I did it, though it’s not the only way (<a href="http://blog.kevinhoyt.org/">Kevin Hoyt</a> told me recently to use the Native Process API, more to come). I went with the new UDP Datagram Class in Air 2.0 for its low latency streaming advantages to try and achieve the speed I needed.</p>
<p>I also needed some type of proxy for the Arduino since Flash can’t communicate with it directly. Java has always been my crap-flash-can’t-do-this failsafe and I knew it wouldn’t let me down this round. Writing a UDP server is simple enough, thus I created a UDP data bridge in Java and I was on my way. In the code fragment below, the Outputstream is the serial connection to the Arduino through the <a href="http://rxtx.qbang.org/wiki/index.php/Main_Page">RxTx Java library</a> &#8211; refer to the <a href="http://www.leonardsouza.com/files/fierce_files.zip">source code</a> for the full class.</p>
<pre class="brush: java; highlight: [7]; title: ; wrap-lines: false; notranslate">
    /*
    ** This threads listens for any incoming UDP packets and sends them to the Arduino
    */

    public static class SerialWriter implements Runnable
    {
        OutputStream out;
        DatagramSocket datagramSocket;
        Boolean connected = true;

        public SerialWriter (OutputStream out, DatagramSocket datagramSocket)
        {
        	super();
        	this.out = out;
            this.datagramSocket = datagramSocket;
        }

        public void run()
        {
        	// Set connected to false if you want to disconnect, restart the thread to startup again
        	while (connected)
        	{
	            try
	            {
	            	byte[] buffer = new byte[Integer.parseInt(prop.getProperty(&quot;udp.buffer.size&quot;))];
	            	DatagramPacket incomingPacket = new DatagramPacket(buffer, buffer.length, InetAddress.getLocalHost(), Integer.parseInt(prop.getProperty(&quot;outgoing.udp.port&quot;)));
	                datagramSocket.receive(incomingPacket);

	                if (incomingPacket.getLength() &gt; 0)
	                {
	                	this.out.flush();
		                this.out.write(incomingPacket.getData());
	                }
	            }
	            catch ( IOException e )
	            {
	                e.printStackTrace();
	            }
        	}
        	datagramSocket.close();
        }
    }
</pre>
<p>There are a lot of great resources at the <a href="http://www.arduino.cc">Arduino</a> website regarding Java proxies, as well as many other methods for getting different languages to speak with Arduinos. I highly recommend checking the site out.</p>
<p><br/><strong>AVR PROGRAMMING</strong></p>
<p>Now I was cooking, but I had a slight problem. You see, Jay Clegg is a hardware Jedi master, and he uses an AVR Programmer to program his ATMega328P (the Arduino/Peggy processor). I am simpleton and wanted to use the standard ol’ Arduino USB <a href="”http://arduino.cc/en/Guide/MacOSX”">programming method</a> through the <a href="”http://arduino.cc/en/Main/Software”">Arduino IDE</a>. Jay wrote his Arduino and Peggy 2.0 code for WinAVR, which is not compatible with the Arduino IDE and looks a lot like C (because it is). </p>
<p>Luckily though, he included some wonderful comments in his source code explaining how to port it over to the Arduino IDE. After following his instructions and adding the loop() and setup() methods, I only needed to change a few global variables (namely PCINT13 and PCINT14 for the pullups) in both code bases and I was good to go!</p>
<p>So here is the sketch for the Arduino, which compiles all nice-like in the Arduino IDE. It’s so easy, even I can do it!™ EDIT: My friends at Evil Mad Science were happy to inform me that they now provide their own Peggy TWI Arduino sketch, which can be found <a href="http://www.evilmadscientist.com/article.php/peggy2twi">here</a>. </p>
<pre class="brush: cpp; title: ; wrap-lines: false; notranslate">
#include &lt;Wire.h&gt;
#define PEGGY_ADDRESS 34
#define TWI_FREQ 300000

void setup()
{
  Serial.begin(115200);

  UBRR0H = 0;
  UBRR0L = 16; // manually set 115200
  UCSR0A = (1&lt;&lt;U2X0);
  Wire.begin();

  PORTC |=  (1&lt;&lt;PCINT13) | (1&lt;&lt;PCINT12); // enable pullups

  TWSR &amp;= ~(1&lt;&lt;TWPS0);
  TWSR &amp;= ~(1&lt;&lt;TWPS1);
  TWBR = ((F_CPU / TWI_FREQ) - 16) / 2;
}

void loop()
{
  uint8_t count = Serial.available();

  if (count &gt; 0)
  {
    if (count &gt; 16) count = 16;

    Wire.beginTransmission(PEGGY_ADDRESS);
    while (count-- &gt; 0 )
    {
      uint8_t c = Serial.read();
      Wire.send(c);
    }
    Wire.endTransmission();
  }
}
</pre>
<p>The Peggy code is a lot more complicated, so please open it in the Arduino IDE and take a look there (the code has been ported and should work fine). Keep in mind that the Peggy does not have a USB port, so it must be programmed through a USB-TTL cable, though the method is identical to the Arduino.</p>
<p>Alright, so the pieces were coming together. I had the Arduino sending data to the Peggy, and my Java UDP proxy was just begging for some bits. Now it was time for a little Actionscript.</p>
<p><br/><strong>ALL YOUR BASE ARE BELONG TO US</strong></p>
<p>The first smattering of code I wrote was a wrapper around the Datagram class. It needed some type of send(ByteArray) method so that I could render a byte array on a timer event, or on enter frame, or whatever and send it on through to the Java proxy. Thus the following class was created.</p>
<pre class="brush: as3; title: ; wrap-lines: false; notranslate">

		/*
		** Takes a prepared bytearray, adds the proper header and sends it to the UDP Java Proxy
		*/

		public function sendToProxy(ba:ByteArray):void
		{
			var packet:ByteArray = new ByteArray();
			packet.writeBytes(_header, 0, _header.length);

			/*
			** Expecting a ByteArray of 330 bytes, which is 25 rows * 13 Bytes (1 nibble (4 bits) per LED,
			** 16 levels of brightness) plus the header, plus an extra byte due to odd rows
			*/

			packet.writeBytes(ba, 0, ba.length);
			_datagramSocket.send(packet, 0, 0, host, outgoingPort);
			if (exposeByteArray) outputStream = ba;
		}
</pre>
<p>You’ll notice that the 0xDEADBEEF10 header is appended to every byte array that comes through the send() method. This makes life a lot easier.</p>
<p>On top of having the send() method, I wanted a convenience method that could take a DisplayObject and convert it into a byte array that the Peggy understood. Thus the createStream(DisplayObject) method was born. I could then create a source property on the Proxy and delegate a Timer class to render it out on a set interval (30ms seems to work best). The start() and stop() methods control the Timer. You may also notice that you can expose the raw byte array (exposeByteArray setter) for further processing in the application, such as a visualization component (also included in the source download).</p>
<pre class="brush: as3; title: ; wrap-lines: false; notranslate">
		protected function createStream(component:DisplayObject):void
		{
			if (component.width &lt; 25 || component.height &lt; 25) return;

			var bmd:BitmapData = new BitmapData(component.width, component.height, false, 0x000000);
			var point:Point = new Point(bmd.width/2, bmd.height/2);
			bmd.draw(component, rotateAndFlip(bmd, -90), null, null, null, true); // Positions image on Peggy properly
			bmd.applyFilter(bmd, bmd.rect, new Point(), colorMatrixFilter);
			if (bmd.width &gt; 25 || bmd.height &gt; 25)
			{
				bmd = cropBitmap(bmd, 25, 25);
				bmd = ImageResizer.bilinearIterative(bmd, 25, 25, ResizeMath.METHOD_PAN_AND_SCAN);
			}

			var ba:ByteArray = new ByteArray();
			var average:uint = averageColor(bmd);
			for (var i:int = 0; i &lt; bmd.width; i++)
			{
				var count:int = 0;
				for (var k:int = 0; k &lt; Math.round(bmd.height/2); k++)
				{
					/*
					** We gather two pixels at a time, since a byte equals two pixels.
					** There will always be an extra byte because the rows are odd, which is discarded in the peggy firmware.
					*/

					var pair:int = 0;
					pair = (getBrightness(bmd.getPixel(i, count), average) | getBrightness(bmd.getPixel(i, count+1), average) &lt;&lt; 4);
					ba.writeByte(pair);
					count += 2;
				}
			}

			sendToProxy(ba);
		}
</pre>
<p>And that’s it! Check out the videos below (sorry for the crappy quality, my buddy with the Canon 5D wasn&#8217;t available &#8211; if you complain enough I will redo them).</p>
<p><object width="610" height="458"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=10460737&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=10460737&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="610" height="458"></embed></object></p>
<p><object width="610" height="381"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=10453715&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=10453715&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="610" height="381"></embed></object><br />
EDIT: When I said 60KHz, I really meant to say 60Hz. 60KHz would be crazy fast, sorry for that. <img src='http://www.leonardsouza.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><br/><strong>FURTHERMORE… THE NATIVE PROCESS API (AIR 2.0)</strong></p>
<p>After reading up on the Native Process API, it looks like I can completely bypass UDP altogether and send a raw byte array to a Java program over System.in. I’m going to assume this method is better than UDP (hopefully threaded separately as well), as using too many network connections seems to hinder Flash’s performance a bit. This is not something I have done yet, but is definitely something I will explore in the future, so check back for an update!</p>
<p><br/><strong>CONCLUSION</strong></p>
<p>I hope you’ve enjoyed this tasty little hardware experiment. I’d love to see what others come up with using this code. You have no excuses now, go forth and create the best Christmas light show evar! If you have any questions, feel free to leave a comment or email/GTalk me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardsouza.com/flex/flash-to-peggy/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>Fierce Hardware Integration</title>
		<link>http://www.leonardsouza.com/flex/fierce-hardware-integration/</link>
		<comments>http://www.leonardsouza.com/flex/fierce-hardware-integration/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 17:55:17 +0000</pubDate>
		<dc:creator>Leonard Souza</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[credit card]]></category>
		<category><![CDATA[creditcard]]></category>
		<category><![CDATA[jcomm]]></category>
		<category><![CDATA[led]]></category>
		<category><![CDATA[leds]]></category>
		<category><![CDATA[merapi]]></category>
		<category><![CDATA[peggy]]></category>
		<category><![CDATA[peggy 2.0]]></category>
		<category><![CDATA[phidgets]]></category>

		<guid isPermaLink="false">http://www.leonardsouza.com/?p=11</guid>
		<description><![CDATA[Integrate a USB/HID Credit Card Reader and Peggy 2.0 LED Matrix into your Air 2.0 app with Java and UDP!]]></description>
			<content:encoded><![CDATA[<p><img src='http://www.leonardsouza.com/wp-content/plugins/simple-post-thumbnails/timthumb.php?src=/wp-content/thumbnails/11.jpg&amp;w=200&amp;h=200&amp;zc=1&amp;ft=jpg&amp;q=100' alt='post thumbnail' /></p>
<p><a rel="attachment wp-att-16" href="http://www.leonardsouza.com/flex/fierce-hardware-integration/attachment/fierce_title_slide/"><img class="aligncenter size-large wp-image-16" title="fierce_title_slide" src="http://www.leonardsouza.com/wp-content/uploads/2010/03/fierce_title_slide-960x720.jpg" alt="" width="960" height="720" /></a><a href="http://www.leonardsouza.com/files/fierce_files.zip"></a></p>
<p><a href="http://www.leonardsouza.com/files/fierce_files.zip">Fierce Hardware Integration Source Files</a></p>
<p><a href="http://www.leonardsouza.com/files/fierce.pdf">Fierce Integration Slides (stand alone)</a></p>
<p>Article coming soon, source code link is above. <img src='http://www.leonardsouza.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.leonardsouza.com/flex/fierce-hardware-integration/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

