<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Flex Examples &#187; BitmapImage (Spark)</title>
	<atom:link href="http://blog.flexexamples.com/category/spark/bitmapimage-spark/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Wed, 26 Jan 2011 18:09:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Displaying an FXG file in a Spark BitmapImage control in Flex 4</title>
		<link>http://blog.flexexamples.com/2010/10/10/displaying-an-fxg-file-in-a-spark-bitmapimage-control-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2010/10/10/displaying-an-fxg-file-in-a-spark-bitmapimage-control-in-flex-4/#comments</comments>
		<pubDate>Sun, 10 Oct 2010 19:26:28 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[BitmapImage (Spark)]]></category>
		<category><![CDATA[Flex4]]></category>
		<category><![CDATA[FXG]]></category>
		<category><![CDATA[source]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=3357</guid>
		<description><![CDATA[<p>The following example shows how you can display an FXG file in a Spark BitmapImage control in Flex 4 by setting the source property using data binding or MXML.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2010/10/10/displaying-an-fxg-file-in-a-spark-bitmapimage-control-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_BitmapImage_source_FXG_test&#34; xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34; xmlns:mx=&#34;library://ns.adobe.com/flex/mx&#34;&#62; &#60;s:layout&#62; &#60;s:VerticalLayout horizontalAlign=&#34;center&#34; verticalAlign=&#34;middle&#34; /&#62; &#60;/s:layout&#62; &#160; &#60;fx:Script&#62; &#60;!&#91;CDATA&#91; import assets.*; &#93;&#93;&#62; &#60;/fx:Script&#62; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can display an FXG file in a Spark BitmapImage control in Flex 4 by setting the <code>source</code> property using data binding or MXML.</p>
<p><span id="more-3357"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/10/10/displaying-an-fxg-file-in-a-spark-bitmapimage-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_BitmapImage_source_FXG_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:layout</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:VerticalLayout</span> horizontalAlign=<span style="color: #ff0000;">&quot;center&quot;</span> verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:layout</span><span style="color: #7400FF;">&gt;</span></span>
&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 assets.*;</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;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;bmpImg&quot;</span> source=<span style="color: #ff0000;">&quot;{Chevron}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>And the FXG file, <em>assets/Chevron.fxg</em>, is as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/10/10/displaying-an-fxg-file-in-a-spark-bitmapimage-control-in-flex-4/ --&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Graphic</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://ns.adobe.com/fxg/2008&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">xmlns:d</span>=<span style="color: #ff0000;">&quot;http://ns.adobe.com/fxg/2008/dt&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">xmlns:fc</span>=<span style="color: #ff0000;">&quot;http://ns.adobe.com/flashcatalyst/2009&quot;</span></span>
<span style="color: #009900;">        <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;2.0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Path</span> <span style="color: #000066;">y</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">data</span>=<span style="color: #ff0000;">&quot;M 2 0 L 7 7 L 2 14 L 0 14 L 5 7 L 0 0 L 2 0 Z&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fill<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;SolidColor</span> <span style="color: #000066;">color</span>=<span style="color: #ff0000;">&quot;#000000&quot;</span> <span style="color: #000066;">alpha</span>=<span style="color: #ff0000;">&quot;0.6&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fill<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Path<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Path</span> <span style="color: #000066;">data</span>=<span style="color: #ff0000;">&quot;M 2 0 L 7 7 L 2 14 L 0 14 L 5 7 L 0 0 L 2 0 Z&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;fill<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;SolidColor</span> <span style="color: #000066;">color</span>=<span style="color: #ff0000;">&quot;#FF0000&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/fill<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Path<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Graphic<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p class="information"><a href="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_BitmapImage_source_FXG_test/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_BitmapImage_source_FXG_test/main.html" width="100%" height="100"></iframe></p>
<p>Or you can set the BitmapImage control&#8217;s <code>source</code> property using MXML, as seen in the following example:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/10/10/displaying-an-fxg-file-in-a-spark-bitmapimage-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_BitmapImage_source_FXG_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span></span>
<span style="color: #000000;">        xmlns:assets=<span style="color: #ff0000;">&quot;assets.*&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:layout</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:VerticalLayout</span> horizontalAlign=<span style="color: #ff0000;">&quot;center&quot;</span> verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:layout</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;bmpImg&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:source</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;assets:Chevron</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:source</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:BitmapImage</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Displaying an FXG file in a Spark BitmapImage control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/10/10/displaying-an-fxg-file-in-a-spark-bitmapimage-control-in-flex-4/',contentID: 'post-3357',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'source',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/10/10/displaying-an-fxg-file-in-a-spark-bitmapimage-control-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a bitmap image skin in a Spark Button control in Flex 4</title>
		<link>http://blog.flexexamples.com/2010/03/24/using-a-bitmap-image-skin-in-a-spark-button-control-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2010/03/24/using-a-bitmap-image-skin-in-a-spark-button-control-in-flex-4/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 00:41:41 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[BitmapImage (Spark)]]></category>
		<category><![CDATA[Button (Spark)]]></category>
		<category><![CDATA[Flex4]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[skinClass]]></category>
		<category><![CDATA[source]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2636</guid>
		<description><![CDATA[<p>The following example shows how you can use a series state-aware of bitmap images in a Spark Button control in Flex 4 by creating a custom skin and setting the BitmapImage source property to different images in the various button states.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2010/03/24/using-a-bitmap-image-skin-in-a-spark-button-control-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_Button_skinClass_BitmapImage_test&#34; xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34; xmlns:mx=&#34;library://ns.adobe.com/flex/mx&#34;&#62; &#160; &#60;fx:Style&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can use a series state-aware of bitmap images in a Spark Button control in Flex 4 by creating a custom skin and setting the BitmapImage <code>source</code> property to different images in the various button states.</p>
<p><span id="more-2636"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/03/24/using-a-bitmap-image-skin-in-a-spark-button-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_Button_skinClass_BitmapImage_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Style</span><span style="color: #7400FF;">&gt;</span></span>
        @namespace s &quot;library://ns.adobe.com/flex/spark&quot;;
        @namespace mx &quot;library://ns.adobe.com/flex/mx&quot;;
&nbsp;
        s|Button#closeBtn {
            skinClass: ClassReference(&quot;skins.ImageButtonSkin&quot;);
        }
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Style</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> id=<span style="color: #ff0000;">&quot;closeBtn&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>And the custom Spark Button skin class, <em>skins/ImageButtonSkin.mxml</em>, is as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/03/24/using-a-bitmap-image-skin-in-a-spark-button-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SparkSkin</span> name=<span style="color: #ff0000;">&quot;ImageButtonSkin&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:fb=<span style="color: #ff0000;">&quot;http://ns.adobe.com/flashbuilder/2009&quot;</span></span>
<span style="color: #000000;">        minWidth=<span style="color: #ff0000;">&quot;21&quot;</span> minHeight=<span style="color: #ff0000;">&quot;21&quot;</span></span>
<span style="color: #000000;">        alpha.disabled=<span style="color: #ff0000;">&quot;0.5&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- states --&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: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> <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> <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>
&nbsp;
    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- host component --&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Metadata</span><span style="color: #7400FF;">&gt;</span></span>
        [HostComponent(&quot;spark.components.Button&quot;)]
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Metadata</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span> fb:purpose=<span style="color: #ff0000;">&quot;styling&quot;</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;">            /* Define the skin elements that should not be colorized.</span>
<span style="color: #000000;">            For button, the graphics are colorized but the label is not. */</span>
<span style="color: #000000;">            static private const exclusions:Array = <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;labelDisplay&quot;</span><span style="color: #66cc66;">&#93;</span>;</span>
&nbsp;
<span style="color: #000000;">            override public function get colorizeExclusions<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:Array <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                return exclusions;</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
&nbsp;
<span style="color: #000000;">            override protected function initializationComplete<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                useChromeColor = true;</span>
<span style="color: #000000;">                super.initializationComplete<span style="color: #66cc66;">&#40;</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;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('assets/images/close_button_up.png')&quot;</span></span>
<span style="color: #000000;">            source.over=<span style="color: #ff0000;">&quot;@Embed('assets/images/close_button_over.png')&quot;</span></span>
<span style="color: #000000;">            source.down=<span style="color: #ff0000;">&quot;@Embed('assets/images/close_button_down.png')&quot;</span></span>
<span style="color: #000000;">            left=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<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;!-- layer 8: text --&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> id=<span style="color: #ff0000;">&quot;labelDisplay&quot;</span></span>
<span style="color: #000000;">            textAlign=<span style="color: #ff0000;">&quot;center&quot;</span></span>
<span style="color: #000000;">            verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span></span>
<span style="color: #000000;">            maxDisplayedLines=<span style="color: #ff0000;">&quot;1&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;1&quot;</span></span>
<span style="color: #000000;">            left=<span style="color: #ff0000;">&quot;10&quot;</span> right=<span style="color: #ff0000;">&quot;10&quot;</span> top=<span style="color: #ff0000;">&quot;2&quot;</span> bottom=<span style="color: #ff0000;">&quot;2&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:SparkSkin</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="alert">Icons copyright of <a href="http://www.famfamfam.com/lab/icons/">famfamfam.com</a>.</p>
<p class="information"><a href="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_Button_skinClass_BitmapImage_test/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_Button_skinClass_BitmapImage_test/main.html" width="100%" height="100"></iframe></p>
<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Using a bitmap image skin in a Spark Button control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/03/24/using-a-bitmap-image-skin-in-a-spark-button-control-in-flex-4/',contentID: 'post-2636',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,skinClass,source',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/03/24/using-a-bitmap-image-skin-in-a-spark-button-control-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Setting the corner radius on a Spark BitmapImage control in Flex 4</title>
		<link>http://blog.flexexamples.com/2010/02/07/setting-the-corner-radius-on-a-spark-bitmapimage-control-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2010/02/07/setting-the-corner-radius-on-a-spark-bitmapimage-control-in-flex-4/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 07:46:14 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta2]]></category>
		<category><![CDATA[BitmapImage (Spark)]]></category>
		<category><![CDATA[Border (Spark)]]></category>
		<category><![CDATA[cornerRadius]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[mask]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2448</guid>
		<description><![CDATA[<p>The following example shows how you can set the corner radius on a Spark BitmapImage control in Flex 4 by creating a mask with a corner radius (in this case a Spark BorderContainer container with the cornerRadius style set).</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2010/02/07/setting-the-corner-radius-on-a-spark-bitmapimage-control-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_BitmapImage_cornerRadius_test&#34; xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34; xmlns:mx=&#34;library://ns.adobe.com/flex/mx&#34;&#62; &#60;s:controlBarContent&#62; &#60;mx:Form&#62; &#60;mx:FormItem label=&#34;cornerRadius:&#34;&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the corner radius on a Spark BitmapImage control in Flex 4 by creating a mask with a corner radius (in this case a Spark BorderContainer container with the <code>cornerRadius</code> style set).</p>
<p><span id="more-2448"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/02/07/setting-the-corner-radius-on-a-spark-bitmapimage-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_BitmapImage_cornerRadius_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:controlBarContent</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;cornerRadius:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HSlider</span> id=<span style="color: #ff0000;">&quot;sl&quot;</span></span>
<span style="color: #000000;">                        minimum=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">                        maximum=<span style="color: #ff0000;">&quot;{bmpImg.height/2}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:controlBarContent</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;bmpImg&quot;</span></span>
<span style="color: #000000;">            source=<span style="color: #ff0000;">&quot;@Embed('assets/image1.jpg')&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<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:mask</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BorderContainer</span> id=<span style="color: #ff0000;">&quot;bmpMask&quot;</span></span>
<span style="color: #000000;">                    cornerRadius=<span style="color: #ff0000;">&quot;{sl.value}&quot;</span></span>
<span style="color: #000000;">                    width=<span style="color: #ff0000;">&quot;{bmpImg.width}&quot;</span> height=<span style="color: #ff0000;">&quot;{bmpImg.height}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:mask</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:BitmapImage</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<div span="googleAdsLeaderboard">
<script type="text/javascript"><!--
google_ad_client = "pub-3325829455487492";
/* 728x90, created 7/15/09 */
google_ad_slot = "6403511741";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br />
</div>
<p class="information"><a href="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_BitmapImage_cornerRadius_test/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_BitmapImage_cornerRadius_test/main.html" width="100%" height="400"></iframe></p>
<p>Due to popular demand, here is the &#8220;same&#8221; example in a more ActionScript friendly format:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/02/07/setting-the-corner-radius-on-a-spark-bitmapimage-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_BitmapImage_cornerRadius_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span></span>
<span style="color: #000000;">        initialize=<span style="color: #ff0000;">&quot;init();&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&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.containers.Form;</span>
<span style="color: #000000;">            import mx.containers.FormItem;</span>
<span style="color: #000000;">            import mx.core.FlexGlobals;</span>
<span style="color: #000000;">            import mx.events.ResizeEvent;</span>
&nbsp;
<span style="color: #000000;">            import spark.components.BorderContainer;</span>
<span style="color: #000000;">            import spark.components.HSlider;</span>
<span style="color: #000000;">            import spark.primitives.BitmapImage;</span>
&nbsp;
<span style="color: #000000;">            <span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;assets/image1.jpg&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span></span>
<span style="color: #000000;">            protected const IMG:Class;</span>
&nbsp;
<span style="color: #000000;">            protected var sl:HSlider;</span>
<span style="color: #000000;">            protected var bmpImg:BitmapImage;</span>
<span style="color: #000000;">            protected var bmpMask:BorderContainer;</span>
&nbsp;
<span style="color: #000000;">            protected function init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                var image:Object = new IMG<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span>
&nbsp;
<span style="color: #000000;">                sl = new HSlider<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                sl.maximum = image.height / <span style="color: #cc66cc;">2</span>;</span>
<span style="color: #000000;">                sl.addEventListener<span style="color: #66cc66;">&#40;</span>Event.CHANGE, sl_changeHandler<span style="color: #66cc66;">&#41;</span>;</span>
&nbsp;
<span style="color: #000000;">                var frmItm:FormItem = new FormItem<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                frmItm.label = <span style="color: #ff0000;">&quot;cornerRadius:&quot;</span>;</span>
<span style="color: #000000;">                frmItm.addElement<span style="color: #66cc66;">&#40;</span>sl<span style="color: #66cc66;">&#41;</span>;</span>
&nbsp;
<span style="color: #000000;">                var frm:Form = new Form<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                frm.addElement<span style="color: #66cc66;">&#40;</span>frmItm<span style="color: #66cc66;">&#41;</span>;</span>
&nbsp;
<span style="color: #000000;">                Application<span style="color: #66cc66;">&#40;</span>FlexGlobals.topLevelApplication<span style="color: #66cc66;">&#41;</span>.controlBarContent = <span style="color: #66cc66;">&#91;</span>frm<span style="color: #66cc66;">&#93;</span>;</span>
&nbsp;
<span style="color: #000000;">                bmpMask = new BorderContainer<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                bmpMask.setStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;cornerRadius&quot;</span>, sl.value<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                bmpMask.width = image.width;</span>
<span style="color: #000000;">                bmpMask.height = image.height;</span>
&nbsp;
<span style="color: #000000;">                bmpImg = new BitmapImage<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">                bmpImg.source = image;</span>
<span style="color: #000000;">                bmpImg.mask = bmpMask;</span>
<span style="color: #000000;">                bmpImg.horizontalCenter = <span style="color: #cc66cc;">0</span>;</span>
<span style="color: #000000;">                bmpImg.verticalCenter = <span style="color: #cc66cc;">0</span>;</span>
<span style="color: #000000;">                addElement<span style="color: #66cc66;">&#40;</span>bmpImg<span style="color: #66cc66;">&#41;</span>;</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
&nbsp;
<span style="color: #000000;">            protected function sl_changeHandler<span style="color: #66cc66;">&#40;</span>evt:Event<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                bmpMask.setStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;cornerRadius&quot;</span>, sl.value<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;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the corner radius on a Spark BitmapImage control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/02/07/setting-the-corner-radius-on-a-spark-bitmapimage-control-in-flex-4/',contentID: 'post-2448',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'cornerRadius,Gumbo,mask',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/02/07/setting-the-corner-radius-on-a-spark-bitmapimage-control-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Creating a simple image gallery using the Spark PopUpAnchor control in Flex 4</title>
		<link>http://blog.flexexamples.com/2010/02/07/creating-a-simple-image-gallery-using-the-spark-popupanchor-control-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2010/02/07/creating-a-simple-image-gallery-using-the-spark-popupanchor-control-in-flex-4/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 16:05:03 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta2]]></category>
		<category><![CDATA[BitmapImage (Spark)]]></category>
		<category><![CDATA[PopUpAnchor (Spark)]]></category>
		<category><![CDATA[displayPopUp]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[popUpWidthMatchesAnchorWidth]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2413</guid>
		<description><![CDATA[<p>The following example shows how you can create a simple image gallery using the Spark PopUpAnchor control in Flex 4 using the PopUpAnchor, BitmapImage, and MX Image controls. </p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2010/02/07/creating-a-simple-image-gallery-using-the-spark-popupanchor-control-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_PopUpAnchor_gallery_test&#34; xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34; xmlns:mx=&#34;library://ns.adobe.com/flex/mx&#34;&#62; &#160; &#60;s:HGroup horizontalCenter=&#34;0&#34; top=&#34;20&#34;&#62; &#60;!-- 1 --&#62; &#60;s:Group mouseDown=&#34;fullImg1.displayPopUp = true;&#34;&#62; &#60;!-- embedded thumbnail [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can create a simple image gallery using the Spark PopUpAnchor control in Flex 4 using the PopUpAnchor, BitmapImage, and MX Image controls. </p>
<p><span id="more-2413"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/02/07/creating-a-simple-image-gallery-using-the-spark-popupanchor-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_PopUpAnchor_gallery_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HGroup</span> horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- 1 --&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Group</span> mouseDown=<span style="color: #ff0000;">&quot;fullImg1.displayPopUp = true;&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- embedded thumbnail image --&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;thumbImg1&quot;</span></span>
<span style="color: #000000;">                    source=<span style="color: #ff0000;">&quot;@Embed('assets/fx_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:PopUpAnchor</span> id=<span style="color: #ff0000;">&quot;fullImg1&quot;</span></span>
<span style="color: #000000;">                    popUpHeightMatchesAnchorHeight=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">                    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:popUp</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- dynamically loaded full image --&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Image</span> source=<span style="color: #ff0000;">&quot;assets/fx_appicon.jpg&quot;</span></span>
<span style="color: #000000;">                            width=<span style="color: #ff0000;">&quot;300&quot;</span> height=<span style="color: #ff0000;">&quot;300&quot;</span></span>
<span style="color: #000000;">                            mouseUp=<span style="color: #ff0000;">&quot;fullImg1.displayPopUp = false;&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:popUp</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:PopUpAnchor</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: #808080; font-style: italic;">&lt;!-- 2 --&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Group</span> mouseDown=<span style="color: #ff0000;">&quot;fullImg2.displayPopUp = true;&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;thumbImg2&quot;</span></span>
<span style="color: #000000;">                    source=<span style="color: #ff0000;">&quot;@Embed('assets/ai_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:PopUpAnchor</span> id=<span style="color: #ff0000;">&quot;fullImg2&quot;</span></span>
<span style="color: #000000;">                    popUpHeightMatchesAnchorHeight=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">                    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:popUp</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Image</span> source=<span style="color: #ff0000;">&quot;assets/ai_appicon.jpg&quot;</span></span>
<span style="color: #000000;">                            width=<span style="color: #ff0000;">&quot;300&quot;</span> height=<span style="color: #ff0000;">&quot;300&quot;</span></span>
<span style="color: #000000;">                            mouseUp=<span style="color: #ff0000;">&quot;fullImg2.displayPopUp = false;&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:popUp</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:PopUpAnchor</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: #808080; font-style: italic;">&lt;!-- 3 --&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Group</span> mouseDown=<span style="color: #ff0000;">&quot;fullImg3.displayPopUp = true;&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;thumbImg3&quot;</span></span>
<span style="color: #000000;">                           source=<span style="color: #ff0000;">&quot;@Embed('assets/fl_player_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:PopUpAnchor</span> id=<span style="color: #ff0000;">&quot;fullImg3&quot;</span></span>
<span style="color: #000000;">                           popUpHeightMatchesAnchorHeight=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">                           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:popUp</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Image</span> source=<span style="color: #ff0000;">&quot;assets/fl_player_appicon.jpg&quot;</span></span>
<span style="color: #000000;">                              width=<span style="color: #ff0000;">&quot;300&quot;</span> height=<span style="color: #ff0000;">&quot;300&quot;</span></span>
<span style="color: #000000;">                              mouseUp=<span style="color: #ff0000;">&quot;fullImg3.displayPopUp = false;&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:popUp</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:PopUpAnchor</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>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:HGroup</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_PopUpAnchor_gallery_test/srcview/">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_PopUpAnchor_gallery_test/main.html" width="100%" height="400"></iframe></p>
<p>Or you could convert the PopUpAnchor code into a custom component, as seen in the following example:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/02/07/creating-a-simple-image-gallery-using-the-spark-popupanchor-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_PopUpAnchor_gallery_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span></span>
<span style="color: #000000;">        xmlns:comps=<span style="color: #ff0000;">&quot;comps.*&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HGroup</span> horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- 1 --&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;comps:PopUpThumb</span> id=<span style="color: #ff0000;">&quot;thumb1&quot;</span></span>
<span style="color: #000000;">                thumbnailImgClass=<span style="color: #ff0000;">&quot;@Embed('assets/fx_appicon-tn.gif')&quot;</span></span>
<span style="color: #000000;">                fullImgSrc=<span style="color: #ff0000;">&quot;assets/fx_appicon.jpg&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
        <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- 2 --&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;comps:PopUpThumb</span> id=<span style="color: #ff0000;">&quot;thumb2&quot;</span></span>
<span style="color: #000000;">                thumbnailImgClass=<span style="color: #ff0000;">&quot;@Embed('assets/ai_appicon-tn.gif')&quot;</span></span>
<span style="color: #000000;">                fullImgSrc=<span style="color: #ff0000;">&quot;assets/ai_appicon.jpg&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
        <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- 3 --&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;comps:PopUpThumb</span> id=<span style="color: #ff0000;">&quot;thumb3&quot;</span></span>
<span style="color: #000000;">                thumbnailImgClass=<span style="color: #ff0000;">&quot;@Embed('assets/fl_player_appicon-tn.gif')&quot;</span></span>
<span style="color: #000000;">                fullImgSrc=<span style="color: #ff0000;">&quot;assets/fl_player_appicon.jpg&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:HGroup</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>And the custom PopUpThumb component, <em>comps/PopUpThumb.mxml</em>, is as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2010/02/07/creating-a-simple-image-gallery-using-the-spark-popupanchor-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Group</span> name=<span style="color: #ff0000;">&quot;PopUpThumb&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span></span>
<span style="color: #000000;">        mouseDown=<span style="color: #ff0000;">&quot;fullImg.displayPopUp = true;&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&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;">            <span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span></span>
<span style="color: #000000;">            public var thumbnailImgClass:Class;</span>
&nbsp;
<span style="color: #000000;">            <span style="color: #66cc66;">&#91;</span>Bindable<span style="color: #66cc66;">&#93;</span></span>
<span style="color: #000000;">            public var fullImgSrc:String;</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;
    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- embedded thumbnail image --&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;thumbImg&quot;</span></span>
<span style="color: #000000;">                   source=<span style="color: #ff0000;">&quot;{thumbnailImgClass}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:PopUpAnchor</span> id=<span style="color: #ff0000;">&quot;fullImg&quot;</span></span>
<span style="color: #000000;">                   popUpHeightMatchesAnchorHeight=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">                   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:popUp</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- dynamically loaded full image --&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Image</span> source=<span style="color: #ff0000;">&quot;{fullImgSrc}&quot;</span></span>
<span style="color: #000000;">                      width=<span style="color: #ff0000;">&quot;300&quot;</span> height=<span style="color: #ff0000;">&quot;300&quot;</span></span>
<span style="color: #000000;">                      mouseUp=<span style="color: #ff0000;">&quot;fullImg.displayPopUp = false;&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:popUp</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:PopUpAnchor</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Group</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Creating a simple image gallery using the Spark PopUpAnchor control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2010/02/07/creating-a-simple-image-gallery-using-the-spark-popupanchor-control-in-flex-4/',contentID: 'post-2413',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'displayPopUp,Gumbo,popUpWidthMatchesAnchorWidth',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2010/02/07/creating-a-simple-image-gallery-using-the-spark-popupanchor-control-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting the Y-axis transform position on a Spark BitmapImage control in Flex 4</title>
		<link>http://blog.flexexamples.com/2009/11/20/setting-the-y-axis-transform-position-on-a-spark-bitmapimage-control-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2009/11/20/setting-the-y-axis-transform-position-on-a-spark-bitmapimage-control-in-flex-4/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 03:13:49 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta2]]></category>
		<category><![CDATA[BitmapImage (Spark)]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[rotationY]]></category>
		<category><![CDATA[transformX]]></category>
		<category><![CDATA[transformY]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2225</guid>
		<description><![CDATA[<p>The following example shows how you can set the Y-axis transform position on a Spark BitmapImage control in Flex 4 by seting the rotationY, transformX, and transformY properties.</p> <p>Full code after the jump.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2009/11/20/setting-the-y-axis-transform-position-on-a-spark-bitmapimage-control-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_BitmapImage_transformY_test&#34; xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34; xmlns:mx=&#34;library://ns.adobe.com/flex/halo&#34;&#62; &#60;s:controlBarContent&#62; &#60;mx:Form styleName=&#34;plain&#34; backgroundAlpha=&#34;0.0&#34;&#62; &#60;mx:FormItem label=&#34;rotationY:&#34;&#62; &#60;s:HSlider id=&#34;sl1&#34; minimum=&#34;0&#34; maximum=&#34;360&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can set the Y-axis transform position on a Spark BitmapImage control in Flex 4 by seting the <code>rotationY</code>, <code>transformX</code>, and <code>transformY</code> properties.</p>
<p>Full code after the jump.</p>
<p><span id="more-2225"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/11/20/setting-the-y-axis-transform-position-on-a-spark-bitmapimage-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_BitmapImage_transformY_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/halo&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:controlBarContent</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span> styleName=<span style="color: #ff0000;">&quot;plain&quot;</span> backgroundAlpha=<span style="color: #ff0000;">&quot;0.0&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;rotationY:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HSlider</span> id=<span style="color: #ff0000;">&quot;sl1&quot;</span> minimum=<span style="color: #ff0000;">&quot;0&quot;</span> maximum=<span style="color: #ff0000;">&quot;360&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;transformY:&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HSlider</span> id=<span style="color: #ff0000;">&quot;sl2&quot;</span> minimum=<span style="color: #ff0000;">&quot;0&quot;</span> maximum=<span style="color: #ff0000;">&quot;{img.height}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:controlBarContent</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SkinnableContainer</span> horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<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:Line</span> x=<span style="color: #ff0000;">&quot;{sl2.value}&quot;</span> yFrom=<span style="color: #ff0000;">&quot;0&quot;</span> yTo=<span style="color: #ff0000;">&quot;{img.height+20}&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:SolidColorStroke</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:Line</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;img&quot;</span></span>
<span style="color: #000000;">                source=<span style="color: #ff0000;">&quot;@Embed('assets/fl_appicon-tn.gif')&quot;</span></span>
<span style="color: #000000;">                rotationY=<span style="color: #ff0000;">&quot;{sl1.value}&quot;</span></span>
<span style="color: #000000;">                transformX=<span style="color: #ff0000;">&quot;{sl2.value}&quot;</span> transformY=<span style="color: #ff0000;">&quot;{sl2.value}&quot;</span></span>
<span style="color: #000000;">                horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<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:SkinnableContainer</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the Y-axis transform position on a Spark BitmapImage control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/11/20/setting-the-y-axis-transform-position-on-a-spark-bitmapimage-control-in-flex-4/',contentID: 'post-2225',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,rotationY,transformX,transformY',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2009/11/20/setting-the-y-axis-transform-position-on-a-spark-bitmapimage-control-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Displaying images in a Spark List control using a custom item renderer in Flex 4</title>
		<link>http://blog.flexexamples.com/2009/09/29/displaying-images-in-a-spark-list-control-using-a-custom-item-renderer-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2009/09/29/displaying-images-in-a-spark-list-control-using-a-custom-item-renderer-in-flex-4/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 03:52:20 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta2]]></category>
		<category><![CDATA[BitmapImage (Spark)]]></category>
		<category><![CDATA[List (Spark)]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[itemRenderer]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1938</guid>
		<description><![CDATA[<p>The following example shows how you can create a simple, custom item renderer to display thumbnails in a Spark List control in Flex 4 by setting the itemRenderer property.</p> <p>Full code after the jump.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2009/09/29/displaying-images-in-a-spark-list-control-using-a-custom-item-renderer-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_List_itemRenderer_test&#34; xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34;&#62; &#160; &#60;s:List id=&#34;lst&#34; itemRenderer=&#34;skins.CustomItemRenderer&#34; width=&#34;{lst.height}&#34; horizontalCenter=&#34;0&#34; verticalCenter=&#34;0&#34; useVirtualLayout=&#34;false&#34;&#62; &#60;s:layout&#62; &#60;s:VerticalLayout [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can create a simple, custom item renderer to display thumbnails in a Spark List control in Flex 4 by setting the <code>itemRenderer</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-1938"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/09/29/displaying-images-in-a-spark-list-control-using-a-custom-item-renderer-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_List_itemRenderer_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:List</span> id=<span style="color: #ff0000;">&quot;lst&quot;</span></span>
<span style="color: #000000;">            itemRenderer=<span style="color: #ff0000;">&quot;skins.CustomItemRenderer&quot;</span></span>
<span style="color: #000000;">            width=<span style="color: #ff0000;">&quot;{lst.height}&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">            useVirtualLayout=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:layout</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:VerticalLayout</span> gap=<span style="color: #ff0000;">&quot;0&quot;</span> requestedRowCount=<span style="color: #ff0000;">&quot;3&quot;</span> horizontalAlign=<span style="color: #ff0000;">&quot;justify&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:layout</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:ArrayList</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> name=<span style="color: #ff0000;">&quot;Adobe Illustrator&quot;</span> src=<span style="color: #ff0000;">&quot;@Embed('assets/ai_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> name=<span style="color: #ff0000;">&quot;Adobe AIR&quot;</span> src=<span style="color: #ff0000;">&quot;@Embed('assets/air_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> name=<span style="color: #ff0000;">&quot;ColdFusion&quot;</span> src=<span style="color: #ff0000;">&quot;@Embed('assets/cf_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> name=<span style="color: #ff0000;">&quot;Dreamweaver&quot;</span> src=<span style="color: #ff0000;">&quot;@Embed('assets/dw_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> name=<span style="color: #ff0000;">&quot;Flash CS4&quot;</span> src=<span style="color: #ff0000;">&quot;@Embed('assets/fl_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Object</span> name=<span style="color: #ff0000;">&quot;Fireworks&quot;</span> src=<span style="color: #ff0000;">&quot;@Embed('assets/fw_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:ArrayList</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:List</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>And the custom item renderer, <em>skins/CustomItemRenderer.mxml</em>, is as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/09/29/displaying-images-in-a-spark-list-control-using-a-custom-item-renderer-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:ItemRenderer</span> name=<span style="color: #ff0000;">&quot;CustomItemRenderer&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        focusEnabled=<span style="color: #ff0000;">&quot;false&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:State</span> name=<span style="color: #ff0000;">&quot;normal&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;hovered&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;selected&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;normalAndShowsCaret&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;hoveredAndShowsCaret&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;selectedAndShowsCaret&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: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;{data.src}&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Rect</span> left=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<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: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;black&quot;</span></span>
<span style="color: #000000;">                    alpha=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">                    alpha.hovered=<span style="color: #ff0000;">&quot;0.4&quot;</span></span>
<span style="color: #000000;">                    alpha.selected=<span style="color: #ff0000;">&quot;0.4&quot;</span></span>
<span style="color: #000000;">                    alpha.selectedAndShowsCaret=<span style="color: #ff0000;">&quot;0.4&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>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> color=<span style="color: #ff0000;">&quot;white&quot;</span></span>
<span style="color: #000000;">            maxDisplayedLines=<span style="color: #ff0000;">&quot;1&quot;</span></span>
<span style="color: #000000;">            backgroundAlpha=<span style="color: #ff0000;">&quot;0.3&quot;</span></span>
<span style="color: #000000;">            backgroundColor=<span style="color: #ff0000;">&quot;black&quot;</span></span>
<span style="color: #000000;">            width=<span style="color: #ff0000;">&quot;100%&quot;</span></span>
<span style="color: #000000;">            bottom=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">            paddingLeft=<span style="color: #ff0000;">&quot;5&quot;</span> paddingRight=<span style="color: #ff0000;">&quot;5&quot;</span></span>
<span style="color: #000000;">            paddingTop=<span style="color: #ff0000;">&quot;5&quot;</span> paddingBottom=<span style="color: #ff0000;">&quot;5&quot;</span></span>
<span style="color: #000000;">            includeIn=<span style="color: #ff0000;">&quot;hovered,hoveredAndShowsCaret,selected,selectedAndShowsCaret&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:text</span><span style="color: #7400FF;">&gt;</span></span>{data.name}<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:text</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Label</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:ItemRenderer</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_List_itemRenderer_test3/bin/srcview/">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_List_itemRenderer_test3/bin/main.html" width="100%" height="200"></iframe></p>
<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Displaying images in a Spark List control using a custom item renderer in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/09/29/displaying-images-in-a-spark-list-control-using-a-custom-item-renderer-in-flex-4/',contentID: 'post-1938',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,itemRenderer',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2009/09/29/displaying-images-in-a-spark-list-control-using-a-custom-item-renderer-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Displaying images in a Spark List control in Flex 4</title>
		<link>http://blog.flexexamples.com/2009/09/18/displaying-images-in-a-spark-list-control-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2009/09/18/displaying-images-in-a-spark-list-control-in-flex-4/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 01:00:57 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta1]]></category>
		<category><![CDATA[BitmapImage (Spark)]]></category>
		<category><![CDATA[List (Spark)]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[itemRenderer]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/?p=1890</guid>
		<description><![CDATA[<p>The following example shows how you can display images automatically in a Spark List control in Flex 4 by setting the itemRenderer property to the DefaultComplexItemRenderer class.</p> <p>Full code after the jump.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2009/09/18/displaying-images-in-a-spark-list-control-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_List_itemRenderer_DefaultComplexItemRenderer_test&#34; xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34; xmlns:mx=&#34;library://ns.adobe.com/flex/halo&#34;&#62; &#160; &#60;s:List id=&#34;list&#34; itemRenderer=&#34;spark.skins.spark.DefaultComplexItemRenderer&#34; horizontalCenter=&#34;0&#34; verticalCenter=&#34;0&#34;&#62; &#60;s:layout&#62; &#60;s:HorizontalLayout requestedColumnCount=&#34;3&#34; gap=&#34;0&#34; /&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can display images automatically in a Spark List control in Flex 4 by setting the <code>itemRenderer</code> property to the DefaultComplexItemRenderer class.</p>
<p>Full code after the jump.</p>
<p><span id="more-1890"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/09/18/displaying-images-in-a-spark-list-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_List_itemRenderer_DefaultComplexItemRenderer_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/halo&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:List</span> id=<span style="color: #ff0000;">&quot;list&quot;</span></span>
<span style="color: #000000;">            itemRenderer=<span style="color: #ff0000;">&quot;spark.skins.spark.DefaultComplexItemRenderer&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<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:layout</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HorizontalLayout</span> requestedColumnCount=<span style="color: #ff0000;">&quot;3&quot;</span> gap=<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:layout</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:ArrayList</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('ai_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('air_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('cf_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('dw_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('fl_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('fl_player_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('fw_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('fx_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:ArrayList</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:List</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>You can also declare the <code>itemRenderer</code> property using MXML, as seen in the following example:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/09/18/displaying-images-in-a-spark-list-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_List_itemRenderer_DefaultComplexItemRenderer_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/halo&quot;</span></span>
<span style="color: #000000;">        xmlns:skins=<span style="color: #ff0000;">&quot;spark.skins.spark.*&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:List</span> id=<span style="color: #ff0000;">&quot;list&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<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:layout</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HorizontalLayout</span> requestedColumnCount=<span style="color: #ff0000;">&quot;3&quot;</span> gap=<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:layout</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:itemRenderer</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Component</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;skins:DefaultComplexItemRenderer</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Component</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:itemRenderer</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:ArrayList</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('ai_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('air_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('cf_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('dw_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('fl_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('fl_player_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('fw_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('fx_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:ArrayList</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:List</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Or you can set the <code>layout</code> and <code>itemRenderer</code> properties in a custom skin file, as seen in the following example:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/09/18/displaying-images-in-a-spark-list-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_List_itemRenderer_DefaultComplexItemRenderer_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/halo&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:List</span> id=<span style="color: #ff0000;">&quot;list&quot;</span></span>
<span style="color: #000000;">            skinClass=<span style="color: #ff0000;">&quot;skins.CustomListSkin&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<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:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:ArrayList</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('ai_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('air_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('cf_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('dw_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('fl_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('fl_player_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('fw_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('fx_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:ArrayList</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:List</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>And the custom skin class, <em>skins/CustomListSkin.mxml</em>, is as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/09/18/displaying-images-in-a-spark-list-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SparkSkin</span> name=<span style="color: #ff0000;">&quot;CustomListSkin&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        minWidth=<span style="color: #ff0000;">&quot;112&quot;</span> minHeight=<span style="color: #ff0000;">&quot;112&quot;</span></span>
<span style="color: #000000;">        alpha.disabled=<span style="color: #ff0000;">&quot;0.5&quot;</span></span>
<span style="color: #000000;">        blendMode=<span style="color: #ff0000;">&quot;normal&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:State</span> name=<span style="color: #ff0000;">&quot;normal&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>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Metadata</span><span style="color: #7400FF;">&gt;</span></span>
        [HostComponent(&quot;spark.components.List&quot;)]
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Metadata</span><span style="color: #7400FF;">&gt;</span></span>
&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;">            /* Define the skin elements that should not be colorized.</span>
<span style="color: #000000;">               For list, the skin itself is colorized but the individual parts are not. */</span>
<span style="color: #000000;">            static private const exclusions:Array = <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;scroller&quot;</span>, <span style="color: #ff0000;">&quot;background&quot;</span><span style="color: #66cc66;">&#93;</span>;</span>
&nbsp;
<span style="color: #000000;">            override public function get colorizeExclusions<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:Array <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                return exclusions;</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span></span>
&nbsp;
<span style="color: #000000;">            /* Define the content fill items that should be colored by the <span style="color: #ff0000;">&quot;contentBackgroundColor&quot;</span> style. */</span>
<span style="color: #000000;">            static private const contentFill:Array = <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;bgFill&quot;</span><span style="color: #66cc66;">&#93;</span>;</span>
&nbsp;
<span style="color: #000000;">            override public function get contentItems<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:Array <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                return contentFill</span>
<span style="color: #000000;">            <span style="color: #66cc66;">&#125;</span>;</span>
&nbsp;
<span style="color: #000000;">            override protected function updateDisplayList<span style="color: #66cc66;">&#40;</span>unscaledWidth:Number, unscaledHeight:Number<span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                if <span style="color: #66cc66;">&#40;</span>getStyle<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;borderVisible&quot;</span><span style="color: #66cc66;">&#41;</span> == true<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                    border.visible = true;</span>
<span style="color: #000000;">                    background.left = background.top = background.right = background.bottom = <span style="color: #cc66cc;">1</span>;</span>
<span style="color: #000000;">                    scroller.minViewportInset = <span style="color: #cc66cc;">1</span>;</span>
<span style="color: #000000;">                <span style="color: #66cc66;">&#125;</span> else <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                    border.visible = false;</span>
<span style="color: #000000;">                    background.left = background.top = background.right = background.bottom = <span style="color: #cc66cc;">0</span>;</span>
<span style="color: #000000;">                    scroller.minViewportInset = <span style="color: #cc66cc;">0</span>;</span>
<span style="color: #000000;">                <span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">                super.updateDisplayList<span style="color: #66cc66;">&#40;</span>unscaledWidth, unscaledHeight<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;
    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- border --&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Rect</span> id=<span style="color: #ff0000;">&quot;border&quot;</span> left=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<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: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;{getStyle('borderColor')}&quot;</span></span>
<span style="color: #000000;">                                alpha=<span style="color: #ff0000;">&quot;{getStyle('borderAlpha')}&quot;</span></span>
<span style="color: #000000;">                                weight=<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:stroke</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>
&nbsp;
    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- fill --&gt;</span></span>
    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!--- Defines the background appearance of the list-based component. --&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Rect</span> id=<span style="color: #ff0000;">&quot;background&quot;</span> left=<span style="color: #ff0000;">&quot;1&quot;</span> right=<span style="color: #ff0000;">&quot;1&quot;</span> top=<span style="color: #ff0000;">&quot;1&quot;</span> bottom=<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: #808080; font-style: italic;">&lt;!--- Defines the color of the background. The default color is 0xFFFFFF. --&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SolidColor</span> id=<span style="color: #ff0000;">&quot;bgFill&quot;</span> color=<span style="color: #ff0000;">&quot;0xFFFFFF&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>
&nbsp;
    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!--- The Scroller component to add scroll bars to the list. --&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Scroller</span> id=<span style="color: #ff0000;">&quot;scroller&quot;</span> left=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<span style="color: #ff0000;">&quot;0&quot;</span> minViewportInset=<span style="color: #ff0000;">&quot;1&quot;</span> focusEnabled=<span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!--- The container for the data items. --&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:DataGroup</span> id=<span style="color: #ff0000;">&quot;dataGroup&quot;</span> itemRenderer=<span style="color: #ff0000;">&quot;spark.skins.spark.DefaultComplexItemRenderer&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:layout</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HorizontalLayout</span> requestedColumnCount=<span style="color: #ff0000;">&quot;3&quot;</span> gap=<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:layout</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:DataGroup</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Scroller</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:SparkSkin</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Displaying images in a Spark List control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/09/18/displaying-images-in-a-spark-list-control-in-flex-4/',contentID: 'post-1890',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,itemRenderer',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2009/09/18/displaying-images-in-a-spark-list-control-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Setting the depth on a Spark BitmapImage control in Flex 4</title>
		<link>http://blog.flexexamples.com/2009/06/18/setting-the-depth-on-a-spark-bitmapimage-control-in-flex-4/</link>
		<comments>http://blog.flexexamples.com/2009/06/18/setting-the-depth-on-a-spark-bitmapimage-control-in-flex-4/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 06:59:20 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta1]]></category>
		<category><![CDATA[BitmapImage (Spark)]]></category>
		<category><![CDATA[depth]]></category>
		<category><![CDATA[Gumbo]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2009/06/18/setting-the-depth-on-a-spark-bitmapimage-control-in-flex-4/</guid>
		<description><![CDATA[<p>The following example shows how you can reorder a stack of Spark Bitmap controls in Flex 4 by setting the depth property (formerly the layer property).</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2009/06/18/setting-the-depth-on-a-spark-bitmapimage-control-in-flex-4/ --&#62; &#60;s:Application name=&#34;Spark_BitmapImage_depth_test&#34; xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34; xmlns:mx=&#34;library://ns.adobe.com/flex/mx&#34;&#62; &#160; &#60;fx:Style&#62; @namespace s &#34;library://ns.adobe.com/flex/spark&#34;; &#160; s&#124;Slider { liveDragging: true; } &#60;/fx:Style&#62; &#160; &#60;mx:Form styleName=&#34;plain&#34;&#62; &#60;mx:FormItem&#62; &#60;s:HSlider [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can reorder a stack of Spark Bitmap controls in Flex 4 by setting the <code>depth</code> property (formerly the <code>layer</code> property).</p>
<p><span id="more-1114"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/06/18/setting-the-depth-on-a-spark-bitmapimage-control-in-flex-4/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_BitmapImage_depth_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Style</span><span style="color: #7400FF;">&gt;</span></span>
        @namespace s &quot;library://ns.adobe.com/flex/spark&quot;;
&nbsp;
        s|Slider {
            liveDragging: true;
        }
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Style</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span> styleName=<span style="color: #ff0000;">&quot;plain&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HSlider</span> id=<span style="color: #ff0000;">&quot;slider1&quot;</span> minimum=<span style="color: #ff0000;">&quot;0&quot;</span> maximum=<span style="color: #ff0000;">&quot;6&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HSlider</span> id=<span style="color: #ff0000;">&quot;slider2&quot;</span> minimum=<span style="color: #ff0000;">&quot;0&quot;</span> maximum=<span style="color: #ff0000;">&quot;6&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HSlider</span> id=<span style="color: #ff0000;">&quot;slider3&quot;</span> minimum=<span style="color: #ff0000;">&quot;0&quot;</span> maximum=<span style="color: #ff0000;">&quot;6&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HSlider</span> id=<span style="color: #ff0000;">&quot;slider4&quot;</span> minimum=<span style="color: #ff0000;">&quot;0&quot;</span> maximum=<span style="color: #ff0000;">&quot;6&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HSlider</span> id=<span style="color: #ff0000;">&quot;slider5&quot;</span> minimum=<span style="color: #ff0000;">&quot;0&quot;</span> maximum=<span style="color: #ff0000;">&quot;6&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HSlider</span> id=<span style="color: #ff0000;">&quot;slider6&quot;</span> minimum=<span style="color: #ff0000;">&quot;0&quot;</span> maximum=<span style="color: #ff0000;">&quot;6&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <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><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;bitmapImg1&quot;</span></span>
<span style="color: #000000;">                source=<span style="color: #ff0000;">&quot;@Embed('assets/cf_appicon-tn.gif')&quot;</span></span>
<span style="color: #000000;">                depth=<span style="color: #ff0000;">&quot;{slider1.value}&quot;</span></span>
<span style="color: #000000;">                x=<span style="color: #ff0000;">&quot;0&quot;</span> y=<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:BitmapImage</span> id=<span style="color: #ff0000;">&quot;bitmapImg2&quot;</span></span>
<span style="color: #000000;">                source=<span style="color: #ff0000;">&quot;@Embed('assets/fl_appicon-tn.gif')&quot;</span></span>
<span style="color: #000000;">                depth=<span style="color: #ff0000;">&quot;{slider2.value}&quot;</span></span>
<span style="color: #000000;">                x=<span style="color: #ff0000;">&quot;10&quot;</span> y=<span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;bitmapImg3&quot;</span></span>
<span style="color: #000000;">                source=<span style="color: #ff0000;">&quot;@Embed('assets/fl_player_appicon-tn.gif')&quot;</span></span>
<span style="color: #000000;">                depth=<span style="color: #ff0000;">&quot;{slider3.value}&quot;</span></span>
<span style="color: #000000;">                x=<span style="color: #ff0000;">&quot;20&quot;</span> y=<span style="color: #ff0000;">&quot;20&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;bitmapImg4&quot;</span></span>
<span style="color: #000000;">                source=<span style="color: #ff0000;">&quot;@Embed('assets/fw_appicon-tn.gif')&quot;</span></span>
<span style="color: #000000;">                depth=<span style="color: #ff0000;">&quot;{slider4.value}&quot;</span></span>
<span style="color: #000000;">                x=<span style="color: #ff0000;">&quot;30&quot;</span> y=<span style="color: #ff0000;">&quot;30&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;bitmapImg5&quot;</span></span>
<span style="color: #000000;">                source=<span style="color: #ff0000;">&quot;@Embed('assets/fx_appicon-tn.gif')&quot;</span></span>
<span style="color: #000000;">                depth=<span style="color: #ff0000;">&quot;{slider5.value}&quot;</span></span>
<span style="color: #000000;">                x=<span style="color: #ff0000;">&quot;40&quot;</span> y=<span style="color: #ff0000;">&quot;40&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;bitmapImg6&quot;</span></span>
<span style="color: #000000;">                source=<span style="color: #ff0000;">&quot;@Embed('assets/lr_appicon-tn.gif')&quot;</span></span>
<span style="color: #000000;">                depth=<span style="color: #ff0000;">&quot;{slider6.value}&quot;</span></span>
<span style="color: #000000;">                x=<span style="color: #ff0000;">&quot;50&quot;</span> y=<span style="color: #ff0000;">&quot;50&quot;</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:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Setting the depth on a Spark BitmapImage control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/06/18/setting-the-depth-on-a-spark-bitmapimage-control-in-flex-4/',contentID: 'post-1114',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'depth,Gumbo',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2009/06/18/setting-the-depth-on-a-spark-bitmapimage-control-in-flex-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Displaying images in a Spark DropDownList control in Flex 4</title>
		<link>http://blog.flexexamples.com/2009/04/14/displaying-images-in-a-spark-dropdownlist-control-in-flex-gumbo/</link>
		<comments>http://blog.flexexamples.com/2009/04/14/displaying-images-in-a-spark-dropdownlist-control-in-flex-gumbo/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 02:52:16 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[beta1]]></category>
		<category><![CDATA[BitmapImage]]></category>
		<category><![CDATA[BitmapImage (Spark)]]></category>
		<category><![CDATA[DropDownList (Spark)]]></category>
		<category><![CDATA[DropDownListSkin]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[itemRenderer]]></category>
		<category><![CDATA[skinClass]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2009/04/14/displaying-images-in-a-spark-dropdownlist-control-in-flex-gumbo/</guid>
		<description><![CDATA[<p>The following example shows how you can display images in a Spark DropDownList control in Flex 4 by creating a custom skin and setting the itemRenderer property.</p> <p>Full code after the jump.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2009/04/14/displaying-images-in-a-spark-dropdownlist-control-in-flex-gumbo/ --&#62; &#60;s:Application name=&#34;Spark_DropDownList_itemRenderer_test&#34; xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34; xmlns:mx=&#34;library://ns.adobe.com/flex/halo&#34;&#62; &#160; &#60;s:DropDownList id=&#34;dropDownList&#34; labelField=&#34;label&#34; requireSelection=&#34;true&#34; skinClass=&#34;skins.CustomDropDownListSkin&#34; itemRenderer=&#34;spark.skins.spark.DefaultComplexItemRenderer&#34; horizontalCenter=&#34;0&#34; top=&#34;20&#34;&#62; &#60;s:dataProvider&#62; &#60;s:ArrayList&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can display images in a Spark DropDownList control in Flex 4 by creating a custom skin and setting the <code>itemRenderer</code> property.</p>
<p>Full code after the jump.</p>
<p><span id="more-1048"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/04/14/displaying-images-in-a-spark-dropdownlist-control-in-flex-gumbo/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_DropDownList_itemRenderer_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/halo&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:DropDownList</span> id=<span style="color: #ff0000;">&quot;dropDownList&quot;</span></span>
<span style="color: #000000;">            labelField=<span style="color: #ff0000;">&quot;label&quot;</span></span>
<span style="color: #000000;">            requireSelection=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">            skinClass=<span style="color: #ff0000;">&quot;skins.CustomDropDownListSkin&quot;</span></span>
<span style="color: #000000;">            itemRenderer=<span style="color: #ff0000;">&quot;spark.skins.spark.DefaultComplexItemRenderer&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">            top=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:ArrayList</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('assets/air_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('assets/cf_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('assets/dw_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('assets/fl_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('assets/fl_player_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('assets/fw_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('assets/fx_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;@Embed('assets/ai_appicon-tn.gif')&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:ArrayList</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:dataProvider</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:DropDownList</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>The custom skin, skins/CustomDropDownListSkin.mxml, is as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2009/04/14/displaying-images-in-a-spark-dropdownlist-control-in-flex-gumbo/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Skin</span> name=<span style="color: #ff0000;">&quot;CustomDropDownListSkin&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        alpha.disabled=<span style="color: #ff0000;">&quot;0.5&quot;</span><span style="color: #7400FF;">&gt;</span></span> 
    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- states --&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:State</span> name=<span style="color: #ff0000;">&quot;normal&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;open&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>
&nbsp;
    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- host component --&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Metadata</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;">        <span style="color: #66cc66;">&#91;</span>HostComponent<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;spark.components.DropDownList&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</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:Metadata</span><span style="color: #7400FF;">&gt;</span></span> 
&nbsp;
    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!--- The PopUpAnchor control that opens the drop-down list. --&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:PopUpAnchor</span> id=<span style="color: #ff0000;">&quot;popUp&quot;</span>  displayPopUp.normal=<span style="color: #ff0000;">&quot;false&quot;</span> displayPopUp.open=<span style="color: #ff0000;">&quot;true&quot;</span> includeIn=<span style="color: #ff0000;">&quot;open&quot;</span></span>
<span style="color: #000000;">            left=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<span style="color: #ff0000;">&quot;0&quot;</span> itemDestructionPolicy=<span style="color: #ff0000;">&quot;auto&quot;</span></span>
<span style="color: #000000;">            popUpPosition=<span style="color: #ff0000;">&quot;below&quot;</span> popUpWidthMatchesAnchorWidth=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
        <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!--- The drop down area of the skin. This includes borders, background colors, scrollers, and filters. --&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Group</span> id=<span style="color: #ff0000;">&quot;dropDown&quot;</span> maxHeight=<span style="color: #ff0000;">&quot;134&quot;</span> minHeight=<span style="color: #ff0000;">&quot;22&quot;</span> <span style="color: #7400FF;">&gt;</span></span>
&nbsp;
            <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- drop shadow --&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:RectangularDropShadow</span> blurX=<span style="color: #ff0000;">&quot;20&quot;</span> blurY=<span style="color: #ff0000;">&quot;20&quot;</span> alpha=<span style="color: #ff0000;">&quot;1.0&quot;</span> distance=<span style="color: #ff0000;">&quot;5&quot;</span> </span>
<span style="color: #000000;">                 angle=<span style="color: #ff0000;">&quot;90&quot;</span> color=<span style="color: #ff0000;">&quot;#000000&quot;</span> left=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<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;!-- border --&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Rect</span> left=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<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: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;0x686868&quot;</span> weight=<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:stroke</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>
&nbsp;
            <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- fill --&gt;</span></span>
            <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!--- Defines the appearance of drop-down list's background fill. --&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Rect</span> id=<span style="color: #ff0000;">&quot;background&quot;</span> left=<span style="color: #ff0000;">&quot;1&quot;</span> right=<span style="color: #ff0000;">&quot;1&quot;</span> top=<span style="color: #ff0000;">&quot;1&quot;</span> bottom=<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: #808080; font-style: italic;">&lt;!--- The color of the drop down's background fill. The default color is 0xFFFFFF. --&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SolidColor</span> id=<span style="color: #ff0000;">&quot;bgFill&quot;</span> color=<span style="color: #ff0000;">&quot;0xFFFFFF&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>
&nbsp;
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Scroller</span> left=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<span style="color: #ff0000;">&quot;0&quot;</span> focusEnabled=<span style="color: #ff0000;">&quot;false&quot;</span> minViewportInset=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!--- The container for the data items in the drop-down list. --&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:DataGroup</span> id=<span style="color: #ff0000;">&quot;dataGroup&quot;</span> itemRenderer=<span style="color: #ff0000;">&quot;spark.skins.spark.DefaultItemRenderer&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:layout</span><span style="color: #7400FF;">&gt;</span></span>
                        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:VerticalLayout</span> gap=<span style="color: #ff0000;">&quot;0&quot;</span> horizontalAlign=<span style="color: #ff0000;">&quot;contentJustify&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
                    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:layout</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:DataGroup</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Scroller</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>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:PopUpAnchor</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!--- The anchor button used by the DropDownList. The default skin is DropDownListButtonSkin. --&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> id=<span style="color: #ff0000;">&quot;openButton&quot;</span> left=<span style="color: #ff0000;">&quot;0&quot;</span> right=<span style="color: #ff0000;">&quot;0&quot;</span> top=<span style="color: #ff0000;">&quot;0&quot;</span> bottom=<span style="color: #ff0000;">&quot;0&quot;</span> focusEnabled=<span style="color: #ff0000;">&quot;false&quot;</span></span>
<span style="color: #000000;">            skinClass=<span style="color: #ff0000;">&quot;spark.skins.spark.DropDownListButtonSkin&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>  
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> source=<span style="color: #ff0000;">&quot;{hostComponent.selectedItem.source}&quot;</span></span>
<span style="color: #000000;">        left=<span style="color: #ff0000;">&quot;10&quot;</span> right=<span style="color: #ff0000;">&quot;30&quot;</span> top=<span style="color: #ff0000;">&quot;10&quot;</span> bottom=<span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Skin</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="information"><a href="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_DropDownList_itemRenderer_test/bin/srcview/">View source</a> is enabled in the following example.</p>
<p><iframe src="http://blog.flexexamples.com/wp-content/uploads/spark/Spark_DropDownList_itemRenderer_test/bin/main.html" width="100%" height="300"></iframe></p>
<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Displaying images in a Spark DropDownList control in Flex 4 on FlexExamples.com',url: 'http://blog.flexexamples.com/2009/04/14/displaying-images-in-a-spark-dropdownlist-control-in-flex-gumbo/',contentID: 'post-1048',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,itemRenderer,skinClass',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2009/04/14/displaying-images-in-a-spark-dropdownlist-control-in-flex-gumbo/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Rotating an image along its x-axis, y-axis, and z-axis in Flex 4 and Flash Player 10</title>
		<link>http://blog.flexexamples.com/2008/08/02/rotating-an-image-along-its-x-axis-y-axis-and-z-axis-in-flex-and-flash-player-10/</link>
		<comments>http://blog.flexexamples.com/2008/08/02/rotating-an-image-along-its-x-axis-y-axis-and-z-axis-in-flex-and-flash-player-10/#comments</comments>
		<pubDate>Sat, 02 Aug 2008 17:59:09 +0000</pubDate>
		<dc:creator>Peter deHaan</dc:creator>
				<category><![CDATA[BitmapImage (Spark)]]></category>
		<category><![CDATA[Flex4]]></category>
		<category><![CDATA[Gumbo]]></category>
		<category><![CDATA[rotationX]]></category>
		<category><![CDATA[rotationY]]></category>
		<category><![CDATA[rotationZ]]></category>

		<guid isPermaLink="false">http://blog.flexexamples.com/2008/08/02/rotating-an-image-along-its-x-axis-y-axis-and-z-axis-in-flex-and-flash-player-10/</guid>
		<description><![CDATA[<p>The following example shows how you can rotate a Flex Image control along its x-axis, y-axis, and z-axis using the new rotationX, rotationY, and rotationZ properties in Flash Player 10 and Flex 4.</p> <p></p> &#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62; &#60;!-- http://blog.flexexamples.com/2008/08/02/rotating-an-image-along-its-x-axis-y-axis-and-z-axis-in-flex-and-flash-player-10/ --&#62; &#60;s:Application name=&#34;Spark_BitmapImage_rotationX_test&#34; xmlns:fx=&#34;http://ns.adobe.com/mxml/2009&#34; xmlns:s=&#34;library://ns.adobe.com/flex/spark&#34; xmlns:mx=&#34;library://ns.adobe.com/flex/mx&#34;&#62; &#60;s:controlBarContent&#62; &#60;mx:Form styleName=&#34;plain&#34; backgroundAlpha=&#34;0.0&#34;&#62; &#60;mx:FormItem label=&#34;rotationX:&#34; direction=&#34;horizontal&#34;&#62; &#60;s:HSlider id=&#34;rXSlider&#34; minimum=&#34;-360&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>The following example shows how you can rotate a Flex Image control along its x-axis, y-axis, and z-axis using the new <code>rotationX</code>, <code>rotationY</code>, and <code>rotationZ</code> properties in Flash Player 10 and Flex 4.</p>
<p><span id="more-727"></span></p>
<p class="alert">The following example(s) require Flash Player 10 and the Adobe Flex 4 SDK. To download the Adobe Flash Builder 4 trial, see <a href="http://bit.ly/crThlI">http://www.adobe.com/products/flex/</a>. To download the latest nightly build of the Flex 4 SDK, see <a href="http://bit.ly/Flex4SDK">http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4</a>.<br/><strong>For more information on getting started with Flex 4 and Flash Builder 4, see the official <a href="http://bit.ly/dCkecm">Adobe Flex Team blog</a>.</strong></p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2008/08/02/rotating-an-image-along-its-x-axis-y-axis-and-z-axis-in-flex-and-flash-player-10/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Application</span> name=<span style="color: #ff0000;">&quot;Spark_BitmapImage_rotationX_test&quot;</span></span>
<span style="color: #000000;">        xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">        xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/mx&quot;</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:controlBarContent</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Form</span> styleName=<span style="color: #ff0000;">&quot;plain&quot;</span> backgroundAlpha=<span style="color: #ff0000;">&quot;0.0&quot;</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;rotationX:&quot;</span> direction=<span style="color: #ff0000;">&quot;horizontal&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HSlider</span> id=<span style="color: #ff0000;">&quot;rXSlider&quot;</span></span>
<span style="color: #000000;">                        minimum=<span style="color: #ff0000;">&quot;-360&quot;</span> maximum=<span style="color: #ff0000;">&quot;360&quot;</span></span>
<span style="color: #000000;">                        value=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">                        snapInterval=<span style="color: #ff0000;">&quot;2&quot;</span></span>
<span style="color: #000000;">                        width=<span style="color: #ff0000;">&quot;180&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;img.rotationX = rXSlider.value;&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;{rXSlider.value}&quot;</span> width=<span style="color: #ff0000;">&quot;30&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;rotationY:&quot;</span> direction=<span style="color: #ff0000;">&quot;horizontal&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HSlider</span> id=<span style="color: #ff0000;">&quot;rYSlider&quot;</span></span>
<span style="color: #000000;">                        minimum=<span style="color: #ff0000;">&quot;-360&quot;</span> maximum=<span style="color: #ff0000;">&quot;360&quot;</span></span>
<span style="color: #000000;">                        value=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">                        snapInterval=<span style="color: #ff0000;">&quot;2&quot;</span></span>
<span style="color: #000000;">                        width=<span style="color: #ff0000;">&quot;180&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;img.rotationY = rYSlider.value;&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;{rYSlider.value}&quot;</span> width=<span style="color: #ff0000;">&quot;30&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:FormItem</span> label=<span style="color: #ff0000;">&quot;rotationZ:&quot;</span> direction=<span style="color: #ff0000;">&quot;horizontal&quot;</span><span style="color: #7400FF;">&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HSlider</span> id=<span style="color: #ff0000;">&quot;rZSlider&quot;</span></span>
<span style="color: #000000;">                        minimum=<span style="color: #ff0000;">&quot;-360&quot;</span> maximum=<span style="color: #ff0000;">&quot;360&quot;</span></span>
<span style="color: #000000;">                        value=<span style="color: #ff0000;">&quot;0&quot;</span></span>
<span style="color: #000000;">                        snapInterval=<span style="color: #ff0000;">&quot;2&quot;</span></span>
<span style="color: #000000;">                        width=<span style="color: #ff0000;">&quot;180&quot;</span></span>
<span style="color: #000000;">                        change=<span style="color: #ff0000;">&quot;img.rotationZ = rZSlider.value;&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
                <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> text=<span style="color: #ff0000;">&quot;{rZSlider.value}&quot;</span> width=<span style="color: #ff0000;">&quot;30&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:FormItem</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Form</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Button</span> label=<span style="color: #ff0000;">&quot;Reset&quot;</span> click=<span style="color: #ff0000;">&quot;reset();&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:controlBarContent</span><span style="color: #7400FF;">&gt;</span></span>
&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;">            private function reset<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">                rXSlider.value = <span style="color: #cc66cc;">0</span>;</span>
<span style="color: #000000;">                rYSlider.value = <span style="color: #cc66cc;">0</span>;</span>
<span style="color: #000000;">                rZSlider.value = <span style="color: #cc66cc;">0</span>;</span>
<span style="color: #000000;">                img.rotationX = <span style="color: #cc66cc;">0</span>;</span>
<span style="color: #000000;">                img.rotationY = <span style="color: #cc66cc;">0</span>;</span>
<span style="color: #000000;">                img.rotationZ = <span style="color: #cc66cc;">0</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;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:BitmapImage</span> id=<span style="color: #ff0000;">&quot;img&quot;</span></span>
<span style="color: #000000;">            source=<span style="color: #ff0000;">&quot;@Embed('assets/Fx.jpg')&quot;</span></span>
<span style="color: #000000;">            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p class="information"><a href="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_BitmapImage_rotationX_test/srcview/index.html">View source</a> is enabled in the following example.</p>
<p><iframe src="http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_BitmapImage_rotationX_test/main.html" width="100%" height="400"></iframe></p>
<p class="alert">This entry is based on a beta version of the Flex 4 SDK and therefore is very likely to change as development of the Flex SDK continues. The API can (and will) change causing examples to possibly not compile in newer versions of the Flex 4 SDK.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Rotating an image along its x-axis, y-axis, and z-axis in Flex 4 and Flash Player 10 on FlexExamples.com',url: 'http://blog.flexexamples.com/2008/08/02/rotating-an-image-along-its-x-axis-y-axis-and-z-axis-in-flex-and-flash-player-10/',contentID: 'post-727',code: 'Pete9667',suggestNotebook: 'FlexExamples',suggestTags: 'Gumbo,rotationX,rotationY,rotationZ',providerName: 'FlexExamples.com',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper-remember.png" class="evernoteSiteMemoryButton" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div>]]></content:encoded>
			<wfw:commentRss>http://blog.flexexamples.com/2008/08/02/rotating-an-image-along-its-x-axis-y-axis-and-z-axis-in-flex-and-flash-player-10/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

