<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Changing a slider control&#8217;s thumb skin</title>
	<atom:link href="http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sat, 11 Feb 2012 11:51:51 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: michael</title>
		<link>http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/comment-page-1/#comment-10171</link>
		<dc:creator>michael</dc:creator>
		<pubDate>Wed, 16 Nov 2011 17:33:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/#comment-10171</guid>
		<description>got it :
track-skin: Embed(source=”../images/”);</description>
		<content:encoded><![CDATA[<p>got it :<br />
track-skin: Embed(source=”../images/”);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: michael</title>
		<link>http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/comment-page-1/#comment-10170</link>
		<dc:creator>michael</dc:creator>
		<pubDate>Wed, 16 Nov 2011 17:16:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/#comment-10170</guid>
		<description>simple in flex 4 :

mx&#124;Slider{

	accent-color:#cccccc;
	show-track-highlight:true;
	tick-color:#6f7777;
	data-tip-offset:50; 
thumb-skin:Embed(source=&quot;../images/flex_arrow.png&quot;);

}
but how to change the background skin(image) for the background strip (horizontal line behind the thumb)</description>
		<content:encoded><![CDATA[<p>simple in flex 4 :</p>
<p>mx|Slider{</p>
<p>	accent-color:#cccccc;<br />
	show-track-highlight:true;<br />
	tick-color:#6f7777;<br />
	data-tip-offset:50;<br />
thumb-skin:Embed(source=&#8221;../images/flex_arrow.png&#8221;);</p>
<p>}<br />
but how to change the background skin(image) for the background strip (horizontal line behind the thumb)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: michael</title>
		<link>http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/comment-page-1/#comment-10169</link>
		<dc:creator>michael</dc:creator>
		<pubDate>Wed, 16 Nov 2011 17:14:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/#comment-10169</guid>
		<description>how to change the background skin(image) for the background strip (horizontal line behind the thumb)</description>
		<content:encoded><![CDATA[<p>how to change the background skin(image) for the background strip (horizontal line behind the thumb)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Kakoulides</title>
		<link>http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/comment-page-1/#comment-9114</link>
		<dc:creator>John Kakoulides</dc:creator>
		<pubDate>Thu, 07 Apr 2011 16:32:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/#comment-9114</guid>
		<description>Works in Flex 3.5. Thanks!</description>
		<content:encoded><![CDATA[<p>Works in Flex 3.5. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fall landscapes</title>
		<link>http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/comment-page-1/#comment-8405</link>
		<dc:creator>Fall landscapes</dc:creator>
		<pubDate>Wed, 06 Oct 2010 09:10:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/#comment-8405</guid>
		<description>Great article, thank you very much! By the way, you may do the same by overriding measure() method like this:

package components.parts 
{
    import mx.controls.sliderClasses.SliderThumb;
    import mx.core.mx_internal;
    
    use namespace mx_internal;
   
    public class BigSliderThumb extends SliderThumb {
       
        override protected function measure():void {
            super.measure();
            measuredWidth = currentSkin.measuredWidth;
            measuredHeight = currentSkin.measuredHeight;
        }
    }
}</description>
		<content:encoded><![CDATA[<p>Great article, thank you very much! By the way, you may do the same by overriding measure() method like this:</p>
<p>package components.parts<br />
{<br />
    import mx.controls.sliderClasses.SliderThumb;<br />
    import mx.core.mx_internal;</p>
<p>    use namespace mx_internal;</p>
<p>    public class BigSliderThumb extends SliderThumb {</p>
<p>        override protected function measure():void {<br />
            super.measure();<br />
            measuredWidth = currentSkin.measuredWidth;<br />
            measuredHeight = currentSkin.measuredHeight;<br />
        }<br />
    }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Beach pictures</title>
		<link>http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/comment-page-1/#comment-8404</link>
		<dc:creator>Beach pictures</dc:creator>
		<pubDate>Wed, 06 Oct 2010 09:02:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/#comment-8404</guid>
		<description>Thank you for another great article! 

One side note -- it would be more logical to put &quot;sliderThumbClass&quot; property into the CSS as well.</description>
		<content:encoded><![CDATA[<p>Thank you for another great article! </p>
<p>One side note &#8212; it would be more logical to put &#8220;sliderThumbClass&#8221; property into the CSS as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tsveti</title>
		<link>http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/comment-page-1/#comment-8227</link>
		<dc:creator>tsveti</dc:creator>
		<pubDate>Mon, 16 Aug 2010 21:37:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/#comment-8227</guid>
		<description>&amp;ltmx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; layout=&quot;absolute&quot; xmlns:player=&quot;org.bytearray.gif.player.*&quot;&amp;gt
	&amp;ltmx:HSlider id=&quot;slidersheep&quot;
		change=&quot;MoveSheep()&quot;
        snapInterval=&quot;0.5&quot;
        tickInterval=&quot;10&quot;
        liveDragging=&quot;true&quot;
        showTrackHighlight=&quot;true&quot;
        sliderThumbClass=&quot;BigThumbClass&quot;  width=&quot;732&quot; height=&quot;117&quot;  
        thumbSkin=&quot;@Embed(source=&#039;first.png&#039;)&quot; y=&quot;10&quot; /&amp;gt
	
	&amp;ltmx:Image id=&quot;sec&quot; source=&quot;second.png&quot;  x=&quot;10&quot; y=&quot;189&quot;/&amp;gt</description>
		<content:encoded><![CDATA[<p>&amp;ltmx:Application xmlns:mx=&#8221;http://www.adobe.com/2006/mxml&#8221; layout=&#8221;absolute&#8221; xmlns:player=&#8221;org.bytearray.gif.player.*&#8221;&amp;gt<br />
	&amp;ltmx:HSlider id=&#8221;slidersheep&#8221;<br />
		change=&#8221;MoveSheep()&#8221;<br />
        snapInterval=&#8221;0.5&#8243;<br />
        tickInterval=&#8221;10&#8243;<br />
        liveDragging=&#8221;true&#8221;<br />
        showTrackHighlight=&#8221;true&#8221;<br />
        sliderThumbClass=&#8221;BigThumbClass&#8221;  width=&#8221;732&#8243; height=&#8221;117&#8243;<br />
        thumbSkin=&#8221;@Embed(source=&#8217;first.png&#8217;)&#8221; y=&#8221;10&#8243; /&amp;gt</p>
<p>	&amp;ltmx:Image id=&#8221;sec&#8221; source=&#8221;second.png&#8221;  x=&#8221;10&#8243; y=&#8221;189&#8243;/&amp;gt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tsveti</title>
		<link>http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/comment-page-1/#comment-8224</link>
		<dc:creator>tsveti</dc:creator>
		<pubDate>Mon, 16 Aug 2010 21:32:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/#comment-8224</guid>
		<description>Hi all,
I am really new to flex and I am trying to make a slider with animated thumb(i.e. I want to reload the  thumb in few milliseconds so that it would look like animation). I used the example above to put a picture on the thumb but when I try to change it with setStyle method it&#039;s not changing...If anyone can help...here&#039;s my code:

	
....
	
....
public function MoveSheep():void
			{
				import mx.controls.sliderClasses.SliderThumb;	
				slidersheep.setStyle(&quot;thumbSkin&quot;, &quot;{sec.source}&quot;);
				//Alert.show(&quot;sheep&quot;, slidersheep.getStyle(&quot;thumbSkin.source&quot;));
			}

Alert is indicating the new source but visually, there is no change.
And one more question...if I try to declare picture &quot;sec&quot; in AS I constantly get the error &quot;1114 public attribute can used in this package&quot;.
I know that these are very stupid questions but I can&#039;t fix them :) 
tsveti</description>
		<content:encoded><![CDATA[<p>Hi all,<br />
I am really new to flex and I am trying to make a slider with animated thumb(i.e. I want to reload the  thumb in few milliseconds so that it would look like animation). I used the example above to put a picture on the thumb but when I try to change it with setStyle method it&#8217;s not changing&#8230;If anyone can help&#8230;here&#8217;s my code:</p>
<p>&#8230;.</p>
<p>&#8230;.<br />
public function MoveSheep():void<br />
			{<br />
				import mx.controls.sliderClasses.SliderThumb;<br />
				slidersheep.setStyle(&#8220;thumbSkin&#8221;, &#8220;{sec.source}&#8221;);<br />
				//Alert.show(&#8220;sheep&#8221;, slidersheep.getStyle(&#8220;thumbSkin.source&#8221;));<br />
			}</p>
<p>Alert is indicating the new source but visually, there is no change.<br />
And one more question&#8230;if I try to declare picture &#8220;sec&#8221; in AS I constantly get the error &#8220;1114 public attribute can used in this package&#8221;.<br />
I know that these are very stupid questions but I can&#8217;t fix them :)<br />
tsveti</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: np</title>
		<link>http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/comment-page-1/#comment-7817</link>
		<dc:creator>np</dc:creator>
		<pubDate>Sat, 29 May 2010 07:38:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/#comment-7817</guid>
		<description>That works great! Thank you very much :)</description>
		<content:encoded><![CDATA[<p>That works great! Thank you very much :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/comment-page-1/#comment-7812</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Fri, 28 May 2010 14:03:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2007/09/12/changing-a-slider-controls-thumb-skin/#comment-7812</guid>
		<description>@np,

This works for me in Flex 3.5 SDK. I had to use the &lt;code&gt;updateComplete&lt;/code&gt; because when I tried setting the &lt;code&gt;y&lt;/code&gt; property in the &lt;code&gt;creationComplete&lt;/code&gt; event handler, the thumb offset would snap back to it&#039;s original value after dragging the thumb:
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;middle&quot;
        backgroundColor=&quot;white&quot;&gt;
    
    &lt;mx:Script&gt;
        &lt;![CDATA[
            protected function setThumbY(evt:Event):void {
                sl.getThumbAt(1).y = 10;
            }
        ]]&gt;
    &lt;/mx:Script&gt;
    
    &lt;mx:HSlider id=&quot;sl&quot;
            thumbCount=&quot;2&quot;
            values=&quot;[3,7]&quot;
            showTrackHighlight=&quot;true&quot;
            updateComplete=&quot;setThumbY(event);&quot;/&gt;
    
&lt;/mx:Application&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>@np,</p>
<p>This works for me in Flex 3.5 SDK. I had to use the <code>updateComplete</code> because when I tried setting the <code>y</code> property in the <code>creationComplete</code> event handler, the thumb offset would snap back to it&#8217;s original value after dragging the thumb:</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: #7400FF;">&lt;mx:Application</span> xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #000000;">        layout=<span style="color: #ff0000;">&quot;vertical&quot;</span></span>
<span style="color: #000000;">        verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span></span>
<span style="color: #000000;">        backgroundColor=<span style="color: #ff0000;">&quot;white&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">        &lt;![CDATA[</span>
<span style="color: #339933;">            protected function setThumbY(evt:Event):void {</span>
<span style="color: #339933;">                sl.getThumbAt(1).y = 10;</span>
<span style="color: #339933;">            }</span>
<span style="color: #339933;">        ]]&gt;</span>
<span style="color: #339933;">    &lt;/mx:Script&gt;</span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:HSlider</span> id=<span style="color: #ff0000;">&quot;sl&quot;</span></span>
<span style="color: #000000;">            thumbCount=<span style="color: #ff0000;">&quot;2&quot;</span></span>
<span style="color: #000000;">            values=<span style="color: #ff0000;">&quot;[3,7]&quot;</span></span>
<span style="color: #000000;">            showTrackHighlight=<span style="color: #ff0000;">&quot;true&quot;</span></span>
<span style="color: #000000;">            updateComplete=<span style="color: #ff0000;">&quot;setThumbY(event);&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Peter</p>
]]></content:encoded>
	</item>
</channel>
</rss>

