<?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/"
xmlns:series="http://unfoldingneurons.com/"
> <channel><title>Comments on: Background Animations Using&#160;MooTools</title> <atom:link href="http://davidwalsh.name/mootools-animate-background/feed" rel="self" type="application/rss+xml" /><link>http://davidwalsh.name/mootools-animate-background</link> <description>Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞.</description> <lastBuildDate>Thu, 09 Feb 2012 14:25:32 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3</generator> <item><title>By: Toadward</title><link>http://davidwalsh.name/mootools-animate-background/comment-page-1#comment-27859</link> <dc:creator>Toadward</dc:creator> <pubDate>Thu, 08 Dec 2011 13:26:03 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4830#comment-27859</guid> <description>Hi David,thanks for the tutorial, it&#039;s great.A little problem is the use of &quot;(++count * length)&quot; to define the tweening target. As this runs endless some desktop browsers are stopping the animation effect after some minutes.
I think it would be better to set the target to &quot;length&quot; and reset the background-position in the &quot;run&quot; function.</description> <content:encoded><![CDATA[<p>Hi David,</p><p>thanks for the tutorial, it&#8217;s great.</p><p>A little problem is the use of &#8220;(++count * length)&#8221; to define the tweening target. As this runs endless some desktop browsers are stopping the animation effect after some minutes.<br
/> I think it would be better to set the target to &#8220;length&#8221; and reset the background-position in the &#8220;run&#8221; function.</p> ]]></content:encoded> </item> <item><title>By: Cheta</title><link>http://davidwalsh.name/mootools-animate-background/comment-page-1#comment-27156</link> <dc:creator>Cheta</dc:creator> <pubDate>Thu, 06 Oct 2011 21:33:47 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4830#comment-27156</guid> <description>Can&#039;t make it to work with IE 7,8 9 .  Works fine with chrome and ff. IE gives error that object doesn&#039;t support the property.. Please help me ..</description> <content:encoded><![CDATA[<p>Can&#8217;t make it to work with IE 7,8 9 .  Works fine with chrome and ff. IE gives error that object doesn&#8217;t support the property.. Please help me ..</p> ]]></content:encoded> </item> <item><title>By: byt</title><link>http://davidwalsh.name/mootools-animate-background/comment-page-1#comment-27024</link> <dc:creator>byt</dc:creator> <pubDate>Thu, 29 Sep 2011 00:06:23 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4830#comment-27024</guid> <description>Hello I need help getting the background. I use a joomla template and I am not able to.
To place the image to and no problem.
But do not get it to move.
I use  CSS file.</description> <content:encoded><![CDATA[<p>Hello I need help getting the background. I use a joomla template and I am not able to.<br
/> To place the image to and no problem.<br
/> But do not get it to move.<br
/> I use  CSS file.</p> ]]></content:encoded> </item> <item><title>By: JavaScript Background Scroller &#124; Title Not Found</title><link>http://davidwalsh.name/mootools-animate-background/comment-page-1#comment-23746</link> <dc:creator>JavaScript Background Scroller &#124; Title Not Found</dc:creator> <pubDate>Tue, 26 Apr 2011 19:37:01 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4830#comment-23746</guid> <description>[...] the many developer blogs that I read, one of my favorites is that of David Walsh. Recently he posted an update of a small function he&#8217;d written to scroll a background image constantly to easily add [...]</description> <content:encoded><![CDATA[<p>[...] the many developer blogs that I read, one of my favorites is that of David Walsh. Recently he posted an update of a small function he&#8217;d written to scroll a background image constantly to easily add [...]</p> ]]></content:encoded> </item> <item><title>By: Brad</title><link>http://davidwalsh.name/mootools-animate-background/comment-page-1#comment-23745</link> <dc:creator>Brad</dc:creator> <pubDate>Tue, 26 Apr 2011 18:44:35 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4830#comment-23745</guid> <description>http://bradleywilkie.com/testSites/backgroundScroller/</description> <content:encoded><![CDATA[<p><a
href="http://bradleywilkie.com/testSites/backgroundScroller/" rel="nofollow">http://bradleywilkie.com/testSites/backgroundScroller/</a></p> ]]></content:encoded> </item> <item><title>By: Brad</title><link>http://davidwalsh.name/mootools-animate-background/comment-page-1#comment-23743</link> <dc:creator>Brad</dc:creator> <pubDate>Tue, 26 Apr 2011 16:04:15 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4830#comment-23743</guid> <description>Ah, yes, I see. Easy mistake, since wait is part of the MooTools system. It&#039;s just an extra for Class.chain.Feel free to edit that into my comment.I put together a demo, but I won&#039;t be able to get it online until later.</description> <content:encoded><![CDATA[<p>Ah, yes, I see. Easy mistake, since wait is part of the MooTools system. It&#8217;s just an extra for Class.chain.</p><p>Feel free to edit that into my comment.</p><p>I put together a demo, but I won&#8217;t be able to get it online until later.</p> ]]></content:encoded> </item> <item><title>By: David Walsh</title><link>http://davidwalsh.name/mootools-animate-background/comment-page-1#comment-23742</link> <dc:creator>David Walsh</dc:creator> <pubDate>Tue, 26 Apr 2011 15:53:58 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4830#comment-23742</guid> <description>This is great Brad, but I had a small mistep in my original code.  &lt;code&gt;wait: false&lt;/code&gt; should be &lt;code&gt;link: &quot;cancel&quot;&lt;/code&gt;</description> <content:encoded><![CDATA[<p>This is great Brad, but I had a small mistep in my original code. <code>wait: false</code> should be <code>link: "cancel"</code></p> ]]></content:encoded> </item> <item><title>By: Brad</title><link>http://davidwalsh.name/mootools-animate-background/comment-page-1#comment-23741</link> <dc:creator>Brad</dc:creator> <pubDate>Tue, 26 Apr 2011 15:49:11 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4830#comment-23741</guid> <description>For everyone asking for parallax, it&#039;s very simple. I&#039;ve put the functions into a class to make this easier:&lt;code&gt;
bgScroller = new Class({
Implements: [Events, Options],
options: {
duration: 40000
},
tweener: null,
length: 0,
count: 0,
verticalPosition: null,
run: function() {
this.tweener.tween(&#039;background-position&#039;, (&#039;-&#039; + (++this.count * this.length) + &#039;px &#039; + this.verticalPosition));
},
initialize: function(element, options){
this.setOptions(options);
this.tweener = element;
this.length = this.tweener.getSize().x;
this.verticalPosition = this.tweener.getStyle(&quot;background-position&quot;).split(&quot; &quot;)[1];
this.tweener.setStyle(&quot;background-position&quot;, (&quot;0px &quot; + this.verticalPosition));
this.tweener.set(&#039;tween&#039;, {
duration: this.options.duration,
transition: Fx.Transitions.linear,
onComplete: this.run.bind(this),
wait: false
});
this.run();
}
});
&lt;/code&gt;Then all you have to do is set separate instances of the class to each layer:&lt;code&gt;
window.addEvent(&quot;domready&quot;, function() {
var frontScroller = new bgScroller($(&quot;front&quot;), { duration: 9000 });
var middleScroller = new bgScroller($(&quot;middle&quot;), { duration: 85000 });
var backScroller = new bgScroller($(&quot;back&quot;), { duration: 55000 });
});
&lt;/code&gt;</description> <content:encoded><![CDATA[<p>For everyone asking for parallax, it&#8217;s very simple. I&#8217;ve put the functions into a class to make this easier:</p><p><code><br
/> bgScroller = new Class({</p><p> Implements: [Events, Options],</p><p> options: {<br
/> duration: 40000<br
/> },</p><p> tweener: null,<br
/> length: 0,<br
/> count: 0,<br
/> verticalPosition: null,</p><p> run: function() {<br
/> this.tweener.tween('background-position', ('-' + (++this.count * this.length) + 'px ' + this.verticalPosition));<br
/> },</p><p> initialize: function(element, options){<br
/> this.setOptions(options);<br
/> this.tweener = element;<br
/> this.length = this.tweener.getSize().x;<br
/> this.verticalPosition = this.tweener.getStyle("background-position").split(" ")[1];<br
/> this.tweener.setStyle("background-position", ("0px " + this.verticalPosition));<br
/> this.tweener.set('tween', {<br
/> duration: this.options.duration,<br
/> transition: Fx.Transitions.linear,<br
/> onComplete: this.run.bind(this),<br
/> wait: false<br
/> });<br
/> this.run();<br
/> }</p><p>});<br
/> </code></p><p>Then all you have to do is set separate instances of the class to each layer:</p><p><code><br
/> window.addEvent("domready", function() {<br
/> var frontScroller = new bgScroller($("front"), { duration: 9000 });<br
/> var middleScroller = new bgScroller($("middle"), { duration: 85000 });<br
/> var backScroller = new bgScroller($("back"), { duration: 55000 });<br
/> });<br
/> </code></p> ]]></content:encoded> </item> <item><title>By: Andy</title><link>http://davidwalsh.name/mootools-animate-background/comment-page-1#comment-23739</link> <dc:creator>Andy</dc:creator> <pubDate>Tue, 26 Apr 2011 15:04:03 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4830#comment-23739</guid> <description>oncomplete: run is a very clever way to do it, nice! I would have gone with some nasty settimeout solution.</description> <content:encoded><![CDATA[<p>oncomplete: run is a very clever way to do it, nice! I would have gone with some nasty settimeout solution.</p> ]]></content:encoded> </item> <item><title>By: Chris TC</title><link>http://davidwalsh.name/mootools-animate-background/comment-page-1#comment-23424</link> <dc:creator>Chris TC</dc:creator> <pubDate>Fri, 08 Apr 2011 13:41:53 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=4830#comment-23424</guid> <description>&lt;code&gt;I tried this code successfully with a background positioned on top of a div, but when i try position it on bottom, it seems like the code make it go up little by little, funny but... wasn&#039;t really expected. Is there a way to correct this effect ?&lt;/code&gt;</description> <content:encoded><![CDATA[<p><code>I tried this code successfully with a background positioned on top of a div, but when i try position it on bottom, it seems like the code make it go up little by little, funny but... wasn't really expected. Is there a way to correct this effect ?</code></p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 4/20 queries in 0.013 seconds using disk: basic
Object Caching 868/875 objects using disk: basic

Served from: davidwalsh.name @ 2012-02-09 09:44:23 -->
