<?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: Smooth Scrolling HorizontalList</title>
	<atom:link href="http://www.thanksmister.com/index.php/archive/smooth-scrolling-horizontallist/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thanksmister.com/index.php/archive/smooth-scrolling-horizontallist/</link>
	<description>Adobe Flex &#38; AIR Development</description>
	<lastBuildDate>Mon, 19 Jul 2010 17:26:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Vikram</title>
		<link>http://www.thanksmister.com/index.php/archive/smooth-scrolling-horizontallist/#comment-34720</link>
		<dc:creator>Vikram</dc:creator>
		<pubDate>Tue, 15 Jun 2010 11:43:54 +0000</pubDate>
		<guid isPermaLink="false">http://thanksmister.com/?p=450#comment-34720</guid>
		<description>Hi i am using the same logic for Image gallery and created Horizontal List. But i am rendering the images dynamically and images get streamed when i give path of image but some images are missing from the Horizontal List when i scroll the Horizontal Bar.

Kindly help me if u have any idea.

Thanks</description>
		<content:encoded><![CDATA[<p>Hi i am using the same logic for Image gallery and created Horizontal List. But i am rendering the images dynamically and images get streamed when i give path of image but some images are missing from the Horizontal List when i scroll the Horizontal Bar.</p>
<p>Kindly help me if u have any idea.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://www.thanksmister.com/index.php/archive/smooth-scrolling-horizontallist/#comment-25095</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Tue, 16 Mar 2010 16:34:19 +0000</pubDate>
		<guid isPermaLink="false">http://thanksmister.com/?p=450#comment-25095</guid>
		<description>Rich (and Mister, and Ben),

Thank you all for this all this great inventiveness and improvements.  One more (very slight) one to add to Rich&#039;s mods...

Allow for switching-off of horizontal scroll bars, via setting horizontal scroll policy off on parent container:

change:

// need to shrink list height when canvas has a scrollbar so the scrollbar doesn&#039;t overlap the listheight = ( Container( parent ).horizontalScrollPolicy = ScrollPolicy.OFF ) ? parent.height - 16 : parent.height;

to:

// need to shrink list height when canvas has a scrollbar so the scrollbar doesn&#039;t overlap the list
// added detection to avoid shrink when horizontalScrollPolicy of parent container is set to &quot;off&quot;
height = ( Container(parent).maxHorizontalScrollPosition &gt; 0 &amp;&amp; !Container(parent).horizontalScrollPolicy == ScrollPolicy.OFF ) ? parent.height - 16 : parent.height;

(the negation of ScrollPolicy.OFF after the [&amp;&amp;] seems to be necessary for an unambiguous detection of scroll policy)

Thank you gentlemen!


Richard</description>
		<content:encoded><![CDATA[<p>Rich (and Mister, and Ben),</p>
<p>Thank you all for this all this great inventiveness and improvements.  One more (very slight) one to add to Rich&#8217;s mods&#8230;</p>
<p>Allow for switching-off of horizontal scroll bars, via setting horizontal scroll policy off on parent container:</p>
<p>change:</p>
<p>// need to shrink list height when canvas has a scrollbar so the scrollbar doesn&#8217;t overlap the listheight = ( Container( parent ).horizontalScrollPolicy = ScrollPolicy.OFF ) ? parent.height &#8211; 16 : parent.height;</p>
<p>to:</p>
<p>// need to shrink list height when canvas has a scrollbar so the scrollbar doesn&#8217;t overlap the list<br />
// added detection to avoid shrink when horizontalScrollPolicy of parent container is set to &#8220;off&#8221;<br />
height = ( Container(parent).maxHorizontalScrollPosition &gt; 0 &amp;&amp; !Container(parent).horizontalScrollPolicy == ScrollPolicy.OFF ) ? parent.height &#8211; 16 : parent.height;</p>
<p>(the negation of ScrollPolicy.OFF after the [&amp;&amp;] seems to be necessary for an unambiguous detection of scroll policy)</p>
<p>Thank you gentlemen!</p>
<p>Richard</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JDavis</title>
		<link>http://www.thanksmister.com/index.php/archive/smooth-scrolling-horizontallist/#comment-24065</link>
		<dc:creator>JDavis</dc:creator>
		<pubDate>Thu, 11 Mar 2010 06:10:29 +0000</pubDate>
		<guid isPermaLink="false">http://thanksmister.com/?p=450#comment-24065</guid>
		<description>Thanks much for this info - the first class SmoothHorizontalScrollList works great.

To hide the scrollbars I set the horizontalScrollBar visible &amp; includeInLayout properties to false.  It doesn&#039;t show up anymore, and things look ok for me :

[cc]
override protected function configureScrollBars():void
{
	super.configureScrollBars();
	if (horizontalScrollBar) {
		horizontalScrollBar.includeInLayout=horizontalScrollBar.visible=false;
		horizontalScrollBar.lineScrollSize = .125;  // should be inverse power of 2
	}
}
[/cc]

I changed the mousewheel so that it moves incrementally as well:
[cc]
override protected function mouseWheelHandler(event:MouseEvent):void
{
	// Scrolldirection and distance calculation
	if (horizontalScrollBar) {
		var scrollAmount:Number = horizontalScrollBar.lineScrollSize * event.delta * -1.0;
				
		var oldPosition:Number = super.horizontalScrollPosition;
		var newPosition:Number = super.horizontalScrollPosition + scrollAmount;
				
		if (newPosition &lt; 0)
			newPosition = 0;
		else if (newPosition &gt; maxHorizontalScrollPosition)
			newPosition = maxHorizontalScrollPosition;
			
		horizontalScrollBar.scrollPosition = newPosition;
				
		var scrollEvent:ScrollEvent = new ScrollEvent(ScrollEvent.SCROLL);
		scrollEvent.detail = event.delta.toString(); 
		scrollEvent.direction = ScrollEventDirection.HORIZONTAL;
		scrollEvent.position = newPosition;
		scrollEvent.delta = newPosition - oldPosition;
				
		horizontalScrollBar.dispatchEvent(scrollEvent);
	}					
}
[/cc]</description>
		<content:encoded><![CDATA[<p>Thanks much for this info &#8211; the first class SmoothHorizontalScrollList works great.</p>
<p>To hide the scrollbars I set the horizontalScrollBar visible &amp; includeInLayout properties to false.  It doesn&#8217;t show up anymore, and things look ok for me :</p>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">override protected <span style="color: #000000; font-weight: bold;">function</span> configureScrollBars<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">super</span>.<span style="color: #006600;">configureScrollBars</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>horizontalScrollBar<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; horizontalScrollBar.<span style="color: #006600;">includeInLayout</span>=horizontalScrollBar.<span style="color: #0066CC;">visible</span>=<span style="color: #000000; font-weight: bold;">false</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; horizontalScrollBar.<span style="color: #006600;">lineScrollSize</span> = .125; &nbsp;<span style="color: #808080; font-style: italic;">// should be inverse power of 2</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></td></tr></tbody></table></div>
<p>I changed the mousewheel so that it moves incrementally as well:</p>
<div class="codecolorer-container actionscript mac-classic" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:640px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br /></div></td><td><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">override protected <span style="color: #000000; font-weight: bold;">function</span> mouseWheelHandler<span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Scrolldirection and distance calculation</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>horizontalScrollBar<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> scrollAmount:<span style="color: #0066CC;">Number</span> = horizontalScrollBar.<span style="color: #006600;">lineScrollSize</span> <span style="color: #66cc66;">*</span> event.<span style="color: #006600;">delta</span> <span style="color: #66cc66;">*</span> -<span style="color: #cc66cc;">1.0</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> oldPosition:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">super</span>.<span style="color: #006600;">horizontalScrollPosition</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> newPosition:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">super</span>.<span style="color: #006600;">horizontalScrollPosition</span> + scrollAmount;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>newPosition <span style="color: #66cc66;">&lt;</span> 0<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newPosition = <span style="color: #cc66cc;">0</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>newPosition <span style="color: #66cc66;">&gt;</span> maxHorizontalScrollPosition<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newPosition = maxHorizontalScrollPosition;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; horizontalScrollBar.<span style="color: #006600;">scrollPosition</span> = newPosition;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> scrollEvent:ScrollEvent = <span style="color: #000000; font-weight: bold;">new</span> ScrollEvent<span style="color: #66cc66;">&#40;</span>ScrollEvent.<span style="color: #0066CC;">SCROLL</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; scrollEvent.<span style="color: #006600;">detail</span> = event.<span style="color: #006600;">delta</span>.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <br />
&nbsp; &nbsp; &nbsp; &nbsp; scrollEvent.<span style="color: #006600;">direction</span> = ScrollEventDirection.<span style="color: #006600;">HORIZONTAL</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; scrollEvent.<span style="color: #0066CC;">position</span> = newPosition;<br />
&nbsp; &nbsp; &nbsp; &nbsp; scrollEvent.<span style="color: #006600;">delta</span> = newPosition - oldPosition;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; horizontalScrollBar.<span style="color: #006600;">dispatchEvent</span><span style="color: #66cc66;">&#40;</span>scrollEvent<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<span style="color: #66cc66;">&#125;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://www.thanksmister.com/index.php/archive/smooth-scrolling-horizontallist/#comment-23046</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Thu, 04 Mar 2010 20:56:54 +0000</pubDate>
		<guid isPermaLink="false">http://thanksmister.com/?p=450#comment-23046</guid>
		<description>Item removal and drag indicator bugs fixed.  Source:

http://pastie.org/854470</description>
		<content:encoded><![CDATA[<p>Item removal and drag indicator bugs fixed.  Source:</p>
<p><a href="http://pastie.org/854470" rel="nofollow">http://pastie.org/854470</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://www.thanksmister.com/index.php/archive/smooth-scrolling-horizontallist/#comment-23045</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Thu, 04 Mar 2010 20:32:01 +0000</pubDate>
		<guid isPermaLink="false">http://thanksmister.com/?p=450#comment-23045</guid>
		<description>wrt my previous post, I found the problem.  Replace:

combinedRendererWidth += columnWidth;

with:

if(renderer!=null)
  combinedRendererWidth += columnWidth;

Cheers</description>
		<content:encoded><![CDATA[<p>wrt my previous post, I found the problem.  Replace:</p>
<p>combinedRendererWidth += columnWidth;</p>
<p>with:</p>
<p>if(renderer!=null)<br />
  combinedRendererWidth += columnWidth;</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://www.thanksmister.com/index.php/archive/smooth-scrolling-horizontallist/#comment-23044</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Thu, 04 Mar 2010 20:22:05 +0000</pubDate>
		<guid isPermaLink="false">http://thanksmister.com/?p=450#comment-23044</guid>
		<description>First of all, great work on this!  Very helpful indeed - thank you. :)

Like Victor (above), I’ve noticed if I add items to the list, the scrollbar gets smaller as the list gets longer. However, if I remove items from the list, the scrollbar doesn’t resize, and the list doesn’t get any shorter (whitespace is left where the removed items used to be)… Any thoughts?

Thanks
-Rich</description>
		<content:encoded><![CDATA[<p>First of all, great work on this!  Very helpful indeed &#8211; thank you. <img src='http://www.thanksmister.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Like Victor (above), I’ve noticed if I add items to the list, the scrollbar gets smaller as the list gets longer. However, if I remove items from the list, the scrollbar doesn’t resize, and the list doesn’t get any shorter (whitespace is left where the removed items used to be)… Any thoughts?</p>
<p>Thanks<br />
-Rich</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonkemon</title>
		<link>http://www.thanksmister.com/index.php/archive/smooth-scrolling-horizontallist/#comment-21641</link>
		<dc:creator>Jonkemon</dc:creator>
		<pubDate>Tue, 23 Feb 2010 12:19:41 +0000</pubDate>
		<guid isPermaLink="false">http://thanksmister.com/?p=450#comment-21641</guid>
		<description>Hey Mister!

In reference to your &#039;Another Solution&#039; section, I tried this for a collection of images rather than text as per your example, and as you found with rendering the entire list, I also had to wait for the graphics to draw (Spectrum 48K loading style, just a bit quicker!). After a little tinkering though, I found that you can avoid this problem by specifying a rowheight on the component.

Lastly, thanks for your research and documentation, really helpful. Just surprised that there wasn&#039;t an easier documented way of doing this with Flex 3.5.</description>
		<content:encoded><![CDATA[<p>Hey Mister!</p>
<p>In reference to your &#8216;Another Solution&#8217; section, I tried this for a collection of images rather than text as per your example, and as you found with rendering the entire list, I also had to wait for the graphics to draw (Spectrum 48K loading style, just a bit quicker!). After a little tinkering though, I found that you can avoid this problem by specifying a rowheight on the component.</p>
<p>Lastly, thanks for your research and documentation, really helpful. Just surprised that there wasn&#8217;t an easier documented way of doing this with Flex 3.5.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mister</title>
		<link>http://www.thanksmister.com/index.php/archive/smooth-scrolling-horizontallist/#comment-20007</link>
		<dc:creator>Mister</dc:creator>
		<pubDate>Thu, 11 Feb 2010 23:49:49 +0000</pubDate>
		<guid isPermaLink="false">http://thanksmister.com/?p=450#comment-20007</guid>
		<description>Sounds like the project is hosed.   Try creating a new Flex project and recreating the example with your own MXML and class files.   You can just view source of the example to see the code.</description>
		<content:encoded><![CDATA[<p>Sounds like the project is hosed.   Try creating a new Flex project and recreating the example with your own MXML and class files.   You can just view source of the example to see the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erica</title>
		<link>http://www.thanksmister.com/index.php/archive/smooth-scrolling-horizontallist/#comment-19801</link>
		<dc:creator>Erica</dc:creator>
		<pubDate>Tue, 09 Feb 2010 23:32:03 +0000</pubDate>
		<guid isPermaLink="false">http://thanksmister.com/?p=450#comment-19801</guid>
		<description>Thanks for this solution.  I am trying to make use of it in a current project.  However, it seems that flex isn&#039;t finding the HorizontalList class.  I added the src folder containing the mx libraries, to the source path, thinking this would solve the problem, but instead it added new errors, i.e. &quot;Unable to resolve resource bundle &quot;collections&quot; for locale &quot;en_US&quot;.  

This is really frustrating as I assumed the HorizontalList would naturally be included in the sdk (actually it is. the compiler just isn&#039;t seeing it) and I&#039;m not seeing any solutions to this problem after hours of googling and testing. Any ideas?</description>
		<content:encoded><![CDATA[<p>Thanks for this solution.  I am trying to make use of it in a current project.  However, it seems that flex isn&#8217;t finding the HorizontalList class.  I added the src folder containing the mx libraries, to the source path, thinking this would solve the problem, but instead it added new errors, i.e. &#8220;Unable to resolve resource bundle &#8220;collections&#8221; for locale &#8220;en_US&#8221;.  </p>
<p>This is really frustrating as I assumed the HorizontalList would naturally be included in the sdk (actually it is. the compiler just isn&#8217;t seeing it) and I&#8217;m not seeing any solutions to this problem after hours of googling and testing. Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erica</title>
		<link>http://www.thanksmister.com/index.php/archive/smooth-scrolling-horizontallist/#comment-19800</link>
		<dc:creator>Erica</dc:creator>
		<pubDate>Tue, 09 Feb 2010 23:30:19 +0000</pubDate>
		<guid isPermaLink="false">http://thanksmister.com/?p=450#comment-19800</guid>
		<description>Thanks for this solution.  I am trying to make use of it in a current project.  However, it seems that flex isn&#039;t finding the HorizontalList class.  I added the src folder containing the mx libraries, to the source path, thinking this would solve the problem, but instead it added new errors, i.e. &quot;Unable to resolve resource bundle &quot;collections&quot; for locale &quot;en_US&quot;.  

This is really frustrating as I assumed the HorizontalList would naturally be included in the sdk (actually it is. the compiler just isn&#039;t seeing it) and I&#039;m not seeing any solutions to this problem after hours of googling and testing.  Any ideas?</description>
		<content:encoded><![CDATA[<p>Thanks for this solution.  I am trying to make use of it in a current project.  However, it seems that flex isn&#8217;t finding the HorizontalList class.  I added the src folder containing the mx libraries, to the source path, thinking this would solve the problem, but instead it added new errors, i.e. &#8220;Unable to resolve resource bundle &#8220;collections&#8221; for locale &#8220;en_US&#8221;.  </p>
<p>This is really frustrating as I assumed the HorizontalList would naturally be included in the sdk (actually it is. the compiler just isn&#8217;t seeing it) and I&#8217;m not seeing any solutions to this problem after hours of googling and testing.  Any ideas?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
