<?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{er} &#187; Spark</title>
	<atom:link href="http://www.flexer.info/category/spark/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flexer.info</link>
	<description>flex developers web corner</description>
	<lastBuildDate>Mon, 26 Jul 2010 17:54:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<image>
  <link>http://www.flexer.info</link>
  <url>http://www.flexer.info/favicon.ico</url>
  <title>FLEX{er}</title>
</image>
		<item>
		<title>Meet Hero&#8230; The Next Flex SDK Release</title>
		<link>http://www.flexer.info/2010/07/14/meet-hero-the-next-flex-sdk-release/</link>
		<comments>http://www.flexer.info/2010/07/14/meet-hero-the-next-flex-sdk-release/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 19:25:58 +0000</pubDate>
		<dc:creator>Andrei Ionescu</dc:creator>
				<category><![CDATA[Flex 4 SDK]]></category>
		<category><![CDATA[Flex in the world]]></category>
		<category><![CDATA[Flex news]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Spark]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flash platform]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[flex sdk 4]]></category>
		<category><![CDATA[MXML]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=1670</guid>
		<description><![CDATA[The next release of Flex SDK is code-named Hero. It has three main goals:

Multi-Screen Development: Allow developers to build applications that target the web, desktop or mobile devices using a single unified framework.
Spark Maturation: Polish and grow the Spark architecture by adding new Spark components and capabilities.
Large-Application Development: Support developers building large applications by improving [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.flexer.info%2F2010%2F07%2F14%2Fmeet-hero-the-next-flex-sdk-release%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.flexer.info%2F2010%2F07%2F14%2Fmeet-hero-the-next-flex-sdk-release%2F" height="61" width="51" /></a></div><div style="float: right; margin-right: 10px"><a class="google_buzz"  
href="http://www.google.com/reader/link?url=http://www.flexer.info/2010/07/14/meet-hero-the-next-flex-sdk-release/&title=Meet+Hero&#8230;+The+Next+Flex+SDK+Release&srcURL=http://www.flexer.info" target="_blank" rel="nofollow"><img
src="http://www.flexer.info/wp-content/plugins/google-buzz-button-for-wordpress/images/google-buzz.png" alt="Google Buzz" /></a></div><p>The next release of Flex SDK is <a href="http://opensource.adobe.com/wiki/display/flexsdk/Hero" target="_blank">code-named Hero</a>. It has three main goals:</p>
<ul class="ul">
<li><strong>Multi-Screen Development:</strong> Allow developers to build applications that target the web, desktop or mobile devices using a single unified framework.</li>
<li><strong>Spark Maturation: </strong>Polish and grow the Spark architecture by adding new Spark components and capabilities.</li>
<li><strong>Large-Application Development:</strong> Support developers building large applications by improving fundamental Flex infrastructure pieces.</li>
</ul>
<p>Previously, Flex for mobile was a separate branch code-named Slider. The rapid increases in performance on smartphone and the optimized performance of Adobe runtimes on these devices, now make it feasible to support Flex framework directly on mobile devices.</p>
<p>You can find out more reading this <a href="http://blogs.adobe.com/flex/archives/2010/06/introducinghero.html" target="_blank">article on the official Flex team blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2010/07/14/meet-hero-the-next-flex-sdk-release/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to skin a button with icon in Flex 4 SDK &#8211; spark</title>
		<link>http://www.flexer.info/2009/06/12/how-to-skin-a-button-with-icon-in-flex-4-sdk-spark/</link>
		<comments>http://www.flexer.info/2009/06/12/how-to-skin-a-button-with-icon-in-flex-4-sdk-spark/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 13:23:29 +0000</pubDate>
		<dc:creator>Stelian Crisan</dc:creator>
				<category><![CDATA[Flex 4 SDK]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Skin]]></category>
		<category><![CDATA[Spark]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[icon]]></category>
		<category><![CDATA[icon button]]></category>
		<category><![CDATA[round button]]></category>
		<category><![CDATA[round corners]]></category>
		<category><![CDATA[sdk 4]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=903</guid>
		<description><![CDATA[It&#8217;s recommended to use same SDK version components in same file, so I skin a button in Flex SDK 4 using only Spark components.
In Halo we use to add an icon to a button using icon property:

    &#60;mx:Button width=&#34;120&#34;
        icon=&#34;@Embed(source='ico/add-blue.gif')&#34; 		
     [...]]]></description>
			<content:encoded><![CDATA[<div class='series_toc'><h3>Table of contents<!-- for Spark Skinning --></h3><ol><li><a href='http://www.flexer.info/2009/06/11/how-to-skin-a-container-with-padding-in-flex-4-sdk-spark/' title='How to skin a container with padding in Flex 4 SDK &#8211; Spark'>How to skin a container with padding in Flex 4 SDK &#8211; Spark</a></li><li>How to skin a button with icon in Flex 4 SDK &#8211; spark</li></ol></div> <div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.flexer.info%2F2009%2F06%2F12%2Fhow-to-skin-a-button-with-icon-in-flex-4-sdk-spark%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.flexer.info%2F2009%2F06%2F12%2Fhow-to-skin-a-button-with-icon-in-flex-4-sdk-spark%2F" height="61" width="51" /></a></div><div style="float: right; margin-right: 10px"><a class="google_buzz"  
href="http://www.google.com/reader/link?url=http://www.flexer.info/2009/06/12/how-to-skin-a-button-with-icon-in-flex-4-sdk-spark/&title=How+to+skin+a+button+with+icon+in+Flex+4+SDK+&#8211;+spark&srcURL=http://www.flexer.info" target="_blank" rel="nofollow"><img
src="http://www.flexer.info/wp-content/plugins/google-buzz-button-for-wordpress/images/google-buzz.png" alt="Google Buzz" /></a></div><p>It&#8217;s recommended to use same SDK version components in same file, so I skin a button in Flex SDK 4 using only Spark components.</p>
<p>In Halo we use to add an icon to a button using icon property:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">    <span style="color: #66cc66;">&lt;</span>mx:<span style="color: #0066CC;">Button</span> <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;120&quot;</span>
        icon=<span style="color: #ff0000;">&quot;@Embed(source='ico/add-blue.gif')&quot;</span> 		
        label=<span style="color: #ff0000;">&quot;New comment&quot;</span> <span style="color: #66cc66;">/&gt;</span></pre></div></div>

<p>In Spark we have to skin our button in order to put an icon on the button. I made a skin for a button with round corners and an icon that will be changed as well as background color on different states.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&lt;</span>?<span style="color: #0066CC;">xml</span> <span style="color: #0066CC;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;</span>s:SparkSkin 
    xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> 
    xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span>  
    alpha.<span style="color: #006600;">disabled</span>=<span style="color: #ff0000;">&quot;0.5&quot;</span><span style="color: #66cc66;">&gt;</span> 
&nbsp;
     <span style="color: #66cc66;">&lt;</span>fx:Metadata<span style="color: #66cc66;">&gt;</span> 
        <span style="color: #66cc66;">&#91;</span>HostComponent<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;spark.components.Button&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span> 
    <span style="color: #66cc66;">&lt;/</span>fx:Metadata<span style="color: #66cc66;">&gt;</span> 
&nbsp;
    <span style="color: #66cc66;">&lt;</span>fx:Script<span style="color: #66cc66;">&gt;</span> 
        <span style="color: #66cc66;">&lt;!</span><span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span>         
            <span style="color: #0066CC;">static</span> <span style="color: #0066CC;">private</span> const exclusions:<span style="color: #0066CC;">Array</span> = <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;labelElement&quot;</span><span style="color: #66cc66;">&#93;</span>; 
            override <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> colorizeExclusions<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Array</span>
            <span style="color: #66cc66;">&#123;</span>
            	<span style="color: #b1b100;">return</span> exclusions;
            <span style="color: #66cc66;">&#125;</span> 
        <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&gt;</span>        
    <span style="color: #66cc66;">&lt;/</span>fx:Script<span style="color: #66cc66;">&gt;</span> 
&nbsp;
    <span style="color: #66cc66;">&lt;</span>s:states<span style="color: #66cc66;">&gt;</span> 
        <span style="color: #66cc66;">&lt;</span>s:State <span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;up&quot;</span> <span style="color: #66cc66;">/&gt;</span> 
        <span style="color: #66cc66;">&lt;</span>s:State <span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;over&quot;</span> <span style="color: #66cc66;">/&gt;</span> 
        <span style="color: #66cc66;">&lt;</span>s:State <span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;down&quot;</span> <span style="color: #66cc66;">/&gt;</span> 
        <span style="color: #66cc66;">&lt;</span>s:State <span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;disabled&quot;</span> <span style="color: #66cc66;">/&gt;</span> 
    <span style="color: #66cc66;">&lt;/</span>s:states<span style="color: #66cc66;">&gt;</span>  
&nbsp;
    <span style="color: #66cc66;">&lt;!</span>-- <span style="color: #0066CC;">UP</span> SKIN--<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>s:Rect radiusX=<span style="color: #ff0000;">&quot;8&quot;</span> radiusY=<span style="color: #ff0000;">&quot;8&quot;</span> <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;120&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;30&quot;</span> includeIn=<span style="color: #ff0000;">&quot;up&quot;</span> <span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>s:stroke<span style="color: #66cc66;">&gt;</span>
    	<span style="color: #66cc66;">&lt;</span>s:Stroke <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#999999&quot;</span> alpha=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #66cc66;">/&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>s:stroke<span style="color: #66cc66;">&gt;</span> 
         <span style="color: #66cc66;">&lt;</span>s:fill<span style="color: #66cc66;">&gt;</span> 
              <span style="color: #66cc66;">&lt;</span>s:LinearGradient rotation=<span style="color: #ff0000;">&quot;90&quot;</span><span style="color: #66cc66;">&gt;</span> 
                   <span style="color: #66cc66;">&lt;</span>s:entries<span style="color: #66cc66;">&gt;</span>  
                        <span style="color: #66cc66;">&lt;</span>s:GradientEntry ratio=<span style="color: #ff0000;">&quot;0&quot;</span> alpha=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#EE9819&quot;</span><span style="color: #66cc66;">/&gt;</span>
                   		<span style="color: #66cc66;">&lt;</span>s:GradientEntry ratio=<span style="color: #ff0000;">&quot;1&quot;</span> alpha=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#FAE38F&quot;</span><span style="color: #66cc66;">/&gt;</span>
                  		<span style="color: #66cc66;">&lt;</span>s:GradientEntry ratio=<span style="color: #ff0000;">&quot;0&quot;</span> alpha=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#FFFFFF&quot;</span><span style="color: #66cc66;">/&gt;</span>
                  		<span style="color: #66cc66;">&lt;</span>s:GradientEntry ratio=<span style="color: #ff0000;">&quot;1&quot;</span> alpha=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#FFFFFF&quot;</span><span style="color: #66cc66;">/&gt;</span> 
                   <span style="color: #66cc66;">&lt;/</span>s:entries<span style="color: #66cc66;">&gt;</span> 
              <span style="color: #66cc66;">&lt;/</span>s:LinearGradient<span style="color: #66cc66;">&gt;</span> 
         <span style="color: #66cc66;">&lt;/</span>s:fill<span style="color: #66cc66;">&gt;</span> 
    <span style="color: #66cc66;">&lt;/</span>s:Rect<span style="color: #66cc66;">&gt;</span>
&nbsp;
    <span style="color: #66cc66;">&lt;!</span>-- Over SKIN--<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>s:Rect radiusX=<span style="color: #ff0000;">&quot;8&quot;</span> radiusY=<span style="color: #ff0000;">&quot;8&quot;</span> <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;120&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;30&quot;</span> includeIn=<span style="color: #ff0000;">&quot;over&quot;</span> <span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>s:stroke<span style="color: #66cc66;">&gt;</span>
    	<span style="color: #66cc66;">&lt;</span>s:Stroke <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#999999&quot;</span> alpha=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #66cc66;">/&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>s:stroke<span style="color: #66cc66;">&gt;</span> 
        <span style="color: #66cc66;">&lt;</span>s:fill<span style="color: #66cc66;">&gt;</span> 
              <span style="color: #66cc66;">&lt;</span>s:LinearGradient rotation=<span style="color: #ff0000;">&quot;90&quot;</span><span style="color: #66cc66;">&gt;</span> 
                   <span style="color: #66cc66;">&lt;</span>s:entries<span style="color: #66cc66;">&gt;</span> 
                        <span style="color: #66cc66;">&lt;</span>s:GradientEntry ratio=<span style="color: #ff0000;">&quot;0&quot;</span> alpha=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#8EB3E7&quot;</span><span style="color: #66cc66;">/&gt;</span>
                    	<span style="color: #66cc66;">&lt;</span>s:GradientEntry ratio=<span style="color: #ff0000;">&quot;1&quot;</span> alpha=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#DCEBFE&quot;</span><span style="color: #66cc66;">/&gt;</span>
                   	 	<span style="color: #66cc66;">&lt;</span>s:GradientEntry ratio=<span style="color: #ff0000;">&quot;0&quot;</span> alpha=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#FFFFFF&quot;</span><span style="color: #66cc66;">/&gt;</span>
                    	<span style="color: #66cc66;">&lt;</span>s:GradientEntry ratio=<span style="color: #ff0000;">&quot;1&quot;</span> alpha=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#FFFFFF&quot;</span><span style="color: #66cc66;">/&gt;</span> 
                   <span style="color: #66cc66;">&lt;/</span>s:entries<span style="color: #66cc66;">&gt;</span> 
              <span style="color: #66cc66;">&lt;/</span>s:LinearGradient<span style="color: #66cc66;">&gt;</span> 
         <span style="color: #66cc66;">&lt;/</span>s:fill<span style="color: #66cc66;">&gt;</span> 
    <span style="color: #66cc66;">&lt;/</span>s:Rect<span style="color: #66cc66;">&gt;</span>
&nbsp;
    <span style="color: #66cc66;">&lt;!</span>-- <span style="color: #0066CC;">DOWN</span> SKIN--<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>s:Rect radiusX=<span style="color: #ff0000;">&quot;8&quot;</span> radiusY=<span style="color: #ff0000;">&quot;8&quot;</span> <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;120&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;30&quot;</span> includeIn=<span style="color: #ff0000;">&quot;down&quot;</span> <span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>s:stroke<span style="color: #66cc66;">&gt;</span>
    	<span style="color: #66cc66;">&lt;</span>s:Stroke <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#999999&quot;</span> alpha=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #66cc66;">/&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>s:stroke<span style="color: #66cc66;">&gt;</span> 
        <span style="color: #66cc66;">&lt;</span>s:fill<span style="color: #66cc66;">&gt;</span> 
              <span style="color: #66cc66;">&lt;</span>s:LinearGradient rotation=<span style="color: #ff0000;">&quot;-90&quot;</span><span style="color: #66cc66;">&gt;</span> 
                   <span style="color: #66cc66;">&lt;</span>s:entries<span style="color: #66cc66;">&gt;</span> 
                        <span style="color: #66cc66;">&lt;</span>s:GradientEntry ratio=<span style="color: #ff0000;">&quot;0&quot;</span> alpha=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#8EB3E7&quot;</span><span style="color: #66cc66;">/&gt;</span>
                    	<span style="color: #66cc66;">&lt;</span>s:GradientEntry ratio=<span style="color: #ff0000;">&quot;1&quot;</span> alpha=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#DCEBFE&quot;</span><span style="color: #66cc66;">/&gt;</span>
                   	 	<span style="color: #66cc66;">&lt;</span>s:GradientEntry ratio=<span style="color: #ff0000;">&quot;0&quot;</span> alpha=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#FFFFFF&quot;</span><span style="color: #66cc66;">/&gt;</span>
                    	<span style="color: #66cc66;">&lt;</span>s:GradientEntry ratio=<span style="color: #ff0000;">&quot;1&quot;</span> alpha=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#FFFFFF&quot;</span><span style="color: #66cc66;">/&gt;</span>  
                   <span style="color: #66cc66;">&lt;/</span>s:entries<span style="color: #66cc66;">&gt;</span> 
              <span style="color: #66cc66;">&lt;/</span>s:LinearGradient<span style="color: #66cc66;">&gt;</span> 
         <span style="color: #66cc66;">&lt;/</span>s:fill<span style="color: #66cc66;">&gt;</span> 
    <span style="color: #66cc66;">&lt;/</span>s:Rect<span style="color: #66cc66;">&gt;</span>
&nbsp;
    <span style="color: #66cc66;">&lt;!</span>-- <span style="color: #0066CC;">UP</span> ICON --<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>s:BitmapImage source=<span style="color: #ff0000;">&quot;@Embed('ico/add-blue.gif')&quot;</span> 
    	verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #0066CC;">left</span>=<span style="color: #ff0000;">&quot;5&quot;</span> includeIn=<span style="color: #ff0000;">&quot;up&quot;</span> <span style="color: #66cc66;">/&gt;</span>
&nbsp;
    <span style="color: #66cc66;">&lt;!</span>-- OVER ICON --<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>s:BitmapImage source=<span style="color: #ff0000;">&quot;@Embed('ico/add-green.gif')&quot;</span> 
    	verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #0066CC;">left</span>=<span style="color: #ff0000;">&quot;5&quot;</span> includeIn=<span style="color: #ff0000;">&quot;over&quot;</span> <span style="color: #66cc66;">/&gt;</span>
&nbsp;
    <span style="color: #66cc66;">&lt;!</span>-- <span style="color: #0066CC;">DOWN</span> ICON --<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>s:BitmapImage source=<span style="color: #ff0000;">&quot;@Embed('ico/add-red.gif')&quot;</span> 
    	verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #0066CC;">left</span>=<span style="color: #ff0000;">&quot;5&quot;</span> includeIn=<span style="color: #ff0000;">&quot;down&quot;</span> <span style="color: #66cc66;">/&gt;</span>
&nbsp;
    <span style="color: #66cc66;">&lt;!</span>-- <span style="color: #0066CC;">Text</span> SKIN--<span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>s:SimpleText id=<span style="color: #ff0000;">&quot;labelElement&quot;</span> 
             textAlign=<span style="color: #ff0000;">&quot;center&quot;</span> 
             verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span> 
             lineBreak=<span style="color: #ff0000;">&quot;toFit&quot;</span> 
             truncation=<span style="color: #ff0000;">&quot;1&quot;</span> 
             <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;0x000099&quot;</span>
             horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;1&quot;</span> 
             <span style="color: #0066CC;">left</span>=<span style="color: #ff0000;">&quot;25&quot;</span> <span style="color: #0066CC;">right</span>=<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: #66cc66;">&gt;</span> 
    <span style="color: #66cc66;">&lt;/</span>s:SimpleText<span style="color: #66cc66;">&gt;</span> 
&nbsp;
<span style="color: #66cc66;">&lt;/</span>s:SparkSkin <span style="color: #66cc66;">&gt;</span></pre></div></div>

<p>I&#8217;m not a good designer but I will make a round button, just as an example, in order to see how to skin a button, and to let you understand the Flex SDK 4 graphic possibilities:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&lt;</span>?<span style="color: #0066CC;">xml</span> <span style="color: #0066CC;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #66cc66;">&gt;</span> 
<span style="color: #66cc66;">&lt;</span>s:SparkSkin 
	xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> 
	xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> 
	minWidth=<span style="color: #ff0000;">&quot;60&quot;</span> minHeight=<span style="color: #ff0000;">&quot;60&quot;</span> 
	alpha.<span style="color: #006600;">disabled</span>=<span style="color: #ff0000;">&quot;0.5&quot;</span><span style="color: #66cc66;">&gt;</span> 
&nbsp;
	<span style="color: #66cc66;">&lt;</span>fx:Metadata<span style="color: #66cc66;">&gt;</span> 
		<span style="color: #66cc66;">&#91;</span>HostComponent<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;spark.components.Button&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span> 
	<span style="color: #66cc66;">&lt;/</span>fx:Metadata<span style="color: #66cc66;">&gt;</span> 
&nbsp;
	<span style="color: #66cc66;">&lt;</span>fx:Script<span style="color: #66cc66;">&gt;</span> 
	<span style="color: #66cc66;">&lt;!</span><span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span>         
		<span style="color: #0066CC;">static</span> <span style="color: #0066CC;">private</span> const exclusions:<span style="color: #0066CC;">Array</span> = <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;labelElement&quot;</span><span style="color: #66cc66;">&#93;</span>; 
		override <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> colorizeExclusions<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Array</span> 
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> exclusions;
		<span style="color: #66cc66;">&#125;</span> 
	<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&gt;</span>        
	<span style="color: #66cc66;">&lt;/</span>fx:Script<span style="color: #66cc66;">&gt;</span> 
&nbsp;
	<span style="color: #66cc66;">&lt;</span>s:states<span style="color: #66cc66;">&gt;</span> 
		<span style="color: #66cc66;">&lt;</span>s:State <span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;up&quot;</span> <span style="color: #66cc66;">/&gt;</span> 
		<span style="color: #66cc66;">&lt;</span>s:State <span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;over&quot;</span> <span style="color: #66cc66;">/&gt;</span> 
		<span style="color: #66cc66;">&lt;</span>s:State <span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;down&quot;</span> <span style="color: #66cc66;">/&gt;</span> 
		<span style="color: #66cc66;">&lt;</span>s:State <span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;disabled&quot;</span> <span style="color: #66cc66;">/&gt;</span> 
	<span style="color: #66cc66;">&lt;/</span>s:states<span style="color: #66cc66;">&gt;</span> 
&nbsp;
	<span style="color: #66cc66;">&lt;</span>s:Ellipse <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;100%&quot;</span><span style="color: #66cc66;">&gt;</span>
&nbsp;
		<span style="color: #66cc66;">&lt;</span>s:stroke<span style="color: #66cc66;">&gt;</span>
			<span style="color: #66cc66;">&lt;</span>s:Stroke <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#cccccc&quot;</span> alpha=<span style="color: #ff0000;">&quot;1&quot;</span> weight=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #66cc66;">/&gt;</span> 
		<span style="color: #66cc66;">&lt;/</span>s:stroke<span style="color: #66cc66;">&gt;</span> 
&nbsp;
		<span style="color: #66cc66;">&lt;</span>s:fill.<span style="color: #006600;">up</span><span style="color: #66cc66;">&gt;</span> 
			<span style="color: #66cc66;">&lt;</span>s:RadialGradient<span style="color: #66cc66;">&gt;</span> 
				<span style="color: #66cc66;">&lt;</span>s:entries<span style="color: #66cc66;">&gt;</span>  
					<span style="color: #66cc66;">&lt;</span>s:GradientEntry <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;0x0000AA&quot;</span> 
						ratio=<span style="color: #ff0000;">&quot;0&quot;</span> alpha=<span style="color: #ff0000;">&quot;.5&quot;</span><span style="color: #66cc66;">/&gt;</span> 
					<span style="color: #66cc66;">&lt;</span>s:GradientEntry <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;0xAAAAAA&quot;</span> 
						ratio=<span style="color: #ff0000;">&quot;0.8&quot;</span> alpha=<span style="color: #ff0000;">&quot;.5&quot;</span><span style="color: #66cc66;">/&gt;</span> 
				<span style="color: #66cc66;">&lt;/</span>s:entries<span style="color: #66cc66;">&gt;</span> 
			<span style="color: #66cc66;">&lt;/</span>s:RadialGradient<span style="color: #66cc66;">&gt;</span> 
		<span style="color: #66cc66;">&lt;/</span>s:fill.<span style="color: #006600;">up</span><span style="color: #66cc66;">&gt;</span>  
&nbsp;
		<span style="color: #66cc66;">&lt;</span>s:fill.<span style="color: #006600;">over</span><span style="color: #66cc66;">&gt;</span>  
			<span style="color: #66cc66;">&lt;</span>s:RadialGradient<span style="color: #66cc66;">&gt;</span> 
				<span style="color: #66cc66;">&lt;</span>s:entries<span style="color: #66cc66;">&gt;</span>  
					<span style="color: #66cc66;">&lt;</span>s:GradientEntry <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;0xAA0000&quot;</span> 
						ratio=<span style="color: #ff0000;">&quot;0&quot;</span> alpha=<span style="color: #ff0000;">&quot;.5&quot;</span><span style="color: #66cc66;">/&gt;</span> 
					<span style="color: #66cc66;">&lt;</span>s:GradientEntry <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;0xAAAAAA&quot;</span> 
						ratio=<span style="color: #ff0000;">&quot;0.8&quot;</span> alpha=<span style="color: #ff0000;">&quot;.5&quot;</span><span style="color: #66cc66;">/&gt;</span> 
				<span style="color: #66cc66;">&lt;/</span>s:entries<span style="color: #66cc66;">&gt;</span> 
			<span style="color: #66cc66;">&lt;/</span>s:RadialGradient<span style="color: #66cc66;">&gt;</span> 
		<span style="color: #66cc66;">&lt;/</span>s:fill.<span style="color: #006600;">over</span><span style="color: #66cc66;">&gt;</span>  
&nbsp;
		<span style="color: #66cc66;">&lt;</span>s:fill.<span style="color: #006600;">down</span><span style="color: #66cc66;">&gt;</span>  
			<span style="color: #66cc66;">&lt;</span>s:RadialGradient<span style="color: #66cc66;">&gt;</span> 
				<span style="color: #66cc66;">&lt;</span>s:entries<span style="color: #66cc66;">&gt;</span>  
					<span style="color: #66cc66;">&lt;</span>s:GradientEntry <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;0x00AA00&quot;</span> 
						ratio=<span style="color: #ff0000;">&quot;0&quot;</span> alpha=<span style="color: #ff0000;">&quot;.5&quot;</span><span style="color: #66cc66;">/&gt;</span> 
					<span style="color: #66cc66;">&lt;</span>s:GradientEntry <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;0xAAAAAA&quot;</span> 
						ratio=<span style="color: #ff0000;">&quot;0.9&quot;</span> alpha=<span style="color: #ff0000;">&quot;.5&quot;</span><span style="color: #66cc66;">/&gt;</span> 
				<span style="color: #66cc66;">&lt;/</span>s:entries<span style="color: #66cc66;">&gt;</span> 
			<span style="color: #66cc66;">&lt;/</span>s:RadialGradient<span style="color: #66cc66;">&gt;</span> 
		<span style="color: #66cc66;">&lt;/</span>s:fill.<span style="color: #006600;">down</span><span style="color: #66cc66;">&gt;</span> 
&nbsp;
	<span style="color: #66cc66;">&lt;/</span>s:Ellipse<span style="color: #66cc66;">&gt;</span>
&nbsp;
	<span style="color: #66cc66;">&lt;</span>s:SimpleText id=<span style="color: #ff0000;">&quot;labelElement&quot;</span>  
				  textAlign=<span style="color: #ff0000;">&quot;center&quot;</span> 
				  verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span> 
				  lineBreak=<span style="color: #ff0000;">&quot;toFit&quot;</span> 
				  truncation=<span style="color: #ff0000;">&quot;1&quot;</span> 
				  <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;0xFFFFFF&quot;</span>
				  fontWeight=<span style="color: #ff0000;">&quot;bold&quot;</span>
				  rotation.<span style="color: #0066CC;">up</span>=<span style="color: #ff0000;">&quot;180&quot;</span> rotation.<span style="color: #006600;">over</span>=<span style="color: #ff0000;">&quot;0&quot;</span> 
				  rotation.<span style="color: #0066CC;">down</span>=<span style="color: #ff0000;">&quot;0&quot;</span> rotation.<span style="color: #006600;">disabled</span>=<span style="color: #ff0000;">&quot;180&quot;</span>    
				  horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;1&quot;</span> 
				  <span style="color: #0066CC;">left</span>=<span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #0066CC;">right</span>=<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: #66cc66;">&gt;</span> 
	<span style="color: #66cc66;">&lt;/</span>s:SimpleText<span style="color: #66cc66;">&gt;</span> 
&nbsp;
<span style="color: #66cc66;">&lt;/</span>s:SparkSkin<span style="color: #66cc66;">&gt;</span></pre></div></div>

<p>Please download the project and have a look around.<br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_sparkbuttonskin_1652681233"
			class="flashmovie"
			width="200"
			height="300">
	<param name="movie" value="/wp-content/uploads/2009/06/sparkbuttonskin.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/wp-content/uploads/2009/06/sparkbuttonskin.swf"
			name="fm_sparkbuttonskin_1652681233"
			width="200"
			height="300">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
 <div class='series_links'><a href='http://www.flexer.info/2009/06/11/how-to-skin-a-container-with-padding-in-flex-4-sdk-spark/' title='How to skin a container with padding in Flex 4 SDK &#8211; Spark'>Previous in series</a> </div>]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2009/06/12/how-to-skin-a-button-with-icon-in-flex-4-sdk-spark/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to skin a container with padding in Flex 4 SDK &#8211; Spark</title>
		<link>http://www.flexer.info/2009/06/11/how-to-skin-a-container-with-padding-in-flex-4-sdk-spark/</link>
		<comments>http://www.flexer.info/2009/06/11/how-to-skin-a-container-with-padding-in-flex-4-sdk-spark/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 14:42:13 +0000</pubDate>
		<dc:creator>Stelian Crisan</dc:creator>
				<category><![CDATA[Flex 4 SDK]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Skin]]></category>
		<category><![CDATA[Spark]]></category>
		<category><![CDATA[container]]></category>
		<category><![CDATA[flex sdk 4]]></category>

		<guid isPermaLink="false">http://www.flexer.info/?p=894</guid>
		<description><![CDATA[Now Flash Builder 4 and Flex SDK 4 are available, so we can play around in beta version.
As you probably already know there are same changes regarding skinning from Halo to Spark, I search the web, I read the manual and I think that I got some skills  .
It will be a series of [...]]]></description>
			<content:encoded><![CDATA[<div class='series_toc'><h3>Table of contents<!-- for Spark Skinning --></h3><ol><li>How to skin a container with padding in Flex 4 SDK &#8211; Spark</li><li><a href='http://www.flexer.info/2009/06/12/how-to-skin-a-button-with-icon-in-flex-4-sdk-spark/' title='How to skin a button with icon in Flex 4 SDK &#8211; spark'>How to skin a button with icon in Flex 4 SDK &#8211; spark</a></li></ol></div> <div class="tweetmeme_button" style="float: right; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.flexer.info%2F2009%2F06%2F11%2Fhow-to-skin-a-container-with-padding-in-flex-4-sdk-spark%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.flexer.info%2F2009%2F06%2F11%2Fhow-to-skin-a-container-with-padding-in-flex-4-sdk-spark%2F" height="61" width="51" /></a></div><div style="float: right; margin-right: 10px"><a class="google_buzz"  
href="http://www.google.com/reader/link?url=http://www.flexer.info/2009/06/11/how-to-skin-a-container-with-padding-in-flex-4-sdk-spark/&title=How+to+skin+a+container+with+padding+in+Flex+4+SDK+&#8211;+Spark&srcURL=http://www.flexer.info" target="_blank" rel="nofollow"><img
src="http://www.flexer.info/wp-content/plugins/google-buzz-button-for-wordpress/images/google-buzz.png" alt="Google Buzz" /></a></div><p>Now Flash Builder 4 and Flex SDK 4 are available, so we can play around in beta version.</p>
<p>As you probably already know there are same changes regarding skinning from Halo to Spark, I search the web, I read the manual and I think that I got some skills <img src='http://www.flexer.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>It will be a series of articles regarding skinning in Flex 4 SDK and for know I&#8217;m going to show you a small example about how to skin a container.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&lt;</span>?<span style="color: #0066CC;">xml</span> <span style="color: #0066CC;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;</span>s:Application 
    xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> 
    xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span>
    xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/halo&quot;</span> 
    minWidth=<span style="color: #ff0000;">&quot;450&quot;</span> minHeight=<span style="color: #ff0000;">&quot;250&quot;</span><span style="color: #66cc66;">&gt;</span>
&nbsp;
    <span style="color: #66cc66;">&lt;</span>s:SkinnableContainer 
        horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span>
        minWidth=<span style="color: #ff0000;">&quot;400&quot;</span> minHeight=<span style="color: #ff0000;">&quot;200&quot;</span> 
        skinClass=<span style="color: #ff0000;">&quot;com.flexer.skin.ContainerSkin&quot;</span> <span style="color: #66cc66;">&gt;</span> 
&nbsp;
        <span style="color: #66cc66;">&lt;</span>s:BitmapImage 
            source=<span style="color: #ff0000;">&quot;@Embed('img/fxr.jpg')&quot;</span> 
            <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;100%&quot;</span>
            horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #66cc66;">/&gt;</span>
&nbsp;
    <span style="color: #66cc66;">&lt;/</span>s:SkinnableContainer<span style="color: #66cc66;">&gt;</span> 
&nbsp;
<span style="color: #66cc66;">&lt;/</span>s:Application<span style="color: #66cc66;">&gt;</span></pre></div></div>

<p>As you see there are some changes in name spaces, the Spark components are using <strong>&#8220;s&#8221;</strong>, old Halo components are using <strong>&#8220;mx&#8221;</strong>. You can have both, Spark and Halo, component in the same project.</p>
<p><b>SkinnableContainer</b> it&#8217;s the skinnable container available in Flex 4 and if you want to change the skin you have to use <b>skinClass</b> in order to tell the component where the skin it&#8217;s in the project.</p>
<p>The skinning component it&#8217;s looking like this:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&lt;</span>?<span style="color: #0066CC;">xml</span> <span style="color: #0066CC;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #66cc66;">&gt;</span> 
<span style="color: #66cc66;">&lt;</span>s:SparkSkin 
    xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> 
    xmlns:mx=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/halo&quot;</span> 
    xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> 
    alpha.<span style="color: #006600;">disabled</span>=<span style="color: #ff0000;">&quot;0.5&quot;</span><span style="color: #66cc66;">&gt;</span>
&nbsp;
    <span style="color: #66cc66;">&lt;</span>fx:Metadata<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&#91;</span>HostComponent<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;spark.components.SkinnableContainer&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
    <span style="color: #66cc66;">&lt;/</span>fx:Metadata<span style="color: #66cc66;">&gt;</span> 
&nbsp;
    <span style="color: #66cc66;">&lt;</span>s:states<span style="color: #66cc66;">&gt;</span>
        <span style="color: #66cc66;">&lt;</span>s:State <span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;normal&quot;</span> <span style="color: #66cc66;">/&gt;</span>
        <span style="color: #66cc66;">&lt;</span>s:State <span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;disabled&quot;</span> <span style="color: #66cc66;">/&gt;</span>
    <span style="color: #66cc66;">&lt;/</span>s:states<span style="color: #66cc66;">&gt;</span>
&nbsp;
    <span style="color: #66cc66;">&lt;</span>s:Rect 
        <span style="color: #0066CC;">left</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #0066CC;">right</span>=<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>  
        radiusX=<span style="color: #ff0000;">&quot;20&quot;</span> radiusY=<span style="color: #ff0000;">&quot;20&quot;</span> <span style="color: #66cc66;">&gt;</span>
&nbsp;
        <span style="color: #66cc66;">&lt;</span>s:stroke<span style="color: #66cc66;">&gt;</span>
            <span style="color: #66cc66;">&lt;</span>s:SolidColorStroke <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;0x000099&quot;</span> weight=<span style="color: #ff0000;">&quot;3&quot;</span><span style="color: #66cc66;">/&gt;</span>
        <span style="color: #66cc66;">&lt;/</span>s:stroke<span style="color: #66cc66;">&gt;</span>
&nbsp;
        <span style="color: #66cc66;">&lt;</span>s:fill<span style="color: #66cc66;">&gt;</span> 
            <span style="color: #66cc66;">&lt;</span>s:LinearGradient rotation=<span style="color: #ff0000;">&quot;-90&quot;</span><span style="color: #66cc66;">&gt;</span> 
                <span style="color: #66cc66;">&lt;</span>s:entries<span style="color: #66cc66;">&gt;</span> 
                    <span style="color: #66cc66;">&lt;</span>s:GradientEntry ratio=<span style="color: #ff0000;">&quot;0&quot;</span> alpha=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#8EB3E7&quot;</span><span style="color: #66cc66;">/&gt;</span>
                    <span style="color: #66cc66;">&lt;</span>s:GradientEntry ratio=<span style="color: #ff0000;">&quot;1&quot;</span> alpha=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#DCEBFE&quot;</span><span style="color: #66cc66;">/&gt;</span>
                    <span style="color: #66cc66;">&lt;</span>s:GradientEntry ratio=<span style="color: #ff0000;">&quot;0&quot;</span> alpha=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#FFFFFF&quot;</span><span style="color: #66cc66;">/&gt;</span>
                    <span style="color: #66cc66;">&lt;</span>s:GradientEntry ratio=<span style="color: #ff0000;">&quot;1&quot;</span> alpha=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #0066CC;">color</span>=<span style="color: #ff0000;">&quot;#FFFFFF&quot;</span><span style="color: #66cc66;">/&gt;</span>  
                <span style="color: #66cc66;">&lt;/</span>s:entries<span style="color: #66cc66;">&gt;</span> 
            <span style="color: #66cc66;">&lt;/</span>s:LinearGradient<span style="color: #66cc66;">&gt;</span> 
        <span style="color: #66cc66;">&lt;/</span>s:fill<span style="color: #66cc66;">&gt;</span> 
&nbsp;
    <span style="color: #66cc66;">&lt;/</span>s:Rect<span style="color: #66cc66;">&gt;</span>
&nbsp;
    <span style="color: #66cc66;">&lt;</span>s:Group id=<span style="color: #ff0000;">&quot;contentGroup&quot;</span> 
        <span style="color: #0066CC;">left</span>=<span style="color: #ff0000;">&quot;20&quot;</span> <span style="color: #0066CC;">right</span>=<span style="color: #ff0000;">&quot;20&quot;</span> top=<span style="color: #ff0000;">&quot;20&quot;</span> bottom=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #66cc66;">&gt;</span>
&nbsp;
        <span style="color: #66cc66;">&lt;</span>s:layout<span style="color: #66cc66;">&gt;</span>
            <span style="color: #66cc66;">&lt;</span>s:BasicLayout<span style="color: #66cc66;">/&gt;</span>
        <span style="color: #66cc66;">&lt;/</span>s:layout<span style="color: #66cc66;">&gt;</span> 
&nbsp;
    <span style="color: #66cc66;">&lt;/</span>s:Group<span style="color: #66cc66;">&gt;</span> 
&nbsp;
<span style="color: #66cc66;">&lt;/</span>s:SparkSkin<span style="color: #66cc66;">&gt;</span></pre></div></div>

<p>As you see, it&#8217;s much clear than in SDK 3. </p>
<p><strong>HostComponent</strong> is the component that we want to change. All <strong>states</strong> that you have for this component are declared in states tag.</p>
<p>We also have some graphical elements, a rectangle with a border (3px stroke) and gradient fill for background. All future children of this component will be added into <strong>contentGroup</strong>.</p>
<p>Because for <strong>SkinnableContainer</strong> you can set padding property, we use a little trick ans use left, right, top and bottom property for content group in order to have the padding that we need. </p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_sparkcontainerskin_638985902"
			class="flashmovie"
			width="450"
			height="250">
	<param name="movie" value="/wp-content/uploads/2009/06/sparkcontainerskin.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="/wp-content/uploads/2009/06/sparkcontainerskin.swf"
			name="fm_sparkcontainerskin_638985902"
			width="450"
			height="250">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>More to come.</p>
 <div class='series_links'> <a href='http://www.flexer.info/2009/06/12/how-to-skin-a-button-with-icon-in-flex-4-sdk-spark/' title='How to skin a button with icon in Flex 4 SDK &#8211; spark'>Next in series</a></div>]]></content:encoded>
			<wfw:commentRss>http://www.flexer.info/2009/06/11/how-to-skin-a-container-with-padding-in-flex-4-sdk-spark/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
