<?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"
	>

<channel>
	<title>AH:</title>
	<atom:link href="http://www.hulstkamp.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.hulstkamp.com</link>
	<description>andy hulstkamp blog about rich internet applications, flex, flash, java, webapps, web, code, experiments</description>
	<pubDate>Sun, 30 May 2010 17:25:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Nicer Tooltips and balloon help for Flex 4</title>
		<link>http://www.hulstkamp.com/2010/05/30/nicer-tooltips-and-balloon-help-for-flex-4/525</link>
		<comments>http://www.hulstkamp.com/2010/05/30/nicer-tooltips-and-balloon-help-for-flex-4/525#comments</comments>
		<pubDate>Sun, 30 May 2010 17:22:43 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[Actionscript 3]]></category>

		<category><![CDATA[FXG]]></category>

		<category><![CDATA[Sound]]></category>

		<category><![CDATA[flex 4]]></category>

		<category><![CDATA[component]]></category>

		<category><![CDATA[skin]]></category>

		<category><![CDATA[ToolTipManager]]></category>

		<category><![CDATA[tootlips]]></category>

		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=525</guid>
		<description><![CDATA[Tooltips are a good way to provide a user with additional information for controls and Flex offers Tooltips out of the box. The default Tooltips are fine but when text gets longer than just a few words usability may suffer.
For a current project, I needed more like a balloon help in place of tooltips and [...]]]></description>
			<content:encoded><![CDATA[<p>Tooltips are a good way to provide a user with additional information for controls and Flex offers Tooltips out of the box. The default Tooltips are fine but when text gets longer than just a few words usability may suffer.</p>
<p>For a current project, I needed more like a balloon help in place of tooltips and therefore decided not to use Flex default tooltips.</p>
<p>Regarding usability of the tooltips (balloon help) I want to be able to</p>
<ul>
<li>Display an optional tooltip title</li>
<li>Display formatted tooltip text</li>
<li>Display icons</li>
<li>Colorize the tooltip based on the semantic of the invoking control</li>
<li>Consistent Placement</li>
<li>Have all title, text, styles for the tooltips stored in a central location</li>
<li>Have the tooltips work in a generic and Flex-compliant way</li>
</ul>
<p>Flex gives you a few ways to customize tooltips from registering your custom ToolTip class to intercepting Tooltip events where you can hook up the custom tooltip. All of these approaches fall either short of the requirements I had or would add additional overhead so I simply created a custom ToolTipManager that would alter the behaviour of the default ToolTipManager.</p>
<p>Here&#8217;s a <a href="http://www.hulstkamp.com/byard/flex4/AHNiceToolTip/Flex4NiceTooltips.html">demo </a>of the final result, the approch is described further down.</p>
<p><a href="http://www.hulstkamp.com/byard/flex4/AHNiceToolTip/Flex4NiceTooltips.html"><br />
<img src="http://www.hulstkamp.com/byard/flex4/AHNiceToolTip/NiceToolTips.png" alt="NiceToolTips Demo" /><br />
</a></p>
<p>Since I like to have all resources centralized, the approach I followed was to <span id="more-525"></span>interpret the value of the <em>tooltip</em>- or the <em>errorString </em>property on a control not as the tooltip text to display but as a partial key to lookup title, text, styles etc. in a resource bundle. Form this partial key concrete keys would be derived to lookup the values for a controls tooltip.</p>
<p>For example</p>

<div class="wp_syntax"><div class="code"><pre class="mxml mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> label=”OK” tooltip=”ToolTipBundle.okButton” <span style="color: #7400FF;">/&gt;</span></span></pre></div></div>

<p>would point to the ResourceBundle named  ‘<em>ToolTipBundle</em>’ and within this to all entries of a key starting with <em>tooltip.okButton</em>. Then the values for title, text etc. will be looked up by the custom ToolTipManager implementation and be applied to the tooltip.</p>
<p>The first token in the tooltip property specifies the name of the resource bundle, the second token the partial key for looking up the entries in the resource bundle. If no second token is specified the id (if any) of the component is being used.</p>
<p>Entries in the resource bundle then refer to the partial key submitted and define the concrete values to use for the tooltip.</p>

<div class="wp_syntax"><div class="code"><pre class="properties" style="font-family:monospace;">tooltip.okButton.title=Title of Tooltip
tooltip.okButton.text=Text for this tooltip
tooltip.okButton.styleName=CSS class to use for this tooltip
tooltip.okButton.placement=bottomRight|bottomLeft|topRight|topLeft
tooltip.okButton.color=Color of text
tooltip.okButton.chromeColor=Color of tooltip</pre></div></div>

<p>Color and chromeColor are there for convenience but can also be set via the CSS class specified by styleName. If any of the entries are not specified fallbacks to default values are used.</p>
<p>To make this work some methods of the default ToolTipManager need to be overwritten</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">override mx_internal <span style="color: #000000; font-weight: bold;">function</span> initializeTip<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></pre></div></div>

<p>This is where the cstom implementation looks up the values and assigns them to the tooltip.</p>
<p>Additionally there’s the</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">override mx_internal <span style="color: #000000; font-weight: bold;">function</span> positionTip<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span></pre></div></div>

<p>method to position the tooltip in a custom way.</p>
<p>The custom ToolTipManager implementation is registered at loading using a custom preloader class.</p>
<p>The custom Tooltip itself  is a simple SkinnableComponent associated with a SparkSkin. There’s a required skin part for the text and a dynamic skin part for the label that only gets added if any value for a title  is provided.</p>
<p>For both title and text a RichText component is used within the skin so that formatting the text in a rich way is possible. The associated skin is then responsible to draw the tooltip based on the provided placement.<br />
Having set this up, usage of the custom tooltips for any app is simple.</p>

<div class="wp_syntax"><div class="code"><pre class="mxml mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span>               </span>
<span style="color: #000000;">    preloader=<span style="color: #ff0000;">&quot;com.hulstkamp.flex.spark.preloaders.CustomMixinPreloader&quot;</span><span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>This will register the custom ToolTipManager.</p>
<p>For additional documentation see the source in the demo (view source is enabled).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2010/05/30/nicer-tooltips-and-balloon-help-for-flex-4/525/feed</wfw:commentRss>
		</item>
		<item>
		<title>Updated components to Flex 4 sdk final</title>
		<link>http://www.hulstkamp.com/2010/05/08/updated-components-to-flex-4-sdk-final/506</link>
		<comments>http://www.hulstkamp.com/2010/05/08/updated-components-to-flex-4-sdk-final/506#comments</comments>
		<pubDate>Sat, 08 May 2010 16:26:43 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[flex 4]]></category>

		<category><![CDATA[custom component]]></category>

		<category><![CDATA[release sdk]]></category>

		<category><![CDATA[skinning]]></category>

		<category><![CDATA[Spark]]></category>

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=506</guid>
		<description><![CDATA[During the past year I&#8217;ve posted a couple of custom Gumbo (flex 4 beta) components and skins.
Since they&#8217;ve been built on beta sdks, these components might need some adjustments to work with the Flex 4 release sdk.
To save you the work of figuring out what to adjust here are the most requested components updated to [...]]]></description>
			<content:encoded><![CDATA[<p>During the past year I&#8217;ve posted a couple of custom Gumbo (flex 4 beta) components and skins.</p>
<p>Since they&#8217;ve been built on beta sdks, these components might need some adjustments to work with the Flex 4 release sdk.</p>
<p>To save you the work of figuring out what to adjust here are the most requested components updated to Flex 4 release sdk. Click on the images, view source is enabled.</p>
<p>Flex 4 Spark Rating Component. View source enabled. Original post <a href="http://www.hulstkamp.com/2009/07/09/custom-popup-rating-component-in-spark-flex-4-gumbo/464">here</a>.</p>
<p><a href="http://www.hulstkamp.com/byard/flex4/AHCityRating/AHPopUpAnchorTest.html"><img title="Flex 4 Spark Rating Component" src="http://www.hulstkamp.com/byard/assets/images/cityRatingComponent.png" alt="Flex 4 Spark Rating Component" width="456" height="303" /></a></p>
<p>Flex 4 Spark Icon Button based on a generic skin.View source enabled. Original post <a href="http://www.hulstkamp.com/2009/06/20/advanced-fxg-spark-icon-buttons-with-one-generic-skin-in-flex4-gumbo/439">here</a>.</p>
<p><a href="http://www.hulstkamp.com/byard/flex4/AHGenericFxgIconButtonTest/AHFXGIconTest.html"><img title="Flex 4 Spark Icon Button based on a generic skin" src="http://www.hulstkamp.com/byard/assets/images/GenericFXGIconButtons.png" alt="Flex 4 Spark Icon Button based on a generic skin" width="512" height="193" /></a></p>
<p>Flex 4 Spark icon button. View source enabled.Original post <a href="http://www.hulstkamp.com/2009/06/18/spark-icon-button-with-gradient-effects-and-filter-animation-colorized-by-styles-flex-4-gumbo/403">here</a>.</p>
<p><a href="http://www.hulstkamp.com/byard/flex4/AHIconButtonTest/AHSimpleIconButtonTest.html"><img title="Flex 4 Spark Icon Button" src="http://www.hulstkamp.com/byard/assets/images/iconButtons.png" alt="Flex 4 Spark Icon Button" width="345" height="124" /></a></p>
<p>Flex 4 Spark custom checkbox. View source enabled. Original post <a href="http://www.hulstkamp.com/2009/06/13/custom-spark-checkbox-component-in-flex-4-gumbo/361">here</a>.</p>
<p><a href="http://www.hulstkamp.com/byard/flex4/AHCheckBoxTest/AHCheckboxTest.html"><img title="Flex 4 Spark custom checkbox" src="http://www.hulstkamp.com/byard/assets/images/CustomCheckBox.png" alt="Flex 4 Spark custom checkbox" width="339" height="169" /></a></p>
<p>Flex 4 Spark custom knob button. View source enabled. Original post <a href="http://www.hulstkamp.com/2009/02/26/custom-component-in-flex-4-gumbo-a-knob-button-part-1/300">here</a>.</p>
<p><a href="http://www.hulstkamp.com/byard/flex4/AHFxgKnobButtonTest/AhFxButtonTest.html"><img title="Flex 4 Spark custom knob button" src="http://www.hulstkamp.com/byard/assets/images/CustomKnobComponent.png" alt="Flex 4 Spark custom knob button" width="480" height="130" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2010/05/08/updated-components-to-flex-4-sdk-final/506/feed</wfw:commentRss>
		</item>
		<item>
		<title>Flex 4: change baseColor to chromeColor and useChromeColor=true</title>
		<link>http://www.hulstkamp.com/2010/04/07/flex-4-change-basecolor-to-chromecolor-and-usechromecolortrue/496</link>
		<comments>http://www.hulstkamp.com/2010/04/07/flex-4-change-basecolor-to-chromecolor-and-usechromecolortrue/496#comments</comments>
		<pubDate>Wed, 07 Apr 2010 17:18:51 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[Actionscript 3]]></category>

		<category><![CDATA[Gumbo (Flex 4 beta)]]></category>

		<category><![CDATA[flex 4]]></category>

		<category><![CDATA[baseColor]]></category>

		<category><![CDATA[chromeColor]]></category>

		<category><![CDATA[colorization]]></category>

		<category><![CDATA[component]]></category>

		<category><![CDATA[Spark]]></category>

		<category><![CDATA[styles]]></category>

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=496</guid>
		<description><![CDATA[While updating the Gumbo-Components on this blog to flex 4 final I noticed that the style-property baseColor has been changed to chromeColor.
In addition to this the flag useChromeColor can be set to tell the SparkSkin to use chromeColor for colorization. For custom skins this can be set by overriding initializationComplete() in the skin.

override protected function [...]]]></description>
			<content:encoded><![CDATA[<p>While updating the Gumbo-Components on this blog to flex 4 final I noticed that the style-property <em>baseColor </em>has been changed to <em>chromeColor</em>.</p>
<p>In addition to this the flag <em>useChromeColor </em>can be set to tell the SparkSkin to use <em>chromeColor </em>for colorization. For custom skins this can be set by overriding <em>initializationComplete()</em> in the skin.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">override protected <span style="color: #000000; font-weight: bold;">function</span> initializationComplete<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>  <span style="color: #66cc66;">&#123;</span>
&nbsp;
	useChromeColor = <span style="color: #000000; font-weight: bold;">true</span>;
	<span style="color: #0066CC;">super</span>.<span style="color: #006600;">initializationComplete</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Internally Flex checks this flag in <em>updateDisplayList()</em> of a <em>SparkSkin </em>and uses the value in chromeColor for colorization (respecting exclusions in get colorizeExclusions()).</p>
<p>If you are using Gumbo-Components from this blog that use baseColor be sure to make these adjustments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2010/04/07/flex-4-change-basecolor-to-chromecolor-and-usechromecolortrue/496/feed</wfw:commentRss>
		</item>
		<item>
		<title>Custom PopUp Rating Component in Spark Flex 4 (Gumbo)</title>
		<link>http://www.hulstkamp.com/2009/07/09/custom-popup-rating-component-in-spark-flex-4-gumbo/464</link>
		<comments>http://www.hulstkamp.com/2009/07/09/custom-popup-rating-component-in-spark-flex-4-gumbo/464#comments</comments>
		<pubDate>Thu, 09 Jul 2009 08:12:08 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[FXG]]></category>

		<category><![CDATA[Gumbo (Flex 4 beta)]]></category>

		<category><![CDATA[custom component]]></category>

		<category><![CDATA[effects]]></category>

		<category><![CDATA[masking]]></category>

		<category><![CDATA[popup]]></category>

		<category><![CDATA[rating]]></category>

		<category><![CDATA[skin parts]]></category>

		<category><![CDATA[Spark]]></category>

		<category><![CDATA[states]]></category>

		<category><![CDATA[Transitions]]></category>

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=464</guid>
		<description><![CDATA[I was experimenting a little with the PopUpAnchor in Spark Flex 4 and came up with a new custom component for ratings. The new component has the following characteristics:

Show a placeholder-icon that reflects the current rating and serves as an interactive element to open the ratings
ratings pop up for adjustment
both the placeholder-icon and the ratings-icons [...]]]></description>
			<content:encoded><![CDATA[<p>I was experimenting a little with the PopUpAnchor in Spark Flex 4 and came up with a new custom component for ratings. The new component has the following characteristics:</p>
<ul>
<li>Show a placeholder-icon that reflects the current rating and serves as an interactive element to open the ratings</li>
<li>ratings pop up for adjustment</li>
<li>both the placeholder-icon and the ratings-icons will be gradually filled with color when adjustments are being made</li>
<li>the icons are defined in FXG</li>
<li>the icons are not defined in the skin but can be passed as a style for generic use (one skin for different icons and ratings)</li>
<li>there is colorization of the icons based on styles</li>
<li>smooth transitions when opening the ratings</li>
</ul>
<p><a href="http://www.hulstkamp.com/byard/gumbo/cityRating/AHPopUpAnchorTest.html">Here&#8217;s a pseudo city-rating demo</a> that shows variations of the component using different icons and color settings for different ratings.</p>
<p><a href="http://www.hulstkamp.com/byard/gumbo/cityRating/AHPopUpAnchorTest.html"><img src="http://www.hulstkamp.com/byard/gumbo/cityRating/cityRatingComponent.png" alt="City Rating Component" /></a></p>
<p>You&#8217;ll find the source at the end of this post. It is <span id="more-464"></span>fully documented but here&#8217;s an overview of the key-concept nonetheless.</p>
<h3>Skin-Parts</h3>
<p>There are skin-parts for the open-button (which is actually a group that works as a button), the drop-down which is a group that holds the entire pop-up, the active-group and the passive-group that hold the icons for adjustments of the rating and the label-element to show the rating as text.</p>
<h3>Building the View</h3>
<p>The icons are not part of the skin. They will be set at run time and are pushed down to the skin when the component loads the different skin-parts.</p>
<p>In partAdded() of the component, the active-group and the passive-group are filled with the icons. Five icons in a colorized version are pushed down to the active part.  Five default icons are pushed down to the passive-group.</p>
<h3>Masking and Fill Effect</h3>
<p>To create an effect that gives the impression of gradually filling the icons when the rating is adjusted, masks are used.  When skin-parts are loaded, the component applies a mask to the active-group.  When the mouse is dragged to adjust the rating, the width of the mask is updated and the (colorized) icons of the active-group are revealed.</p>
<p>The mask is not part of the skin. It is created at run-time by the component and applied to the relevant skin-part.</p>
<h3>FXG Icons passed via Styles</h3>
<p>The Icons are defined in FXG. Basically each Icon is a MXML-Component. The Icons are passed as a ClassReference to the component via styles. The ClassReference is then used to create an instance of this class at run-time. The instances of the icon are then added to their respective groups.<br />
An Icon is basically a mxml-component that extends from Group. You can create your own and reference it via the rating Icon style.</p>
<h3>Colorization based on Styles</h3>
<p>The Icons are colorized at run-time. Based on some colors that are passed as styles the icons get colorized using a ColorTransform.</p>
<h3>Effects on PopUp</h3>
<p>There is a resize and a fade effect when the pop up is openend. These are defined on the skin - you can remove them by simply commenting out the transition part in the skin.</p>
<h3>Separation of Concerns</h3>
<p>Spark promotes a clean separation of concerns. The Component should keep track of the data/state and work as a controller, the skin is there for the view.  I decided to create and update the mask in the component, because the masking effect is an inherent part of this implementation and setting up the masking infrastructure in the component helps to keep the skin cleaner. Another approach would be to define the mask in the skin, then pull the value for the rating from the component and adjust the mask accordingly.<br />
Still, every aspect of the look (gap, background-colors, borders, effects etc.) is controlled by the skin.</p>
<h3>Usage</h3>
<p>Setting the basic styles for the AHPopUpRatingComponent:</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">ah|AHPopUpRatingComponent <span style="color: #00AA00;">&#123;</span>
	skinClass<span style="color: #00AA00;">:</span> ClassReference<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'AHPopUpRatingComponentSkin'</span><span style="color: #00AA00;">&#41;</span>;
	passiveIconColor<span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;0x808080&quot;</span>;
	activeIconColor<span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;0xc0c0c0&quot;</span>;
	baseColor<span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;0xb0b0b0&quot;</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Using a variation of style values: For this example use styleName=&#8217;medicareRating&#8217; on the component to set the css-class. It uses the Icon under myLibrary.HealthCross and has a light blue color for the active icons.</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">ah|AHPopUpRatingComponent<span style="color: #6666ff;">.medicareRating</span> <span style="color: #00AA00;">&#123;</span>
	ratingIcon<span style="color: #00AA00;">:</span> ClassReference<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'myLibrary.HealthCross'</span><span style="color: #00AA00;">&#41;</span>;
	activeIconColor<span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;0xCAEAFF&quot;</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The icons are mxml-components, that extend from Group. Use the fully qualified class-path in the ClassReference of the ratingIcon-style to reference the icon. Here&#8217;s an example:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Group</span> horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> width=<span style="color: #ff0000;">&quot;25&quot;</span> height=<span style="color: #ff0000;">&quot;25&quot;</span>  xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Path</span>  x=<span style="color: #ff0000;">&quot;5&quot;</span> winding=<span style="color: #ff0000;">&quot;nonZero&quot;</span> ai:knockout=<span style="color: #ff0000;">&quot;0&quot;</span> data=<span style="color: #ff0000;">&quot;M 9.404 0.01 C 9.051 8.355 -1.506 9.232 3.065 16.324 C 1.835 17.4 0.006 19.866 0.006 25.01 L 1.886 25.01 C 1.886 20.554 3.357 18.569 4.244 17.776 C 18.309 18.361 13.558 4.163 9.404 0.01 Z&quot;</span> <span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:fill</span><span style="color: #7400FF;">&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:LinearGradient</span> x=<span style="color: #ff0000;">&quot;6.82861&quot;</span> y=<span style="color: #ff0000;">&quot;0.00683594&quot;</span> scaleX=<span style="color: #ff0000;">&quot;25&quot;</span> rotation=<span style="color: #ff0000;">&quot;90&quot;</span><span style="color: #7400FF;">&gt;</span></span>
				<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:GradientEntry</span> color=<span style="color: #ff0000;">&quot;0xfbfbfb&quot;</span> ratio=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
				<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:GradientEntry</span> color=<span style="color: #ff0000;">&quot;0xdcdcdc&quot;</span> ratio=<span style="color: #ff0000;">&quot;0.5&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
				<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:GradientEntry</span> color=<span style="color: #ff0000;">&quot;0xcccccc&quot;</span> ratio=<span style="color: #ff0000;">&quot;0.5&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
				<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:GradientEntry</span> color=<span style="color: #ff0000;">&quot;0x909090&quot;</span> ratio=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:LinearGradient</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:fill</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:stroke</span><span style="color: #7400FF;">&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SolidColorStroke</span> color=<span style="color: #ff0000;">&quot;0xd8d8d8&quot;</span> caps=<span style="color: #ff0000;">&quot;none&quot;</span> weight=<span style="color: #ff0000;">&quot;1&quot;</span> joints=<span style="color: #ff0000;">&quot;miter&quot;</span> miterLimit=<span style="color: #ff0000;">&quot;4&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:stroke</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Path</span><span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Group</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p><del datetime="2010-05-08T16:38:25+00:00">Get the source (sdk: 7282) <a href="http://www.hulstkamp.com/byard/gumbo/cityRating/srcview/index.html">here</a>.</del></p>
<p>Source <a href="http://www.hulstkamp.com/2010/05/08/updated-components-to-flex-4-sdk-final/506">updated </a>to release sdk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2009/07/09/custom-popup-rating-component-in-spark-flex-4-gumbo/464/feed</wfw:commentRss>
		</item>
		<item>
		<title>Advanced FXG Spark Icon Buttons with one generic skin in Flex4 (Gumbo)</title>
		<link>http://www.hulstkamp.com/2009/06/20/advanced-fxg-spark-icon-buttons-with-one-generic-skin-in-flex4-gumbo/439</link>
		<comments>http://www.hulstkamp.com/2009/06/20/advanced-fxg-spark-icon-buttons-with-one-generic-skin-in-flex4-gumbo/439#comments</comments>
		<pubDate>Sat, 20 Jun 2009 17:49:25 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[Actionscript 3]]></category>

		<category><![CDATA[FXG]]></category>

		<category><![CDATA[Gumbo (Flex 4 beta)]]></category>

		<category><![CDATA[effects]]></category>

		<category><![CDATA[generic]]></category>

		<category><![CDATA[Icons]]></category>

		<category><![CDATA[pseudo selectors]]></category>

		<category><![CDATA[skinning]]></category>

		<category><![CDATA[states]]></category>

		<category><![CDATA[Transitions]]></category>

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=439</guid>
		<description><![CDATA[For the past couple of days I&#8217;ve had a look at creating Spark Icon Buttons. In this post I&#8217;ve created an FXG Icon Button with some transitions, leveraging pseudo selectors for states. The Icon was &#8216;hardcoded&#8217; into the skin. For another Icon I would need to duplicate the skin and introduce another graphic. Not exactly [...]]]></description>
			<content:encoded><![CDATA[<p>For the past couple of days I&#8217;ve had a look at creating Spark Icon Buttons. In <a href="http://www.hulstkamp.com/2009/06/18/spark-icon-button-with-gradient-effects-and-filter-animation-colorized-by-styles-flex-4-gumbo/403">this post</a> I&#8217;ve created an FXG Icon Button with some transitions, leveraging pseudo selectors for states. The Icon was &#8216;hardcoded&#8217; into the skin. For another Icon I would need to duplicate the skin and introduce another graphic. Not exactly generic. There are <a href="http://www.hulstkamp.com/?p=433">other ways</a> to bring graphics into Spark Skins but none of them work with FXG Elements directly.</p>
<p>What I want is:</p>
<ul>
<li>work with FXG Graphic Elements for simpler manipulation and scaling</li>
<li>easily export the FXG-Definitions for the icons from a tool and/or be able to change them in FB directly</li>
<li>colorize the icons based on a color style-property and do this per state</li>
<li>change the icons based on a style-property and do this per state</li>
<li>change icons at runtime</li>
<li>scaling effect on icon</li>
<li>have ONE generic skin, so no duplicates for different icons are necessary</li>
</ul>
<p>Most of the trouble with generic skins comes from the fact that there is no way to access the FXG Library-Definitions at run-time  (as far as I know) - like getting an instance of a symbol in the library, the way we had in flash. Here&#8217;s a <a href="http://www.hulstkamp.com/2009/05/28/creating-fxg-library-elements-at-runtime-in-flex-4-gumbo/337">hack</a> but I&#8217;d rather not use it.</p>
<p>After some headaches I finally managed to get a solution I can live with:</p>
<p><a href="http://www.hulstkamp.com/byard/gumbo/GenericFXGIconButtons/AHFXGIconTest.html"><img class="alignnone" title="Generic FXG Icon Buttons" src="http://www.hulstkamp.com/byard/gumbo/GenericFXGIconButtons/GenericFXGIconButtons.png" alt="" width="512" height="193" /></a></p>
<p>Click <a href="http://www.hulstkamp.com/byard/gumbo/GenericFXGIconButtons/AHFXGIconTest.html">here</a> for a test.</p>
<p>You&#8217;ll find the source at the end of this post.</p>
<p>The solution regarding the work flow mainly comes down to<span id="more-439"></span></p>
<ul>
<li>Create Icons in Illustrator and convert them to symbols. One symbol per icon, name them. Save from Illustrator as ai.</li>
<li>Load the Illustrator-File in Flash Catalyst and go to the Code-View</li>
<li>You&#8217;ll see that FC creates mxml-files with the graphical content per icon</li>
<li>Copy these files over to Flex-Builder or set the source path so that the catalyst export is in your flex project</li>
</ul>
<p>In the code there are some key concepts:</p>
<ul>
<li>In the skin there is a group where the icons will get attached at run time</li>
<li>The skin listens for state changes and creates an instance of an icon component based on the iconName that is passed via styles.</li>
<li>There is some caching involved, so that there will be no instantiation when an icon/state has allready been created</li>
<li>The Icons get colorized based on a style property and - if defined  - per state.</li>
<li>The colorization occurs recursively, diving through the nested elements and setting the color of any nested FilledElement</li>
<li>There is some code involved that manages the scaling of the new instances for the transitions</li>
<li>Icons, colors and baseColors can be set via styles (and using pseudo selectors for over and down states)</li>
</ul>
<p><del datetime="2010-05-08T16:37:22+00:00">Here&#8217;s the <a href="http://www.hulstkamp.com/byard/gumbo/GenericFXGIconButtons/srcview/index.html">source </a>(sdk 4.0.0.7282)</del></p>
<p>Source <a href="http://www.hulstkamp.com/2010/05/08/updated-components-to-flex-4-sdk-final/506">updated </a>to Flex 4 release sdk.</p>
<p>Note: As a variation to instantiate the icons you could put all the FXG-Definition in the Skin inside the library and create them at runtime using the hack mentioned at the beginning of this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2009/06/20/advanced-fxg-spark-icon-buttons-with-one-generic-skin-in-flex4-gumbo/439/feed</wfw:commentRss>
		</item>
		<item>
		<title>Getting Vector Graphics into Spark Skins</title>
		<link>http://www.hulstkamp.com/2009/06/20/getting-vector-graphics-into-spark-skins/433</link>
		<comments>http://www.hulstkamp.com/2009/06/20/getting-vector-graphics-into-spark-skins/433#comments</comments>
		<pubDate>Sat, 20 Jun 2009 10:42:13 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[FXG]]></category>

		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Gumbo (Flex 4 beta)]]></category>

		<category><![CDATA[Misc]]></category>

		<category><![CDATA[embed]]></category>

		<category><![CDATA[graphics]]></category>

		<category><![CDATA[load]]></category>

		<category><![CDATA[skin]]></category>

		<category><![CDATA[vectros]]></category>

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=433</guid>
		<description><![CDATA[It was funny to see how many examples of Spark Icon Buttons have shown up in the past few days. Andy mcintosh did an example here, Ben another one here, I did one myself here. While all were using a slightly different approach the motivation behind them was probably, that the Spark Button does not [...]]]></description>
			<content:encoded><![CDATA[<p>It was funny to see how many examples of Spark Icon Buttons have shown up in the past few days. Andy mcintosh did an example <a href="http://www.andymcintosh.com/?p=179">here</a>, Ben another one <a href="http://www.themorphicgroup.com/blog/2009/06/18/how-to-create-a-spark-icon-button-and-skin/">here</a>, I did one myself <a href="http://www.hulstkamp.com/2009/06/18/spark-icon-button-with-gradient-effects-and-filter-animation-colorized-by-styles-flex-4-gumbo/403">here</a>. While all were using a slightly different approach the motivation behind them was probably, that the Spark Button does not have an icon property compared to the Halo coutnerpart.</p>
<p>Out of the box there are basically three ways to get graphics into a Spark skin.<span id="more-433"></span></p>
<hr />
<h3>Use Image:</h3>
<p>Use an Image component in the skin of the button and embed the icon into a style that is used by the button (Using a property and fetching the graphic from there is another variation).</p>

<div class="wp_syntax"><div class="code"><pre class="mxml mxml" style="font-family:monospace;">.btnClass {
symbol: Embed(source='../assets/crossSymbols.swf', symbol='addCross');
}
...
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Image</span> id=<span style="color: #ff0000;">&quot;symbol&quot;</span>  source=<span style="color: #ff0000;">&quot;{hostComponent.getStyle('symbol')}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
...
or
...
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span>  source=<span style="color: #ff0000;">&quot;{hostComponent.getStyle('symbol')}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span></pre></div></div>

<h4>pros:</h4>
<ul>
<li>Can use bitmaps or vectors</li>
<li>When using vectors, scaling effects of the graphic works well</li>
<li>possible loading of graphics at run time</li>
<li>reusable skin for different graphics</li>
</ul>
<h4>cons:</h4>
<ul>
<li>Overhead by using Halo Component in the skin</li>
<li>No FXG defined graphics, if you want them.</li>
</ul>
<hr />
<h3>Use Spark BitmapImage</h3>
<p>Works the same way as above, but uses an BitmapImage in the skin:</p>
<h4>pros:</h4>
<ul>
<li>Can use bitmaps or vectors</li>
<li>reusable skin for different graphics</li>
</ul>
<h4>cons:</h4>
<ul>
<li>Vectors are internally drawn to a bitmap an treated accordingly</li>
<li>Scaling effects work not so well since bitmaps are used</li>
<li>No FXG defined graphics, if you want them.</li>
</ul>
<hr />
<h3>Use FXG GraphicElements</h3>
<p>The Graphics are defined by FXG Graphic Elements directly.</p>
<h4>pros:</h4>
<ul>
<li>Uses FXG (with possible bi-directional tooling support)</li>
</ul>
<h4>cons:</h4>
<ul>
<li>Skins are not reusable for different graphics, graphic is &#8216;hardcoded&#8217; into the skin</li>
</ul>
<p>Personally, I&#8217;d love to use FXG. With Flash Catalyst, the FXG-Support in Illustrator et al. and the obvious commitment of Adobe to push FXG as the XML-based graphics interchange format for the Flash Platform, I guess it will be easier and more transparent to work with FXG when it comes to vector graphics. Exporting all the stuff to swfs or swcs is ok, but i&#8217;d rather not.</p>
<p>Now, creating a spark skin for every OK-, Submit- and Cancel IconButton etc. just won&#8217;t cut it. Sure you can copy the skin over but when you have lots of transitions and stuff and your client asks for a change you gonna have to repeatedly change the skins. Not very funny.</p>
<p>All that&#8217;s needed is a way to access the Library-definitions of FXG at runtime. Up until now, I haven&#8217;t found any, except for the hack I posted <a href="http://www.hulstkamp.com/2009/05/28/creating-fxg-library-elements-at-runtime-in-flex-4-gumbo/337">here</a>.</p>
<p>After banging my head against a wall again and again, I&#8217;ve finally found <a href="http://www.hulstkamp.com/2009/06/20/advanced-fxg-spark-icon-buttons-with-one-generic-skin-in-flex4-gumbo/439">another way I can live with</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2009/06/20/getting-vector-graphics-into-spark-skins/433/feed</wfw:commentRss>
		</item>
		<item>
		<title>Spark Icon Button with Gradient effects and Filter animation, colorized by styles. Flex 4 (Gumbo)</title>
		<link>http://www.hulstkamp.com/2009/06/18/spark-icon-button-with-gradient-effects-and-filter-animation-colorized-by-styles-flex-4-gumbo/403</link>
		<comments>http://www.hulstkamp.com/2009/06/18/spark-icon-button-with-gradient-effects-and-filter-animation-colorized-by-styles-flex-4-gumbo/403#comments</comments>
		<pubDate>Thu, 18 Jun 2009 11:59:28 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[Actionscript 3]]></category>

		<category><![CDATA[FXG]]></category>

		<category><![CDATA[Gumbo (Flex 4 beta)]]></category>

		<category><![CDATA[advanced selectors]]></category>

		<category><![CDATA[animate]]></category>

		<category><![CDATA[AnimateColor]]></category>

		<category><![CDATA[button]]></category>

		<category><![CDATA[css]]></category>

		<category><![CDATA[effects]]></category>

		<category><![CDATA[Gradient]]></category>

		<category><![CDATA[Icon]]></category>

		<category><![CDATA[Pseudo]]></category>

		<category><![CDATA[Selectors]]></category>

		<category><![CDATA[Spark]]></category>

		<category><![CDATA[styles]]></category>

		<category><![CDATA[Transitions]]></category>

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=403</guid>
		<description><![CDATA[update: Check this example for a more advanced and generic approach
Here&#8217;s an example of a Spark Icon Button done in Flex 4. There are smooth transitions on the background gradient between the up and over states. From the over state to the down state the shadows are removed smoothly. Each button has a different base [...]]]></description>
			<content:encoded><![CDATA[<p>update: Check <a href="http://www.hulstkamp.com/2009/06/20/advanced-fxg-spark-icon-buttons-with-one-generic-skin-in-flex4-gumbo/439">this example</a> for a more advanced and generic approach</p>
<p>Here&#8217;s an example of a Spark Icon Button done in Flex 4. There are smooth transitions on the background gradient between the up and over states. From the over state to the down state the shadows are removed smoothly. Each button has a different base color.</p>
<p><a href="http://www.hulstkamp.com/byard/gumbo/iconButton/AHSimpleIconButtonTest.html"><img title="Spark Icon Buttons with transitions" src="http://www.hulstkamp.com/byard/gumbo/iconButton/iconButtons.png" alt="Spark Icon Buttons with transitions" width="345" height="124" /></a></p>
<p>Click <a title="Spark Icon Button Demo" href="http://www.hulstkamp.com/byard/gumbo/iconButton/AHSimpleIconButtonTest.html">here</a> for a demo.</p>
<p>Apart from the new skinning architecture there are a couple of <span id="more-403"></span>aspects that make defining the look and feel of Spark Components easy:</p>
<ul>
<li>Transitions and effects that look up the values in the states</li>
<li>Pseudo-Selectors for component-states, as well as id- and descendant selectors</li>
<li>Enhanced states with group states.</li>
<li>Colorization and exclusion</li>
</ul>
<p></p>
<h4>Transitions &#038; effects</h4>
<p>In this example the skin defines some transitions. There are <em>AnimateColor </em>effects that work on the gradient entries. There&#8217;s no special configuration involved, since the default-property that <em>AnimateColor </em>works on is&#8230; <em>color </em>. On the GradientEntry object there is a property for color. Flex automatically looks up the color values from the referenced states on the gradient entries.</p>
<p>In the states declarations there is an additional <em>stateGroups </em>&#8216;<em>overStates</em>&#8216; defined, that is referenced by the gradient entries.  So there&#8217;s no need to explicitly define the colors for every state.</p>

<div class="wp_syntax"><div class="code"><pre class="mxml mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;s:states</span><span style="color: #7400FF;">&gt;</span></span>
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;up&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;over&quot;</span> stateGroups=<span style="color: #ff0000;">&quot;overStates&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;down&quot;</span> stateGroups=<span style="color: #ff0000;">&quot;overStates&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;disabled&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:states</span><span style="color: #7400FF;">&gt;</span></span>
.
.
.
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Transition</span>  fromState=<span style="color: #ff0000;">&quot;up&quot;</span> toState=<span style="color: #ff0000;">&quot;over&quot;</span> autoReverse=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #7400FF;">&gt;</span></span>
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:AnimateColor</span>  targets=<span style="color: #ff0000;">&quot;{[ge1, ge2, ge3, ge4]}&quot;</span>  duration=<span style="color: #ff0000;">&quot;250&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Transition</span><span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Transition</span>  fromState=<span style="color: #ff0000;">&quot;over&quot;</span> toState=<span style="color: #ff0000;">&quot;up&quot;</span> autoReverse=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #7400FF;">&gt;</span></span>
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:AnimateColor</span> targets=<span style="color: #ff0000;">&quot;{[ge1, ge2, ge3, ge4]}&quot;</span> duration=<span style="color: #ff0000;">&quot;750&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Transition</span><span style="color: #7400FF;">&gt;</span></span>
.
.
.
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:fill</span><span style="color: #7400FF;">&gt;</span></span>
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:LinearGradient</span> x=<span style="color: #ff0000;">&quot;32.019&quot;</span> y=<span style="color: #ff0000;">&quot;0.5&quot;</span> scaleX=<span style="color: #ff0000;">&quot;25.5708&quot;</span> rotation=<span style="color: #ff0000;">&quot;90&quot;</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:GradientEntry</span> id=<span style="color: #ff0000;">&quot;ge1&quot;</span> color=<span style="color: #ff0000;">&quot;#c0c0c0&quot;</span> color.overStates=<span style="color: #ff0000;">&quot;#ffffff&quot;</span> ratio=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:GradientEntry</span> id=<span style="color: #ff0000;">&quot;ge2&quot;</span> color=<span style="color: #ff0000;">&quot;#939393&quot;</span> color.overStates=<span style="color: #ff0000;">&quot;#e3e3e3&quot;</span> ratio=<span style="color: #ff0000;">&quot;0.5&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:GradientEntry</span> id=<span style="color: #ff0000;">&quot;ge3&quot;</span> color=<span style="color: #ff0000;">&quot;#7e7e7e&quot;</span> color.overStates=<span style="color: #ff0000;">&quot;#cecece&quot;</span> ratio=<span style="color: #ff0000;">&quot;0.5&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:GradientEntry</span> id=<span style="color: #ff0000;">&quot;ge4&quot;</span> color=<span style="color: #ff0000;">&quot;#6a6a6a&quot;</span> color.overStates=<span style="color: #ff0000;">&quot;#bbbbbb&quot;</span> ratio=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:LinearGradient</span><span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:fill</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>There are also <em>Animate </em>effects that work on the <em>strength </em>of the <em>DropShadowFilters</em>. The <em>SimpleMotionPath</em> entries tell the <em>Animate </em>effect to work on the strength property. Note that there are no values defined on the effects &amp; properties of the transitions. Flex automatically looks up  the start and target values from the referenced states.</p>

<div class="wp_syntax"><div class="code"><pre class="mxml mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Transition</span>  fromState=<span style="color: #ff0000;">&quot;over&quot;</span> toState=<span style="color: #ff0000;">&quot;down&quot;</span> autoReverse=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #7400FF;">&gt;</span></span>
   <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Animate</span> duration=<span style="color: #ff0000;">&quot;150&quot;</span> targets=<span style="color: #ff0000;">&quot;{[dsfBg, dsfSymbol]}&quot;</span> <span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SimpleMotionPath</span>  property=<span style="color: #ff0000;">&quot;strength&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Animate</span><span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Transition</span><span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Transition</span>  fromState=<span style="color: #ff0000;">&quot;down&quot;</span> toState=<span style="color: #ff0000;">&quot;*&quot;</span> autoReverse=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="color: #7400FF;">&gt;</span></span>
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Animate</span> duration=<span style="color: #ff0000;">&quot;150&quot;</span> targets=<span style="color: #ff0000;">&quot;{[dsfBg, dsfSymbol]}&quot;</span> <span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SimpleMotionPath</span> property=<span style="color: #ff0000;">&quot;strength&quot;</span>  <span style="color: #7400FF;">/&gt;</span></span>
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Animate</span><span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Transition</span><span style="color: #7400FF;">&gt;</span></span>
.
.
.
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:filters</span><span style="color: #7400FF;">&gt;</span></span>
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:DropShadowFilter</span> id=<span style="color: #ff0000;">&quot;dsfBg&quot;</span> alpha=<span style="color: #ff0000;">&quot;0.5&quot;</span> blurX=<span style="color: #ff0000;">&quot;0&quot;</span> blurY=<span style="color: #ff0000;">&quot;0&quot;</span> distance=<span style="color: #ff0000;">&quot;1&quot;</span> strength=<span style="color: #ff0000;">&quot;1&quot;</span> strength.down=<span style="color: #ff0000;">&quot;0&quot;</span>  <span style="color: #7400FF;">/&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:filters</span><span style="color: #7400FF;">&gt;</span></span>
.
.
.
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:filters</span><span style="color: #7400FF;">&gt;</span></span>
  <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:DropShadowFilter</span> id=<span style="color: #ff0000;">&quot;dsfSymbol&quot;</span> blurX=<span style="color: #ff0000;">&quot;0&quot;</span> blurY=<span style="color: #ff0000;">&quot;0&quot;</span> distance=<span style="color: #ff0000;">&quot;1&quot;</span>  strength=<span style="color: #ff0000;">&quot;1&quot;</span> strength.down=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:filters</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Now, the buttons have a subtle effect when the mouse is rolled over and pressed: The gradient colors get lighter and the Shadows disappear giving the impression that the button is pressed.</p>
<p></p>
<h4>Styles. Pseudo-, Type-, Id- &#038; Class-Selectors</h4>
<p>We defined the gradients in grayscale. What when we want colored buttons? No need to change the gradients. Flex automatically colors the components based on the <em>baseColor </em>style. We can set the baseColor for each state using pseudo selectors.  Here&#8217;s an example of how to style the button that shows all of the selector types (id-, type- and class-selectors):</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;"><span style="color: #a1a100;">@namespace mx &quot;library://ns.adobe.com/flex/halo&quot;;</span>
<span style="color: #a1a100;">@namespace s &quot;library://ns.adobe.com/flex/spark&quot;;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/*   
 *	Using ID selectors with compund selectors (type and class selectors) 
 *	to define the appearance of the buttons 
 */</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Define normal state styles on spark button type inside a desc container */</span>
<span style="color: #cc00cc;">#desc</span> s|Button <span style="color: #00AA00;">&#123;</span>
	skinClass<span style="color: #00AA00;">:</span> ClassReference<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">'AHSimpleIconButtonSkin'</span><span style="color: #00AA00;">&#41;</span>;
	baseColor<span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;0x505050&quot;</span> ; <span style="color: #808080; font-style: italic;">/* Do not use black black; /*&quot;0x56d9e5&quot;;*/</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#FFFFFF</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Define over states styles on spark button type inside a desc container */</span>
<span style="color: #cc00cc;">#desc</span> s|Button<span style="color: #3333ff;">:over </span><span style="color: #00AA00;">&#123;</span>
	baseColor<span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;0x97CD20&quot;</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* Define down states styles on spark button type inside a desc container */</span>
<span style="color: #cc00cc;">#desc</span> s|Button<span style="color: #3333ff;">:down </span><span style="color: #00AA00;">&#123;</span>
	baseColor<span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;0xa0d828&quot;</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* compound. override the over state of the button in element desc for class styleClass blueButton */</span>
<span style="color: #cc00cc;">#desc</span> <span style="color: #6666ff;">.blueButton</span><span style="color: #3333ff;">:over </span><span style="color: #00AA00;">&#123;</span>
	baseColor<span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;0x56d9e5&quot;</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* compound. override the down state of the button in element desc for class styleClass blueButton */</span>
<span style="color: #cc00cc;">#desc</span> <span style="color: #6666ff;">.blueButton</span><span style="color: #3333ff;">:down </span><span style="color: #00AA00;">&#123;</span>
	baseColor<span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;0x56d9e5&quot;</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* compound. override the over state of the button in element desc for class styleClass redButton */</span>
<span style="color: #cc00cc;">#desc</span> <span style="color: #6666ff;">.redButton</span><span style="color: #3333ff;">:over </span><span style="color: #00AA00;">&#123;</span>
	baseColor<span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;0xd52A03&quot;</span>;
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* compound. override the down state of the button in element desc for class styleClass redButton */</span>
<span style="color: #cc00cc;">#desc</span> <span style="color: #6666ff;">.redButton</span><span style="color: #3333ff;">:down </span><span style="color: #00AA00;">&#123;</span>
	baseColor<span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;0xE53A13&quot;</span>;
<span style="color: #00AA00;">&#125;</span>
.
.
.
&lt;s<span style="color: #3333ff;">:HGroup </span>id<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;desc&quot;</span> horizontalCenter<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> verticalAlign<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;middle&quot;</span> gap<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;5&quot;</span><span style="color: #00AA00;">&gt;</span>
	&lt;s<span style="color: #3333ff;">:Button  </span>label<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;Green&quot;</span> 	useHandCursor<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;true&quot;</span> buttonMode<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;true&quot;</span> /<span style="color: #00AA00;">&gt;</span>
	&lt;s<span style="color: #3333ff;">:Button  </span>label<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;Blue&quot;</span> 	useHandCursor<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;true&quot;</span> buttonMode<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;true&quot;</span> styleName<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;blueButton&quot;</span>/<span style="color: #00AA00;">&gt;</span>
	&lt;s<span style="color: #3333ff;">:Button  </span>label<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;Red&quot;</span> 		useHandCursor<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;true&quot;</span> buttonMode<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;true&quot;</span> styleName<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;redButton&quot;</span>/<span style="color: #00AA00;">&gt;</span>
&lt;/s<span style="color: #3333ff;">:HGroup</span><span style="color: #00AA00;">&gt;</span></pre></div></div>

<p></p>
<h4>Colorization &#038; Exclusion</h4>
<p>By setting the baseColors for different states, Flex will colorize the component accordingly.  A dark grey in the up-state, a color in the over state and a lighter color in the down state.</p>
<p>The bad thing is that everything gets colorized. The good thing is that you can overwrite a function on SparkSkin to exclude elements from being colorized. We only want the background gradient to get colorized, so lets exclude the other elements from colorization:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3 actionscript3" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>fx<span style="color: #000000; font-weight: bold;">:</span>Script<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;!</span><span style="color: #000000;">&#91;</span>CDATA<span style="color: #000000;">&#91;</span>         
	<span style="color: #3f5fbf;">/* Define the skin elements that should not be colorized. 
	exclude symbol and text group */</span>
	static <span style="color: #0033ff; font-weight: bold;">private</span> const exclusions<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Array</span> = <span style="color: #000000;">&#91;</span><span style="color: #990000;">&quot;symbol&quot;</span>, <span style="color: #990000;">&quot;textGroup&quot;</span><span style="color: #000000;">&#93;</span>;
&nbsp;
	<span style="color: #3f5fbf;">/** 
	 * @copy spark.skins.SparkSkin#colorizeExclusions
	 */</span>		
	override <span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">get</span> colorizeExclusions<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Array</span> <span style="color: #000000;">&#123;</span><span style="color: #0033ff; font-weight: bold;">return</span> exclusions;<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><span style="color: #000000; font-weight: bold;">&gt;</span>        
<span style="color: #000000; font-weight: bold;">&lt;/</span>fx<span style="color: #000000; font-weight: bold;">:</span>Script<span style="color: #000000; font-weight: bold;">&gt;</span>
.
.
.
<span style="color: #000000; font-weight: bold;">&lt;!--</span> The group <span style="color: #0033ff; font-weight: bold;">with</span> the symbol <span style="color: #0033ff; font-weight: bold;">with</span> a shadow applied to. In a group <span style="color: #0033ff; font-weight: bold;">for</span> colorization exclusion <span style="color: #000000; font-weight: bold;">--&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>Group id=<span style="color: #990000;">&quot;symbol&quot;</span> verticalCenter=<span style="color: #990000;">&quot;0&quot;</span> <span style="color: #004993;">left</span>=<span style="color: #990000;">&quot;7&quot;</span> <span style="color: #004993;">top</span>=<span style="color: #990000;">&quot;9&quot;</span> <span style="color: #004993;">right</span>=<span style="color: #990000;">&quot;7&quot;</span> <span style="color: #004993;">bottom</span>=<span style="color: #990000;">&quot;7&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>filters<span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">DropShadowFilter</span> id=<span style="color: #990000;">&quot;dsfSymbol&quot;</span> <span style="color: #004993;">blurX</span>=<span style="color: #990000;">&quot;0&quot;</span> <span style="color: #004993;">blurY</span>=<span style="color: #990000;">&quot;0&quot;</span> <span style="color: #004993;">distance</span>=<span style="color: #990000;">&quot;1&quot;</span>  <span style="color: #004993;">strength</span>=<span style="color: #990000;">&quot;1&quot;</span> <span style="color: #004993;">strength</span>.down=<span style="color: #990000;">&quot;0&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;/</span>s<span style="color: #000000; font-weight: bold;">:</span>filters<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>Path winding=<span style="color: #990000;">&quot;nonZero&quot;</span> <span style="color: #004993;">data</span>=<span style="color: #990000;">&quot;M12.6924 0L5.76855 6.92383 2.30762 3.46191 0 5.76855 3.46191 9.23145 5.76855 11.5391 8.07617 9.23145 15 2.30762 12.6924 0Z&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>fill<span style="color: #000000; font-weight: bold;">&gt;</span>
			<span style="color: #000000; font-weight: bold;">&lt;</span>s<span style="color: #000000; font-weight: bold;">:</span>SolidColor <span style="color: #004993;">color</span>=<span style="color: #990000;">&quot;#ffffff&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span>
		<span style="color: #000000; font-weight: bold;">&lt;/</span>s<span style="color: #000000; font-weight: bold;">:</span>fill<span style="color: #000000; font-weight: bold;">&gt;</span>
	<span style="color: #000000; font-weight: bold;">&lt;/</span>s<span style="color: #000000; font-weight: bold;">:</span>Path<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>s<span style="color: #000000; font-weight: bold;">:</span>Group<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>There is a group with an id &#8217;symbol&#8217; that is referenced in the exclusion array. Do the same for the label element.</p>
<p><del datetime="2010-05-08T16:36:30+00:00">Here&#8217;s a <a title="Spark Icon Button Demo" href="http://www.hulstkamp.com/byard/gumbo/iconButton/AHSimpleIconButtonTest.html">test</a> and here&#8217;s the <a href="http://www.hulstkamp.com/byard/gumbo/iconButton/srcview/index.html">source</a> (sdk 4.0.0.7282)</del></p>
<p>Source <a href="http://www.hulstkamp.com/2010/05/08/updated-components-to-flex-4-sdk-final/506">updated </a>to Flex 4 release sdk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2009/06/18/spark-icon-button-with-gradient-effects-and-filter-animation-colorized-by-styles-flex-4-gumbo/403/feed</wfw:commentRss>
		</item>
		<item>
		<title>Working with huge amount of data in Flex 4 (Gumbo)</title>
		<link>http://www.hulstkamp.com/2009/06/15/working-with-huge-amount-of-data-in-flex-4-gumbo/382</link>
		<comments>http://www.hulstkamp.com/2009/06/15/working-with-huge-amount-of-data-in-flex-4-gumbo/382#comments</comments>
		<pubDate>Mon, 15 Jun 2009 08:02:30 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[Gumbo (Flex 4 beta)]]></category>

		<category><![CDATA[Misc]]></category>

		<category><![CDATA[data]]></category>

		<category><![CDATA[DataGroup]]></category>

		<category><![CDATA[performance]]></category>

		<category><![CDATA[records]]></category>

		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=382</guid>
		<description><![CDATA[When working with huge amounts of data on DataGroup, SkinnableDataContainer and all its Subclasses you will notice degradation in performance. Manipulating Data becomes slower, the UI on the Groups become less responsive, startup suffers, footprint is huge.  By default, Felx 4 creates an ItemRenderer for each data-item resulting in this overhead.
The solution is to use [...]]]></description>
			<content:encoded><![CDATA[<p>When working with huge amounts of data on DataGroup, SkinnableDataContainer and all its Subclasses you will notice degradation in performance. Manipulating Data becomes slower, the UI on the Groups become less responsive, startup suffers, footprint is huge.  By default, Felx 4 creates an ItemRenderer for each data-item resulting in this overhead.<span id="more-382"></span></p>
<p>The solution is to use virtualization on the layout of the dataGroup. By setting useVirtualLayout=true, ItemRenderers are recycled, the performance will be fine even for 100&#8242;000 and more records (depending on complexity).</p>
<p>There are a couple of things to considerate:</p>
<ul>
<li>Since ItemRenderers are recycled you must take care of updating the components in your renderer to the correct state, so that they reflect the underlying data (i.e If the data states, that a player is a midfielder and you have a checkbox for this in your renderer, then make sure to set the state of this checkbox based on the underlying data, that is passed down). Also, the data object being pushed down from the Host-Component to the ItemRenderer could be null, so we have to check for this as well, preventing NPEs.</li>
<li>Measurement will be approximate, either based on the first element, or a typical element you can reference or by setting rowHeight when using variableRowHeight=false.</li>
<li>One drawback of virtualization is that when using the itemRendererFunction property, the renderers arent recycled. The function is expected to create an Instance (wrapped in a ClassFactory) of an appropriate renderer for the data-item being passed. I haven&#8217;t looked into this, but there could be a way of creating your own ItemRenderer pool and returning an suitable renderer from that pool.</li>
<li>Checking the Profile, you&#8217;ll see that with virtualization the Renderers get reused, when virtualization is off, you&#8217;ll get as many Renderers as you have records.</li>
<li>Another disadvantage is that virtualized layouts do not respect layout element&#8217;s includeInLayout property.</li>
<li>In the Design Specification it is stated that “<em>Virtual layouts with small numbers of items whose sizes vary dramatically will respond poorly to interactive thumb scrolling. Responsiveness will improve as the variation in size decreases and/or the length of the list increases”</em>. In the test I did, I could not find any problems with poor responsiveness in scrolling, yet.</li>
</ul>
<p>My findings are, that in practice the performance is very good on huge data sets when virtualization is used.  The drawbacks can be handled or are neglectable in many situation where thousands of rows must be used.</p>
<p>Here&#8217;s a <a href="http://www.hulstkamp.com/byard/gumbo/DataListTest/DataGroupTest.html">simple test</a> to check out virtualization and measurement when using increasing amounts of data.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2009/06/15/working-with-huge-amount-of-data-in-flex-4-gumbo/382/feed</wfw:commentRss>
		</item>
		<item>
		<title>Random notes on DataGroup and Spark Containers in Flex 4 (Gumbo)</title>
		<link>http://www.hulstkamp.com/2009/06/14/random-notes-on-datagroup-in-flex-4-gumbo/371</link>
		<comments>http://www.hulstkamp.com/2009/06/14/random-notes-on-datagroup-in-flex-4-gumbo/371#comments</comments>
		<pubDate>Sun, 14 Jun 2009 17:17:59 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[Gumbo (Flex 4 beta)]]></category>

		<category><![CDATA[Misc]]></category>

		<category><![CDATA[DataGroup]]></category>

		<category><![CDATA[ItemRenderer]]></category>

		<category><![CDATA[Lyout]]></category>

		<category><![CDATA[SKinnableDataContainer]]></category>

		<category><![CDATA[Spark containers]]></category>

		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=371</guid>
		<description><![CDATA[Here are some notes I took while investigating and reading about Spark Containers.
VerticalLayout.variableRowHeight and HorizontalLayout.variableColumnWidth properties are set to true by default. This might affect performance in a bad way, since Flex has to determine the size of each child. Setting theses properties to false in conjunction with rowHeight / columnWidth or a typical element [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some notes I took while investigating and reading about Spark Containers.<span id="more-371"></span></p>
<p><samp>VerticalLayout.variableRowHeight</samp> and <samp>HorizontalLayout</samp><samp>.</samp><samp>variableColumnWidth</samp> properties are set to true by default. This might affect performance in a bad way, since Flex has to determine the size of each child. Setting theses properties to false in conjunction with <samp>rowHeight</samp> / <samp>columnWidth</samp> or a typical element or the dimension of the first element can affect performance in a positive way.</p>
<hr />Setting the <samp>typicalLayoutElement</samp> can affect performance in a positive way, since the dimension of this Element is used for all children, so measuring each child is not necessary.</p>
<hr /><samp>SkinnableContainer</samp> and <samp>SkinnableDataContainer</samp> can be used when skinning of a group is desired. The required skin-part is <samp>contentGroup</samp>.</p>
<hr />Out of the box, Flex 4 comes with two ItemRenderers:</p>
<p><samp> DefaultItemRenderer</samp> that converts its data item to a single String for display in a Spark <samp>SimpleText</samp>control and the <samp>DefaultComplexItemRenderer</samp> that displays a component in a Group container. Each component is wrapped in its own Group container.</p>
<hr />To create a custom ItemRenderer extend from</p>
<p><samp>spark.components.supportClasses.</samp><samp>ItemRenderer</samp></p>
<hr />Passing data to an ItemRenderer goes via properties of the ItemRenderer:</p>
<ul>
<li><samp>labelText</samp> String 	representation of the data-item.</li>
<li><samp>data</samp> The 	original data</li>
<li><samp>owner</samp> The 	Host-Component of the ItemRenderer. Can be used to fetch data.</li>
</ul>
<p>A host-component that implements the IItemRendererOwner interface has methods where data is pushed down to the ItemRenderer</p>
<ul>
<li><samp>itemToLabel</samp><samp>()</samp> converts 	the data item to a String representation.</li>
<li><samp>updateRenderer</samp><samp>()</samp></li>
</ul>
<p>One can overwrite these methods to manipulate data and the representation of the data.</p>
<hr />To 	determine which ItemRenderer to use either set it on the 	itemRenderer property of the DataGroup or set the 	<samp>itemRendererFunction</samp> property to a function that returns an instance 	of a <samp>ClassFactory</samp> with the desired custom ItemRenderer.</p>
<hr />A DataGroup visualizes a collection of data-items via ItemRenderers. 	Therefore, to add or remove children in a DataGroup manipulate the 	data using methods like <samp>addItem</samp>() 	and <samp><samp>removeItemAt()</samp> on the dataProvider.</samp></p>
<hr />Virtualization 	can be used to improve performance when working with huge amounts of 	records.<samp> UseVirtualLayout</samp> set to true to enable virtualization.</p>
<hr />When Virtualization is enabled, Flex will recycle ItemRenderes resulting in less overhead. Be sure to reset your ItemRenderes (explicitly setting the state of the components based on the passed data) and checking for null of the data property so that you don&#8217;t get an NPE at run time.</p>
<hr />A typical item can be set on the DataGroup, so that Flex uses this to determine the size  of the childs, resulting in better performance.</p>
<hr />Virtualization cannot be used when using the ItemRendererFunction. Well, the function can be set, but no virtualization will be used.</p>
<p><strong>Update</strong>: To be more precise (thanks to Steven Shongrunden@Adobe)</p>
<p><em>virtualization will be used even when an item renderer function is defined, but in that case item renderer recycling will not happen. Instead renderers will be created and destroyed roughly as they come in and out of view. (Compare this to the non-virtual case where every renderer is instantiated at startup). ItemRenderer recycling can be more performant than creation and destruction (depending on the renderers) so if you want to get the best performance it’s typically better to define an itemRenderer rather than an itemRendererFunction</em></p>
<hr />The Viewport on a spark container is set by its <samp>width</samp> and <samp>heigt</samp> properties. <samp>verticalScrollPosition</samp> and <samp>horizontalScrollPosition</samp> specify the origin of the viewport relative to the containers content. <samp>clipAndEnableScrolling </samp>is used for clipping and scrolling. For scrolling the container can be surrounded by a scroller component (or you could use a slider and set the <samp>verticalScrollPosition</samp> and <samp>horizontalScrollPosition</samp>at runtime).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2009/06/14/random-notes-on-datagroup-in-flex-4-gumbo/371/feed</wfw:commentRss>
		</item>
		<item>
		<title>Custom Spark CheckBox Component in Flex 4 (Gumbo)</title>
		<link>http://www.hulstkamp.com/2009/06/13/custom-spark-checkbox-component-in-flex-4-gumbo/361</link>
		<comments>http://www.hulstkamp.com/2009/06/13/custom-spark-checkbox-component-in-flex-4-gumbo/361#comments</comments>
		<pubDate>Sat, 13 Jun 2009 19:35:05 +0000</pubDate>
		<dc:creator>Andy Hulstkamp</dc:creator>
		
		<category><![CDATA[Actionscript 3]]></category>

		<category><![CDATA[Astro (Flash 10 beta)]]></category>

		<category><![CDATA[FXG]]></category>

		<category><![CDATA[Gumbo (Flex 4 beta)]]></category>

		<category><![CDATA[CheckBox]]></category>

		<category><![CDATA[custom component]]></category>

		<category><![CDATA[effects]]></category>

		<category><![CDATA[graphic]]></category>

		<category><![CDATA[skinning]]></category>

		<category><![CDATA[Spark]]></category>

		<category><![CDATA[states]]></category>

		<category><![CDATA[styles]]></category>

		<category><![CDATA[Transitions]]></category>

		<guid isPermaLink="false">http://www.hulstkamp.com/?p=361</guid>
		<description><![CDATA[Here&#8217;s an example of how to enhance the default Spark CheckBox. This example uses a mark for the unchecked states and one for the checked states. Some simple transitions are used to make things a little bit nicer.

The skin uses two additional properties (symbolColorChecked,  symbolColorUnchecked) for the color of the marks:

   s&#124;CheckBox &#123;
 [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an example of how to enhance the default Spark CheckBox. This example uses a mark for the unchecked states and one for the checked states. Some simple transitions are used to make things a little bit nicer.</p>
<p><a href="http://www.hulstkamp.com/byard/gumbo/AHCheckBox/AHCheckboxTest.html"><img src="http://www.hulstkamp.com/byard/gumbo/AHCheckBox/CustomCheckBox.png" alt="Custom CheckBox Preview" /></a></p>
<p>The skin uses two additional properties (symbolColorChecked,  symbolColorUnchecked) for the <span id="more-361"></span>color of the marks:</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">   s|CheckBox <span style="color: #00AA00;">&#123;</span>
       skinClass<span style="color: #00AA00;">:</span> ClassReference<span style="color: #00AA00;">&#40;</span><span style="color: #ff0000;">&quot;AHCheckboxSkin&quot;</span><span style="color: #00AA00;">&#41;</span>;
       symbolColorChecked<span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;0x70d000&quot;</span>;
       symbolColorUnchecked<span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;0xe83800&quot;</span>;
       fontSize<span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;11&quot;</span>;
       <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;0x606060&quot;</span>;
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The skin goes like this:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml mxml" style="font-family:monospace;">.
.
.
&nbsp;
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;">&lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span></span>
<span style="color: #000000;">		import mx.utils.ColorUtil;</span>
<span style="color: #000000;">		import mx.events.FlexEvent;</span>
&nbsp;
<span style="color: #000000;">		<span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span>	</span>
<span style="color: #000000;">		private var highlightColor:uint; </span>
&nbsp;
<span style="color: #000000;">		protected function sparkskin1_creationCompleteHandler<span style="color: #66cc66;">&#40;</span>event:FlexEvent<span style="color: #66cc66;">&#41;</span>:void</span>
<span style="color: #000000;">		<span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">			hostComponent.buttonMode = true;</span>
<span style="color: #000000;">			hostComponent.useHandCursor = true;</span>
<span style="color: #000000;">			var col:uint = uint <span style="color: #66cc66;">&#40;</span>hostComponent.getStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'color'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">			highlightColor = ColorUtil.adjustBrightness<span style="color: #66cc66;">&#40;</span>col, <span style="color: #cc66cc;">80</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">		<span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">	<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
&nbsp;
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Linear</span> id=<span style="color: #ff0000;">&quot;easer&quot;</span> easeInFraction=<span style="color: #ff0000;">&quot;0&quot;</span>  easeOutFraction=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Declarations</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:states</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;up&quot;</span>  stateGroups=<span style="color: #ff0000;">&quot;unchecked&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;over&quot;</span> stateGroups=<span style="color: #ff0000;">&quot;overStates, unchecked&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;down&quot;</span> stateGroups=<span style="color: #ff0000;">&quot;downStates, unchecked&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;disabled&quot;</span> stateGroups=<span style="color: #ff0000;">&quot;disabledStates, unchecked&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;upAndSelected&quot;</span> stateGroups=<span style="color: #ff0000;">&quot;selectedStates, checked&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;overAndSelected&quot;</span> stateGroups=<span style="color: #ff0000;">&quot;overStates, selectedStates, checked&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;downAndSelected&quot;</span> stateGroups=<span style="color: #ff0000;">&quot;downStates, selectedStates, checked&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:State</span> name=<span style="color: #ff0000;">&quot;disabledAndSelected&quot;</span> stateGroups=<span style="color: #ff0000;">&quot;disabledStates, selectedStates, checked&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:states</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- Transitions for the mark --&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:transitions</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Transition</span>  fromState=<span style="color: #ff0000;">&quot;over&quot;</span> toState=<span style="color: #ff0000;">&quot;overAndSelected&quot;</span> <span style="color: #7400FF;">&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Parallel</span> target=<span style="color: #ff0000;">&quot;{checkedMark}&quot;</span> <span style="color: #7400FF;">&gt;</span></span>
				<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Scale</span> duration=<span style="color: #ff0000;">&quot;250&quot;</span>  easer=<span style="color: #ff0000;">&quot;{easer}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Parallel</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Transition</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Transition</span> fromState=<span style="color: #ff0000;">&quot;overAndSelected&quot;</span> toState=<span style="color: #ff0000;">&quot;over&quot;</span> <span style="color: #7400FF;">&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Parallel</span> target=<span style="color: #ff0000;">&quot;{uncheckedMark}&quot;</span><span style="color: #7400FF;">&gt;</span></span>
				<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Scale</span> duration=<span style="color: #ff0000;">&quot;250&quot;</span> easer=<span style="color: #ff0000;">&quot;{easer}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Parallel</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Transition</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:transitions</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- Label --&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SimpleText</span> id=<span style="color: #ff0000;">&quot;labelElement&quot;</span></span>
<span style="color: #000000;">				  textAlign=<span style="color: #ff0000;">&quot;start&quot;</span></span>
<span style="color: #000000;">				  color.over=<span style="color: #ff0000;">&quot;{highlightColor}&quot;</span></span>
<span style="color: #000000;">				  color.down=<span style="color: #ff0000;">&quot;{highlightColor}&quot;</span></span>
<span style="color: #000000;">				  color.overAndSelected=<span style="color: #ff0000;">&quot;{highlightColor}&quot;</span></span>
<span style="color: #000000;">				  color.downAndSelected=<span style="color: #ff0000;">&quot;{highlightColor}&quot;</span></span>
<span style="color: #000000;">				  verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span></span>
<span style="color: #000000;">				  lineBreak=<span style="color: #ff0000;">&quot;explicit&quot;</span></span>
<span style="color: #000000;">				  left=<span style="color: #ff0000;">&quot;16&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;3&quot;</span> bottom=<span style="color: #ff0000;">&quot;3&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
	<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- Group with the marks --&gt;</span></span> 
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Group</span> id=<span style="color: #ff0000;">&quot;marks&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> width=<span style="color: #ff0000;">&quot;11&quot;</span> height=<span style="color: #ff0000;">&quot;11&quot;</span> left=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #7400FF;">&gt;</span></span>
&nbsp;
		<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- GraphicElement for the checked-mark --&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Path</span> horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> width=<span style="color: #ff0000;">&quot;11&quot;</span> height=<span style="color: #ff0000;">&quot;11&quot;</span> winding=<span style="color: #ff0000;">&quot;nonZero&quot;</span> data=<span style="color: #ff0000;">&quot;M 100 0 C 75.148 24.853 46.191 87.574 46.191 87.574 C 46.191 87.574 14.204 40.716 0 40.716 L 25.11 41.012 L 43.787 62.213 L 79.29 0 L 100 0 Z&quot;</span> </span>
<span style="color: #000000;">				id=<span style="color: #ff0000;">&quot;checkedMark&quot;</span> scaleX.unchecked=<span style="color: #ff0000;">&quot;0&quot;</span> scaleX=<span style="color: #ff0000;">&quot;1&quot;</span> scaleY.unchecked=<span style="color: #ff0000;">&quot;0&quot;</span> scaleY=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #7400FF;">&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:fill</span><span style="color: #7400FF;">&gt;</span></span>
				<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SolidColor</span> color=<span style="color: #ff0000;">&quot;{hostComponent.getStyle('symbolColorChecked')}&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:fill</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Path</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
		<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- GraphicElement for the unchecked-mark --&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Path</span> horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> width=<span style="color: #ff0000;">&quot;9&quot;</span> height=<span style="color: #ff0000;">&quot;9&quot;</span> winding=<span style="color: #ff0000;">&quot;nonZero&quot;</span> data=<span style="color: #ff0000;">&quot;M 100 90.29 L 60.694 42.28 C 72.2 26.205 84.896 9.838 95.214 0 L 74.28 0.1 L 51.336 30.851 L 26.922 1.031 L 0 1.031 C 13.126 7.917 29.115 24.561 43.297 41.625 L 7.425 89.702 L 28.995 89.617 C 28.995 89.617 39.309 73.04 52.832 53.468 C 68.081 72.987 79.403 90.131 79.403 90.131 L 100 90.29 Z&quot;</span> </span>
<span style="color: #000000;">				id=<span style="color: #ff0000;">&quot;uncheckedMark&quot;</span> scaleX.checked=<span style="color: #ff0000;">&quot;0&quot;</span> scaleX=<span style="color: #ff0000;">&quot;1&quot;</span> scaleY.checked=<span style="color: #ff0000;">&quot;0&quot;</span> scaleY=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #7400FF;">&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:fill</span><span style="color: #7400FF;">&gt;</span></span>
				<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SolidColor</span> id=<span style="color: #ff0000;">&quot;checkMarkFill&quot;</span> color=<span style="color: #ff0000;">&quot;{hostComponent.getStyle('symbolColorUnchecked')}&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:fill</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Path</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
		<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- Fake HitArea. TODO: Sort out how to use hitArea property, which does not seem to work correctly yet, but haven't investigated --&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Group</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span> alpha=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #7400FF;">&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Rect</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;100%&quot;</span>  <span style="color: #7400FF;">&gt;</span></span>
				<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:fill</span><span style="color: #7400FF;">&gt;</span></span>
					<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SolidColor</span> color=<span style="color: #ff0000;">&quot;0xff0000&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
				<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:fill</span><span style="color: #7400FF;">&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Rect</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Group</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:filters</span><span style="color: #7400FF;">&gt;</span></span>
			<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:DropShadowFilter</span> distance=<span style="color: #ff0000;">&quot;1&quot;</span> strength=<span style="color: #ff0000;">&quot;0.75&quot;</span> blurX=<span style="color: #ff0000;">&quot;1&quot;</span> blurY=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
		<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:filters</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Group</span><span style="color: #7400FF;">&gt;</span></span>
.
.
.</pre></div></div>

<p>FXG GraphicElements are used to draw the marks. The color of the marks are fetched from the hostComponents styles. The customs styles are set in the style definition of the CheckBox. When creation is complete some flags are set, so that the hand-cursor is shown when rolling over the label-field. An highlight-color for the label is calculated from the color-style-property and used in the over- and down-states. Transitions are use to have a scale-effect when the CheckBox is un(selected).</p>
<p><del datetime="2010-05-08T16:33:07+00:00"><a href="http://www.hulstkamp.com/byard/gumbo/AHCheckBox/AHCheckboxTest.html">Test</a> &#038; <a href="http://www.hulstkamp.com/byard/gumbo/AHCheckBox/srcview/index.html">source (sdk 4.0.0.7282) </a>.</del></p>
<p>Source <a href="http://www.hulstkamp.com/2010/05/08/updated-components-to-flex-4-sdk-final/506">updated </a>to Flex 4 release sdk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hulstkamp.com/2009/06/13/custom-spark-checkbox-component-in-flex-4-gumbo/361/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
