<?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>FlexWiz Blog &#187; Flex</title>
	<atom:link href="http://blog.flexwiz.net/category/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexwiz.net</link>
	<description>On Game Development and the Flash platform</description>
	<lastBuildDate>Sat, 17 Dec 2011 22:46:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Flex 4.5 – A ‘Hero’s Welcome</title>
		<link>http://blog.flexwiz.net/flex-4-5-a-hero-welcome/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=flex-4-5-a-hero-welcome</link>
		<comments>http://blog.flexwiz.net/flex-4-5-a-hero-welcome/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 23:20:43 +0000</pubDate>
		<dc:creator>theWiz</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex 4]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Hero]]></category>
		<category><![CDATA[Skinning]]></category>
		<category><![CDATA[Spark]]></category>

		<guid isPermaLink="false">http://flexwiz.amosl.com/?p=433</guid>
		<description><![CDATA[It&#8217;s been a while since Flex 4.5 public beta was released. I spent some time with the the new SDK and following blogs, getting the feel of it.  The 4.5 &#8220;Hero&#8221; SDK is expected to release later this year, along with a new version of flash player (10.2) . In previous posts (Spark pains) I expressed my disappointment [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-449" style="margin: 4px;" title="hero" src="http://blog.flexwiz.net/wp-content/uploads/2011/01/hero.png" alt="" width="216" height="176" />It&#8217;s been a while since Flex 4.5 public beta was released. I spent some time with the the new SDK and following blogs, getting the feel of it.  The 4.5 &#8220;Hero&#8221; SDK is expected to release later this year, along with a new version of flash player (10.2) .</p>
<p>In previous posts (<a href="http://blog.flexwiz.net/flex/spark-pains-is-it-worth-it/" target="_blank">Spark pains</a>) I expressed my disappointment with Spark&#8217;s lack of functionality versus the Flex 3 mx components it came to replace. <a href="http://jessewarden.com/2010/09/adobe-please-bring-flash-builder-up-to-par.html" target="_blank">Like others</a>, I shared the notion that Spark is half baked, and Adobe should have included a more complete solution in version 4.0 or 4.1, at least for the included components like button or image. Let&#8217;s see what is in for us in the upcoming Flex 4.5 (&#8220;Hero&#8221;).</p>
<p><span id="more-433"></span></p>
<h3>Spark Button: The return of the Icon</h3>
<p>Good news &#8211; the icon style is back to Spark button!  After spending a lot of time writing custom skins and specialized classes I was glad to see that the spark button now supports icon out of the box, just like the good old mx button. Too bad it came  late for my recent projects, all using spark buttons, cluttered with custom skins only to achieve the trivial task of putting an icon in a button.</p>
<p>By any reasonable standard, we should have had these  in Flex 4.0 release last year.</p>
<p>I can only reiterate the comment in a post in the <a href="http://blog.flexexamples.com/" target="_blank">Flex Examples</a> blog: all that to get what we’ve had for years in Flex 3.  I really am glad these basic features are back, but was it really necessary to wait over a year to have it back (and require Flash 10.2 player)?</p>
<p>Really, Adobe &#8211; is that too much to expect?</p>
<h3>Spark Bitmap Image</h3>
<p>Another source of frustration for me was the spark BitmapImage. Made to replace mx image, it gave similar functionality&#8230; well, almost. No support for runtime loading and display of timeline swfs forced me and my team to fall-back to mx image for no other alternative.</p>
<p>Even worse, the overblown security model made image caching almost impossible to implement. Try constantly loading images from services like flikr and facebook and see what I mean. Policy files, trusted or untrusted domains, nothing seems to work properly. To actually make it possible to access bitmapData, everyone uses a PHP script to bypass the flash player security model &#8211; not very elegant.</p>
<p>A Hero to the rescue, Flex 4.5 brings the new and improved  BitmapImage with all of mx image features and built it image caching &#8211; Hallelujah!  they even threw in smart scaling and letterbox mode.  It&#8217;s too soon to comment on how effective it is since it is still in beta, but kudos to Adobe for doing the right thing.</p>
<p>What more can I say? Better late than never.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flexwiz.net/flex-4-5-a-hero-welcome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts on 2010 and being independent</title>
		<link>http://blog.flexwiz.net/thoughts-on-2010-and-being-independent/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=thoughts-on-2010-and-being-independent</link>
		<comments>http://blog.flexwiz.net/thoughts-on-2010-and-being-independent/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 19:31:43 +0000</pubDate>
		<dc:creator>theWiz</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Freelance]]></category>

		<guid isPermaLink="false">http://flexwiz.amosl.com/?p=418</guid>
		<description><![CDATA[It&#8217;s been a while since I last posted here. Unfortunately I was too busy working on my (and mostly my clients) projects. With the new year, I will briefly touch on issues this year as an independent flex developer. The last year has seen a lot going on in the business of flash and game [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while since I last posted here. Unfortunately I was too busy working on my (and mostly my clients) projects. With the new year, I will briefly touch on issues this year as an independent flex developer.</p>
<p><span id="more-418"></span></p>
<p>The last year has seen a lot going on in the business of flash and game development. Speaking for myself, being a Flex consultant with emphasis on games,  I&#8217;ve seen this sector gaining momentum as demand started to picked up since late 2009  - specifically here in Toronto. With more opportunities available locally, the environment for a freelance and consulting business is currently healthier. New platforms like mobile (Android) and social (Facebook, Twitter) became prominent this year for Flash and Flex developers as they account for the increase in investment capital for new projects.</p>
<p>Here is a list of things I expect to talk about this year in this blog:</p>
<ul>
<li>Developing for Android 2.3 (Gingerbread) and 3.0 (Honeycomb)</li>
<li>Flash games for tablet devices</li>
<li>Flash with Google maps and Facebook APIs</li>
<li>Programmatic animation and effects</li>
<li>Using Flex 4.5 (Hero)</li>
<li>Using the new 3D API in Flash</li>
</ul>
<p>As a final note, here are some of the best articles for this year-end by flash developers on being a freelance developer.</p>
<p style="padding-left: 30px;"><strong>Jesse Freeman &#8211; </strong><strong><a href="http://insideria.com/2010/12/if-you-can-make-it-here.html" target="_blank">If You Can Make it Here</a></strong></p>
<p style="padding-left: 30px;">In this 3 part series  Jesse Freeman  is a detailed account of his ventures in New York City including lots of figures. This three part article is a bit long, but it makes a fascinating read for anyone interested in becoming an independent developer.</p>
<p style="padding-left: 30px;">If you are short on time, skip to part 3 &#8211; where you get a glimpse at the obstacles he had to face, including living in a tiny apartment and dealing with clients that refuse to pay.</p>
<p style="padding-left: 30px;"><strong>Jesse Warden &#8211;  <a href="http://jessewarden.com/2010/11/state-of-the-flash-flex-market-for-2010.html" target="_blank">State of the Flash &amp; Flex Market for 2010</a></strong></p>
<p style="padding-left: 30px;">Jesse warden gives his annual state of the union address and discusses trends in the industry with business perspective.  As always, the comments are just as interesting as the post itself.</p>
<p style="padding-left: 30px;"><strong>Ben Stucki &#8211; <a href="http://blog.benstucki.net/?p=66" target="_blank">2010 Year End Review</a></strong></p>
<p style="padding-left: 30px;">In this post the author reveals the revenue numbers of his company, with breakdown of rates, expenses, taxes etc. It&#8217;s rare for anyone to expose this kind of data, which makes an interesting read.</p>
<p>That&#8217;s it for now. Happy new year for everyone!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flexwiz.net/thoughts-on-2010-and-being-independent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spark List with Zoom Effect</title>
		<link>http://blog.flexwiz.net/spark-list-with-zoom-effect/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=spark-list-with-zoom-effect</link>
		<comments>http://blog.flexwiz.net/spark-list-with-zoom-effect/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 15:30:58 +0000</pubDate>
		<dc:creator>theWiz</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex 4]]></category>
		<category><![CDATA[Effects]]></category>
		<category><![CDATA[Skinning]]></category>
		<category><![CDATA[Spark]]></category>

		<guid isPermaLink="false">http://flexwiz.amosl.com/?p=379</guid>
		<description><![CDATA[For a recent project  I needed to create a trivial image list with zoom effect for a spark based application. Image lists are commonly used for image galleries or menus, and Flex offers some UI components to quickly create and configure these generic lists, so I did not expect any difficulties. I was wrong. Even [...]]]></description>
			<content:encoded><![CDATA[<p>For a recent project  I needed to create a trivial image list with zoom effect for a spark based application. Image lists are commonly used for image galleries or menus, and Flex offers some UI components to quickly create and configure these generic lists, so I did not expect any difficulties.<br />
I was wrong. Even though creating image lists became an almost trivial task, there are a few pitfalls and none of the samples posted by Adobe were clear enough to address them. After spending some time with <a href="http://www.adobe.com/devnet-archive/flex/tourdeflex/web/#" target="_blank">tour-de-flex</a> samples I managed to come up with a different working solution.</p>
<p>This is what I needed:<br />
<img class="alignnone size-full wp-image-396" title="imgZoom" src="http://blog.flexwiz.net/wp-content/uploads/2010/10/imgZoom.png" alt="" width="550" height="167" /><br />
<span id="more-379"></span></p>
<h2>Basic Image List</h2>
<p>First of all lets consider the options. A list can be created by either a DataGroup or a spark List. Both components can display a list based on data provider and item renderer, but there are a few differences, summarized here:</p>
<ol>
<li>List is skinnable, DataGroup is not.</li>
<li>DataGroup is much lighter</li>
<li>List provides  additional  functionality, namely selection and drag-drop</li>
</ol>
<p>Since I needed the select functionality I decided to go with the List.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:List</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;lst1&quot;</span></span>
<span style="color: #009900;">          <span style="color: #000066;">dataProvider</span>=<span style="color: #ff0000;">&quot;{sampleData}&quot;</span></span>
<span style="color: #009900;">          <span style="color: #000066;">itemRenderer</span>=<span style="color: #ff0000;">&quot;cc.ImageRenderer&quot;</span></span>
<span style="color: #009900;">          <span style="color: #000066;">rollOverColor</span>=<span style="color: #ff0000;">&quot;#cccccc&quot;</span> <span style="color: #000066;">selectionColor</span>=<span style="color: #ff0000;">&quot;#eeee00&quot;</span></span>
<span style="color: #009900;">          <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;100%&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:layout<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:HorizontalLayout</span> <span style="color: #000066;">gap</span>=<span style="color: #ff0000;">&quot;4&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
       <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:layout<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
 <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:List<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h2>The Item Renderer</h2>
<p>Start with a basic renderer from a template: &#8216;New-&gt;MXML Item Renderer&#8217;. Add an image control as the main display object, and optionally some background. If you try to run you&#8217;ll get a list with static images.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:states<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:State</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;normal&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:State</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;hovered&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:State</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;selected&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:states<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:Rect</span> <span style="color: #000066;">left</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">right</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">top</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">bottom</span>=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:fill<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:SolidColor</span></span>
<span style="color: #009900;">            <span style="color: #000066;">color.normal</span>=<span style="color: #ff0000;">&quot;0x808080&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000066;">color.hovered</span>=<span style="color: #ff0000;">&quot;{getStyle('rollOverColor')}&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000066;">color.selected</span>=<span style="color: #ff0000;">&quot;{getStyle('selectionColor')}&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:fill<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:Rect<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;mx:Image</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;img&quot;</span></span>
<span style="color: #009900;">          <span style="color: #000066;">verticalAlign</span>=<span style="color: #ff0000;">&quot;middle&quot;</span> <span style="color: #000066;">horizontalAlign</span>=<span style="color: #ff0000;">&quot;center&quot;</span></span>
<span style="color: #009900;">          <span style="color: #000066;">left</span>=<span style="color: #ff0000;">&quot;4&quot;</span> <span style="color: #000066;">right</span>=<span style="color: #ff0000;">&quot;4&quot;</span> <span style="color: #000066;">top</span>=<span style="color: #ff0000;">&quot;4&quot;</span> <span style="color: #000066;">bottom</span>=<span style="color: #ff0000;">&quot;4&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p>Note that I took advantage of the styles for selection and rollover colors.<br />
Now we add the effect, using the postLayoutTransformOffsets property of the item renderer.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--       The Zoom effect      --&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:postLayoutTransformOffsets<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:TransformOffsets</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;tOffsets&quot;</span></span>
<span style="color: #009900;">                        <span style="color: #000066;">scaleX</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">scaleY</span>=<span style="color: #ff0000;">&quot;1&quot;</span></span>
<span style="color: #009900;">                        <span style="color: #000066;">scaleX.hovered</span>=<span style="color: #ff0000;">&quot;1.5&quot;</span> <span style="color: #000066;">scaleY.hovered</span>=<span style="color: #ff0000;">&quot;1.5&quot;</span></span>
<span style="color: #009900;">                        <span style="color: #000066;">scaleX.selected</span>=<span style="color: #ff0000;">&quot;1.1&quot;</span> <span style="color: #000066;">scaleY.selected</span>=<span style="color: #ff0000;">&quot;1.1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:postLayoutTransformOffsets<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!--       Transitions          --&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:transitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:Transition</span> <span style="color: #000066;">toState</span>=<span style="color: #ff0000;">&quot;hovered&quot;</span> <span style="color: #000066;">autoReverse</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:Animate</span> <span style="color: #000066;">target</span>=<span style="color: #ff0000;">&quot;{tOffsets}&quot;</span> <span style="color: #000066;">duration</span>=<span style="color: #ff0000;">&quot;200&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:SimpleMotionPath</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;scaleX&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:SimpleMotionPath</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;scaleY&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:Animate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:Transition<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:Transition</span> <span style="color: #000066;">fromState</span>=<span style="color: #ff0000;">&quot;hovered&quot;</span> <span style="color: #000066;">autoReverse</span>=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:Animate</span> <span style="color: #000066;">target</span>=<span style="color: #ff0000;">&quot;{tOffsets}&quot;</span> <span style="color: #000066;">duration</span>=<span style="color: #ff0000;">&quot;200&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:SimpleMotionPath</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;scaleX&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:SimpleMotionPath</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;scaleY&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:Animate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:Transition<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:transitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>To make the scale work from the center, simply set transformX and transformY to half the size of the renderer. Run the code and see the nice zoom effect on rollover. Works nice overall, but there is one problem &#8211; since the items are scaled during the effect, the area for the list is based on the normal scale, clipping the oversized item on the edges of the list. Simply put, we need some more space between the list and its container &#8211; which brings us to skinning.</p>
<h2>Skinning the list</h2>
<p>The default skin for spark list is basically a DataGroup enclosed within a scroll component. Simply adding margins between the list and the scroller will not do &#8211; the images would still get clipped. We need to wrap the list in a group, so that clipping can be controlled. Replacing the scroller block with the following code will do the trick.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--- The Scroller component to add scroll bars to the list. --&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:Scroller</span> <span style="color: #000066;">left</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">top</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">right</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">bottom</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;scroller&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:Group</span> <span style="color: #000066;">left</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">top</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">right</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">bottom</span>=<span style="color: #ff0000;">&quot;10&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;s:DataGroup</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;dataGroup&quot;</span></span>
<span style="color: #009900;">                     <span style="color: #000066;">left</span>=<span style="color: #ff0000;">&quot;22&quot;</span> <span style="color: #000066;">top</span>=<span style="color: #ff0000;">&quot;26&quot;</span> <span style="color: #000066;">right</span>=<span style="color: #ff0000;">&quot;22&quot;</span> <span style="color: #000066;">bottom</span>=<span style="color: #ff0000;">&quot;26&quot;</span></span>
<span style="color: #009900;">                     <span style="color: #000066;">itemRenderer</span>=<span style="color: #ff0000;">&quot;spark.skins.spark.DefaultItemRenderer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:DataGroup<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:Group<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/s:Scroller<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h2>Final Result</h2>
<p> <a href="http://blog.flexwiz.net/sources/listdemo/bin/ListDemo.swf" target="_blank"><img src="http://blog.flexwiz.net/wp-content/uploads/2010/10/demo_button.png" alt="" title="View Demo" width="200" height="60" class="alignnone size-full wp-image-410" /></a>    <a href="http://blog.flexwiz.net/sources/listdemo/" target="_blank"><img src="http://blog.flexwiz.net/wp-content/uploads/2010/10/ViewSource.png" alt="" title="View Source" width="200" height="60" class="alignnone size-full wp-image-412" /></a></p>
<p>The demo app contains the three different lists to compare the effect of the skin and rederer.<br />
Looking at the final result, we got a slightly modified skin for the list and the item renderer. Most of the effort went on skinning &#8211; not bad, considering the list itself and the effect are used almost out of the box.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flexwiz.net/spark-list-with-zoom-effect/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Showcase: a Facebook Game</title>
		<link>http://blog.flexwiz.net/showcase-facebook-game/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=showcase-facebook-game</link>
		<comments>http://blog.flexwiz.net/showcase-facebook-game/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 00:47:21 +0000</pubDate>
		<dc:creator>theWiz</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Physics]]></category>
		<category><![CDATA[Tween]]></category>

		<guid isPermaLink="false">http://flexwiz.amosl.com/?p=357</guid>
		<description><![CDATA[Its not often that I get a client&#8217;s game released. Few times in the past I have worked on games that never saw the light of day &#8211; and this isn&#8217;t one of them. So I&#8217;m taking the opportunity to show off a project I&#8217;m involved in that got published recently as a Facebook game. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-360" style="margin: 4px; border: 2px solid black;" title="lotto_tnail" src="http://blog.flexwiz.net/wp-content/uploads/2010/08/lotto_tnail.jpg" alt="" width="278" height="198" />Its not often that I get a client&#8217;s game released. Few times in the past I have worked on games that never saw the light of day &#8211; and this isn&#8217;t one of them.</p>
<p>So I&#8217;m taking the opportunity to show off a project I&#8217;m involved in that got published recently as a Facebook game.</p>
<p style="text-align: center;"><a href="http://www.facebook.com/?ref=logo#!/apps/application.php?id=130347450329810&amp;ref=ts" target="_blank">Lottorace Facebook page</a></p>
<p>This project is  made of server side and client side. The client side is Flash, and several packages where used to create it. It&#8217;s based on Flex 4 with Spark controls, uses <a href="http://www.robotlegs.org/" target="_blank">Robotlegs </a>as mvcs framework and makes use of Facebook API for connectivity.</p>
<p><span id="more-357"></span></p>
<p>As part of my role in the development I had to implement the animations and effects entirely in code &#8211; based on prior designs by artists that where done originally as timeline animations.</p>
<h5>Game Area</h5>
<p>The main game level contains a &#8216;lotto machine&#8217; that features physics, particle motion and plenty of sequenced effects. To achieve those, I relied heavily on <a href="http://www.greensock.com/tweenmax/" target="_blank">Greensock TweenMax 11</a> with its excellent plugins as well as home-brew physics code.</p>
<table border="0" width="100%" frame="void">
<tbody>
<tr>
<td align="center">
<p style="text-align: center;"><img class="size-full wp-image-361 alignnone" title="lrace2_p2" src="http://blog.flexwiz.net/wp-content/uploads/2010/08/lrace2_p2.jpg" alt="" width="421" height="421" /></p>
</td>
</tr>
</tbody>
</table>
<p style="text-align: center;"><a href="http://apps.facebook.com/lottorace" target="_blank">The Game</a></p>
<p><a href="http://apps.facebook.com/lottorace" target="_blank"></a>Both the floating balls and the ones falling down the tube have particle physics with some collision, so they bounce off the glass and off each other in a &#8216;believable&#8217; manner.  For the rest we used TweenMax.</p>
<p>A word on TweenMax: this is by far the best animation/tweening library in the market and I can&#8217;t start to imagine how I would do without it. Its really easy to use and produces nice smooth motion with tons of differnt options. If you plan on doing any animation in code you should definitely <a href="http://www.greensock.com/" target="_blank">check it out</a>.</p>
<p>Technically speaking the entire code was designed with performance in mind. There isn&#8217;t a single timer in the code (flash timers are bad for you) and only a single point were the ENTER_FRAME event is used. That proved as a valuable decision in regards to performance tuning and memory footprint &#8211; for the most part, the game runs in a steady rate of 30 fps.</p>
<p><img class="alignnone size-full wp-image-363" style="margin-top: 4px; margin-bottom: 4px;" title="lrace_p1" src="http://blog.flexwiz.net/wp-content/uploads/2010/08/lrace_p1.jpg" alt="" width="600" height="201" /></p>
<p>So <a href="http://apps.facebook.com/lottorace">check it out here</a>, and comment here if you like it.</p>
<p>I sure had a lot of fun working on it!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flexwiz.net/showcase-facebook-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

