<?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 image list</title>
	<atom:link href="http://www.ioncannon.net/programming/48/smooth-scrolling-image-list/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ioncannon.net/programming/48/smooth-scrolling-image-list/</link>
	<description>Thoughts on Software Development and Engineering</description>
	<lastBuildDate>Tue, 07 Sep 2010 07:38:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Justin</title>
		<link>http://www.ioncannon.net/programming/48/smooth-scrolling-image-list/comment-page-1/#comment-166212</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Thu, 25 Mar 2010 13:38:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/48/smooth-scrolling-image-list/#comment-166212</guid>
		<description>First off, thanks for the code and ideas.  

I slightly modified the code to not go on to infinity either way.  
I created the following global variables:
var numVisible = 4;  //Number of images that are always visible
var totalImages = 5;  // Total Number of images
var numPossibleMoves = totalImages-numVisible;  //The number of possible moves
var numMoves = 0;  //The number of moves taken.  

I then modified the following functions:
function moveToPrevious()
{
if (numMoves &gt; 0)
{
numMoves--;
  new Effect.Move(&#039;imageBoxInside&#039;, { x: 200, y: 0, transition: Effect.Transitions.sinoidal });
  }
}  
function moveToNext()
{
 if (numMoves &lt; numPossibleMoves)
 	{
 	//Then we can still move
 	numMoves++;
      new Effect.Move(&#039;imageBoxInside&#039;, { x: -200, y: 0, transition: Effect.Transitions.sinoidal });
    }
}


Hope this helps.  

Justin  http://www.jcpsnowproductons.com</description>
		<content:encoded><![CDATA[<p>First off, thanks for the code and ideas.  </p>
<p>I slightly modified the code to not go on to infinity either way.<br />
I created the following global variables:<br />
var numVisible = 4;  //Number of images that are always visible<br />
var totalImages = 5;  // Total Number of images<br />
var numPossibleMoves = totalImages-numVisible;  //The number of possible moves<br />
var numMoves = 0;  //The number of moves taken.  </p>
<p>I then modified the following functions:<br />
function moveToPrevious()<br />
{<br />
if (numMoves &gt; 0)<br />
{<br />
numMoves&#8211;;<br />
  new Effect.Move(&#039;imageBoxInside&#039;, { x: 200, y: 0, transition: Effect.Transitions.sinoidal });<br />
  }<br />
}<br />
function moveToNext()<br />
{<br />
 if (numMoves &lt; numPossibleMoves)<br />
 	{<br />
 	//Then we can still move<br />
 	numMoves++;<br />
      new Effect.Move(&#039;imageBoxInside&#039;, { x: -200, y: 0, transition: Effect.Transitions.sinoidal });<br />
    }<br />
}</p>
<p>Hope this helps.  </p>
<p>Justin  <a href="http://www.jcpsnowproductons.com" rel="nofollow">http://www.jcpsnowproductons.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shenanigans</title>
		<link>http://www.ioncannon.net/programming/48/smooth-scrolling-image-list/comment-page-1/#comment-158692</link>
		<dc:creator>shenanigans</dc:creator>
		<pubDate>Wed, 09 Dec 2009 10:47:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/48/smooth-scrolling-image-list/#comment-158692</guid>
		<description>hey guys,
is there a way to make the images scroll automatically in... say... 450px steps? Like on this webpage: http://edshoots.com/html/  ? Does the above script work with IE8?
cheers...</description>
		<content:encoded><![CDATA[<p>hey guys,<br />
is there a way to make the images scroll automatically in&#8230; say&#8230; 450px steps? Like on this webpage: <a href="http://edshoots.com/html/" rel="nofollow">http://edshoots.com/html/</a>  ? Does the above script work with IE8?<br />
cheers&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eng. Ilian Iliev</title>
		<link>http://www.ioncannon.net/programming/48/smooth-scrolling-image-list/comment-page-1/#comment-147012</link>
		<dc:creator>eng. Ilian Iliev</dc:creator>
		<pubDate>Mon, 17 Aug 2009 10:54:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/48/smooth-scrolling-image-list/#comment-147012</guid>
		<description>Hi niranjan,
sad to hear it`s not working for you.
To skip the flooding of Carson`s blog (10x for the post btw) just send me a link or the code you are working on at azareth(at)mail.bg I`ll try to review it as soon as possible.</description>
		<content:encoded><![CDATA[<p>Hi niranjan,<br />
sad to hear it`s not working for you.<br />
To skip the flooding of Carson`s blog (10x for the post btw) just send me a link or the code you are working on at azareth(at)mail.bg I`ll try to review it as soon as possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: niranjan</title>
		<link>http://www.ioncannon.net/programming/48/smooth-scrolling-image-list/comment-page-1/#comment-145595</link>
		<dc:creator>niranjan</dc:creator>
		<pubDate>Sat, 08 Aug 2009 07:28:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/48/smooth-scrolling-image-list/#comment-145595</guid>
		<description>thx &quot;eng. Ilian Iliev&quot; for reply but it doesnt seems to work i had tried to encapsulate the img in a div and added some text but result is something like ladder steps images are displayed like steps of ladder. any thing else i could try?</description>
		<content:encoded><![CDATA[<p>thx &#034;eng. Ilian Iliev&#034; for reply but it doesnt seems to work i had tried to encapsulate the img in a div and added some text but result is something like ladder steps images are displayed like steps of ladder. any thing else i could try?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eng. Ilian Iliev</title>
		<link>http://www.ioncannon.net/programming/48/smooth-scrolling-image-list/comment-page-1/#comment-145244</link>
		<dc:creator>eng. Ilian Iliev</dc:creator>
		<pubDate>Thu, 06 Aug 2009 09:13:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/48/smooth-scrolling-image-list/#comment-145244</guid>
		<description>@niranjan

You can just wrap each img element inside a div, example:


  
     
          
          my info text
    
   ...............

Hope this helps )</description>
		<content:encoded><![CDATA[<p>@niranjan</p>
<p>You can just wrap each img element inside a div, example:</p>
<p>          my info text</p>
<p>   &#8230;&#8230;&#8230;&#8230;&#8230;</p>
<p>Hope this helps )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: niranjan</title>
		<link>http://www.ioncannon.net/programming/48/smooth-scrolling-image-list/comment-page-1/#comment-144318</link>
		<dc:creator>niranjan</dc:creator>
		<pubDate>Fri, 31 Jul 2009 05:48:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/48/smooth-scrolling-image-list/#comment-144318</guid>
		<description>can we have add some description below the image ? if yes how should it be done?</description>
		<content:encoded><![CDATA[<p>can we have add some description below the image ? if yes how should it be done?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carson</title>
		<link>http://www.ioncannon.net/programming/48/smooth-scrolling-image-list/comment-page-1/#comment-142325</link>
		<dc:creator>carson</dc:creator>
		<pubDate>Mon, 22 Jun 2009 13:34:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/48/smooth-scrolling-image-list/#comment-142325</guid>
		<description>@LD

Make sure you have your button images outside of the two divs.</description>
		<content:encoded><![CDATA[<p>@LD</p>
<p>Make sure you have your button images outside of the two divs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LD</title>
		<link>http://www.ioncannon.net/programming/48/smooth-scrolling-image-list/comment-page-1/#comment-142091</link>
		<dc:creator>LD</dc:creator>
		<pubDate>Thu, 18 Jun 2009 14:07:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/48/smooth-scrolling-image-list/#comment-142091</guid>
		<description>How to configure if my scroll buttons are positioned at the beginning and end of the box holding all images?  Right now, it scrolls even the buttons.</description>
		<content:encoded><![CDATA[<p>How to configure if my scroll buttons are positioned at the beginning and end of the box holding all images?  Right now, it scrolls even the buttons.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eng. Ilian Iliev</title>
		<link>http://www.ioncannon.net/programming/48/smooth-scrolling-image-list/comment-page-1/#comment-141103</link>
		<dc:creator>eng. Ilian Iliev</dc:creator>
		<pubDate>Sat, 06 Jun 2009 23:18:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/48/smooth-scrolling-image-list/#comment-141103</guid>
		<description>Hi all,

I create a JS class based on this example and I`ll be glad to hear(see)
what you think. Sorry for pasting so much code that way but please take
a look.

The scroller is called like that:
var my_scrolltest = new Scroller(&#039;imageBox&#039;, &#039;imageBoxInside&#039;, &#039;scroll_left&#039;, &#039;scroll_right&#039;, 202);

3rd and 4th params are links id`s, last one (step) is the scroll step i pixels,
class source bellow:

Scroller = Class.create({
	initialize: function(box, innerBox, el_left, el_right, step) {
		var scroller = this;
		
		this.box = $(box);
		this.handle = $(innerBox);
		this.el_left = $(el_left);
		this.el_right = $(el_right);
		this.step = step;
		this.currentOffsetLeft = 0;
		
		this.eventLeftScrollOnClick = this.ScrollLeft.bindAsEventListener(this);
		this.eventRightScrollOnClick = this.ScrollRight.bindAsEventListener(this);
		
		this.el_left.observe(&quot;click&quot;, this.eventLeftScrollOnClick);
		this.el_right.observe(&quot;click&quot;, this.eventRightScrollOnClick);
		
		this.initialized = true;
	},	
	ScrollLeft: function(event){
		if (Event.isLeftClick(event)) {
			offset_left = this.currentOffsetLeft
			
			if(!offset_left &#124;&#124; offset_left&gt;= 0)
				return;
			
			this.currentOffsetLeft += this.step;
			new Effect.Move(this.handle, { x: this.step, y: 0, transition: Effect.Transitions.sinoidal, queue: &#039;end&#039;});
			Event.stop(event);
		}		
	},	
	ScrollRight: function(event){
		if (Event.isLeftClick(event)) {
			box_width = this.getObjStyleProperty(this.box, &#039;width&#039;);
			innerBox_width = this.getObjStyleProperty(this.handle, &#039;width&#039;);
			
			if(box_width&gt;=(this.currentOffsetLeft)+innerBox_width)
				return;
			
			this.currentOffsetLeft -= this.step;
			new Effect.Move(this.handle, { x: -this.step, y: 0, transition: Effect.Transitions.sinoidal, queue: &#039;end&#039;});
		  Event.stop(event);
		}
	},
	getObjStyleProperty: function(obj, property){
		offset_left = obj.getStyle(property);
		if(!offset_left)
			return;
		return parseInt(offset_left.replace(&#039;px&#039;, &#039;&#039;));
	}
});

Any ideas will be appreciated</description>
		<content:encoded><![CDATA[<p>Hi all,</p>
<p>I create a JS class based on this example and I`ll be glad to hear(see)<br />
what you think. Sorry for pasting so much code that way but please take<br />
a look.</p>
<p>The scroller is called like that:<br />
var my_scrolltest = new Scroller(&#039;imageBox&#039;, &#039;imageBoxInside&#039;, &#039;scroll_left&#039;, &#039;scroll_right&#039;, 202);</p>
<p>3rd and 4th params are links id`s, last one (step) is the scroll step i pixels,<br />
class source bellow:</p>
<p>Scroller = Class.create({<br />
	initialize: function(box, innerBox, el_left, el_right, step) {<br />
		var scroller = this;</p>
<p>		this.box = $(box);<br />
		this.handle = $(innerBox);<br />
		this.el_left = $(el_left);<br />
		this.el_right = $(el_right);<br />
		this.step = step;<br />
		this.currentOffsetLeft = 0;</p>
<p>		this.eventLeftScrollOnClick = this.ScrollLeft.bindAsEventListener(this);<br />
		this.eventRightScrollOnClick = this.ScrollRight.bindAsEventListener(this);</p>
<p>		this.el_left.observe(&#034;click&#034;, this.eventLeftScrollOnClick);<br />
		this.el_right.observe(&#034;click&#034;, this.eventRightScrollOnClick);</p>
<p>		this.initialized = true;<br />
	},<br />
	ScrollLeft: function(event){<br />
		if (Event.isLeftClick(event)) {<br />
			offset_left = this.currentOffsetLeft</p>
<p>			if(!offset_left || offset_left&gt;= 0)<br />
				return;</p>
<p>			this.currentOffsetLeft += this.step;<br />
			new Effect.Move(this.handle, { x: this.step, y: 0, transition: Effect.Transitions.sinoidal, queue: &#039;end&#039;});<br />
			Event.stop(event);<br />
		}<br />
	},<br />
	ScrollRight: function(event){<br />
		if (Event.isLeftClick(event)) {<br />
			box_width = this.getObjStyleProperty(this.box, &#039;width&#039;);<br />
			innerBox_width = this.getObjStyleProperty(this.handle, &#039;width&#039;);</p>
<p>			if(box_width&gt;=(this.currentOffsetLeft)+innerBox_width)<br />
				return;</p>
<p>			this.currentOffsetLeft -= this.step;<br />
			new Effect.Move(this.handle, { x: -this.step, y: 0, transition: Effect.Transitions.sinoidal, queue: &#039;end&#039;});<br />
		  Event.stop(event);<br />
		}<br />
	},<br />
	getObjStyleProperty: function(obj, property){<br />
		offset_left = obj.getStyle(property);<br />
		if(!offset_left)<br />
			return;<br />
		return parseInt(offset_left.replace(&#039;px&#039;, &#034;));<br />
	}<br />
});</p>
<p>Any ideas will be appreciated</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.ioncannon.net/programming/48/smooth-scrolling-image-list/comment-page-1/#comment-126330</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Wed, 11 Mar 2009 16:38:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.ioncannon.net/uncategorized/48/smooth-scrolling-image-list/#comment-126330</guid>
		<description>there&#039;s another bug on line :
theLeft = theLeft + validWBox;

the JS makes a concatenation of both var, instead of add them.

good luck :)</description>
		<content:encoded><![CDATA[<p>there&#039;s another bug on line :<br />
theLeft = theLeft + validWBox;</p>
<p>the JS makes a concatenation of both var, instead of add them.</p>
<p>good luck :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
