<?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: FX: Lightweight and Standalone Animation</title>
	<atom:link href="http://ryanmorr.com/archives/fx-lightweight-and-standalone-animation/feed" rel="self" type="application/rss+xml" />
	<link>http://ryanmorr.com/archives/fx-lightweight-and-standalone-animation</link>
	<description>JavaScript, CSS, and Web Apps</description>
	<lastBuildDate>Tue, 24 Aug 2010 12:22:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ryan Morr</title>
		<link>http://ryanmorr.com/archives/fx-lightweight-and-standalone-animation/comment-page-1#comment-1019</link>
		<dc:creator>Ryan Morr</dc:creator>
		<pubDate>Fri, 02 Jul 2010 06:59:17 +0000</pubDate>
		<guid isPermaLink="false">http://ryanmorr.com/?p=281#comment-1019</guid>
		<description>@ Sean

Thanks for the high praise, now in regards to your issue, I wouldn&#039;t call it a flaw in the library itself, but more so the implementation. In my example, every time you click the &quot;Go&quot; button your creating a new instance of FX which handles that animation and only that animation and is unaware of any other manipulation to the element.

Now you could use the callback to put together some simple queuing to manage this for you. For example, to make an element continually fade-in and fade-out you could do this:

function show(){
    new FX(el, {opacity: {to: 1}}, 1, hide).start();
}

function hide(){
    new FX(el, {opacity: {to: 0}}, 1, show).start();
}

It&#039;s actually funny you mentioned this, because with the next version of the framework I am actually adding as a plugin an entire queuing system as well as a bunch of features to have more control over the element itself.

Thanks again, and check back in the next couple months for the next version which hopefully should solve your problems.</description>
		<content:encoded><![CDATA[<p>@ Sean</p>
<p>Thanks for the high praise, now in regards to your issue, I wouldn&#8217;t call it a flaw in the library itself, but more so the implementation. In my example, every time you click the &#8220;Go&#8221; button your creating a new instance of FX which handles that animation and only that animation and is unaware of any other manipulation to the element.</p>
<p>Now you could use the callback to put together some simple queuing to manage this for you. For example, to make an element continually fade-in and fade-out you could do this:</p>
<p>function show(){<br />
    new FX(el, {opacity: {to: 1}}, 1, hide).start();<br />
}</p>
<p>function hide(){<br />
    new FX(el, {opacity: {to: 0}}, 1, show).start();<br />
}</p>
<p>It&#8217;s actually funny you mentioned this, because with the next version of the framework I am actually adding as a plugin an entire queuing system as well as a bunch of features to have more control over the element itself.</p>
<p>Thanks again, and check back in the next couple months for the next version which hopefully should solve your problems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean K. Friese</title>
		<link>http://ryanmorr.com/archives/fx-lightweight-and-standalone-animation/comment-page-1#comment-1015</link>
		<dc:creator>Sean K. Friese</dc:creator>
		<pubDate>Thu, 01 Jul 2010 15:29:29 +0000</pubDate>
		<guid isPermaLink="false">http://ryanmorr.com/?p=281#comment-1015</guid>
		<description>Sorry - My comment really should have been added to: v2.0

(http://ryanmorr.com/archives/fx-2-0-the-full-featured-animation-framework)</description>
		<content:encoded><![CDATA[<p>Sorry &#8211; My comment really should have been added to: v2.0</p>
<p>(<a href="http://ryanmorr.com/archives/fx-2-0-the-full-featured-animation-framework" rel="nofollow">http://ryanmorr.com/archives/fx-2-0-the-full-featured-animation-framework</a>)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean K. Friese</title>
		<link>http://ryanmorr.com/archives/fx-lightweight-and-standalone-animation/comment-page-1#comment-1014</link>
		<dc:creator>Sean K. Friese</dc:creator>
		<pubDate>Thu, 01 Jul 2010 14:58:37 +0000</pubDate>
		<guid isPermaLink="false">http://ryanmorr.com/?p=281#comment-1014</guid>
		<description>Great work, Ryan!  This lightweight lib certainly ranks up there with some of the ones I&#039;ve been testing out, along with $fx().  However, I&#039;ve run across the same issue I&#039;ve discovered in other animation libs.

Here&#039;s the deal... If you launch your example page, located at http://www.ryanmorr.com/tests/fx/, you&#039;ll soon discover the issue by repetitively clicking on the &quot;Go!&quot; button.  The animations continue to &quot;queue up&quot; until they each retire, causing some rather erratic behavior.  It appears as though the $fx() lib accounts for this, which is why I&#039;ve settled on it in the past.

The only way around this issue in other libs, that I&#039;ve adopted in the past, is through killing any input method once the animation starts, then re-enabling input once it has completed.  This keeps any contiguous attempts to start other animations on the same element until the current one completes.  In other words, disable the button once it is clicked, and only enable it again in the callback.

Any *other* way around this?  Can your lib effectively &quot;kill&quot; any current animations for a given element upon starting a new one on that element?  I plan on combing through your code in a moment to see if I can extend it to catch such issues, but wanted to drop a line beforehand.

Regardless... Thanks for the top-notch contribution to the community.</description>
		<content:encoded><![CDATA[<p>Great work, Ryan!  This lightweight lib certainly ranks up there with some of the ones I&#8217;ve been testing out, along with $fx().  However, I&#8217;ve run across the same issue I&#8217;ve discovered in other animation libs.</p>
<p>Here&#8217;s the deal&#8230; If you launch your example page, located at <a href="http://www.ryanmorr.com/tests/fx/" rel="nofollow">http://www.ryanmorr.com/tests/fx/</a>, you&#8217;ll soon discover the issue by repetitively clicking on the &#8220;Go!&#8221; button.  The animations continue to &#8220;queue up&#8221; until they each retire, causing some rather erratic behavior.  It appears as though the $fx() lib accounts for this, which is why I&#8217;ve settled on it in the past.</p>
<p>The only way around this issue in other libs, that I&#8217;ve adopted in the past, is through killing any input method once the animation starts, then re-enabling input once it has completed.  This keeps any contiguous attempts to start other animations on the same element until the current one completes.  In other words, disable the button once it is clicked, and only enable it again in the callback.</p>
<p>Any *other* way around this?  Can your lib effectively &#8220;kill&#8221; any current animations for a given element upon starting a new one on that element?  I plan on combing through your code in a moment to see if I can extend it to catch such issues, but wanted to drop a line beforehand.</p>
<p>Regardless&#8230; Thanks for the top-notch contribution to the community.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Morr</title>
		<link>http://ryanmorr.com/archives/fx-lightweight-and-standalone-animation/comment-page-1#comment-270</link>
		<dc:creator>Ryan Morr</dc:creator>
		<pubDate>Tue, 07 Jul 2009 14:55:21 +0000</pubDate>
		<guid isPermaLink="false">http://ryanmorr.com/?p=281#comment-270</guid>
		<description>@Alexander

The link seems to work for me. You might want to try downloading the &lt;a href=&quot;http://ryanmorr.com/archives/fx-2-0-the-full-featured-animation-framework&quot; rel=&quot;nofollow&quot;&gt;newer version&lt;/a&gt; of this framework just released a few days ago.</description>
		<content:encoded><![CDATA[<p>@Alexander</p>
<p>The link seems to work for me. You might want to try downloading the <a href="http://ryanmorr.com/archives/fx-2-0-the-full-featured-animation-framework" rel="nofollow">newer version</a> of this framework just released a few days ago.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander</title>
		<link>http://ryanmorr.com/archives/fx-lightweight-and-standalone-animation/comment-page-1#comment-269</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Tue, 07 Jul 2009 05:35:07 +0000</pubDate>
		<guid isPermaLink="false">http://ryanmorr.com/?p=281#comment-269</guid>
		<description>Hi Ryan,

It looks like the link to compressed.js is down, when you have a moment could you look into this?

Thanks
Alex</description>
		<content:encoded><![CDATA[<p>Hi Ryan,</p>
<p>It looks like the link to compressed.js is down, when you have a moment could you look into this?</p>
<p>Thanks<br />
Alex</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Morr</title>
		<link>http://ryanmorr.com/archives/fx-lightweight-and-standalone-animation/comment-page-1#comment-260</link>
		<dc:creator>Ryan Morr</dc:creator>
		<pubDate>Thu, 18 Jun 2009 01:06:39 +0000</pubDate>
		<guid isPermaLink="false">http://ryanmorr.com/?p=281#comment-260</guid>
		<description>@Kim Wang

Honestly, not only can I not believe I didn&#039;t notice that, but I&#039;m not sure I ever even knew that. Apparently I don&#039;t know JavaScript prototypes as well as I thought I did.

I would consider this a bug, and therefore will not wait until version 2 to make this change.

Thanks for the heads up!</description>
		<content:encoded><![CDATA[<p>@Kim Wang</p>
<p>Honestly, not only can I not believe I didn&#8217;t notice that, but I&#8217;m not sure I ever even knew that. Apparently I don&#8217;t know JavaScript prototypes as well as I thought I did.</p>
<p>I would consider this a bug, and therefore will not wait until version 2 to make this change.</p>
<p>Thanks for the heads up!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kim Wang</title>
		<link>http://ryanmorr.com/archives/fx-lightweight-and-standalone-animation/comment-page-1#comment-258</link>
		<dc:creator>Kim Wang</dc:creator>
		<pubDate>Wed, 17 Jun 2009 01:36:15 +0000</pubDate>
		<guid isPermaLink="false">http://ryanmorr.com/?p=281#comment-258</guid>
		<description>var fx1 = new FX(&#039;bar1&#039;, {
        &#039;left&#039;: { from: 0, to: 100 }
    });
    fx1.play();
    
    var fx2 = new FX(&#039;bar2&#039;, {
        &#039;left&#039;: { from: 0, to: 150 }
    });
    fx2.play();

Here, a property called frame is a pointer to an Object containing one style &quot;left&quot; with value 100. 
Because frame is a reference value, both instances of FX point to the same Object. This means that when
“150” is added to fx2.frame, it is also reflected in fx1.frame.</description>
		<content:encoded><![CDATA[<p>var fx1 = new FX(&#8216;bar1&#8242;, {<br />
        &#8216;left&#8217;: { from: 0, to: 100 }<br />
    });<br />
    fx1.play();</p>
<p>    var fx2 = new FX(&#8216;bar2&#8242;, {<br />
        &#8216;left&#8217;: { from: 0, to: 150 }<br />
    });<br />
    fx2.play();</p>
<p>Here, a property called frame is a pointer to an Object containing one style &#8220;left&#8221; with value 100.<br />
Because frame is a reference value, both instances of FX point to the same Object. This means that when<br />
“150” is added to fx2.frame, it is also reflected in fx1.frame.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Morr</title>
		<link>http://ryanmorr.com/archives/fx-lightweight-and-standalone-animation/comment-page-1#comment-257</link>
		<dc:creator>Ryan Morr</dc:creator>
		<pubDate>Tue, 16 Jun 2009 23:21:43 +0000</pubDate>
		<guid isPermaLink="false">http://ryanmorr.com/?p=281#comment-257</guid>
		<description>@Kim Wang

I see what your driving at... you want easing capabilities, don&#039;t worry, its coming. 

Aside from that, I don&#039;t see much difference between your implementation and mine other than moving &quot;frame&quot;, &quot;endAttr&quot;, and &quot;startAttr&quot; into the constructor. 

Not sure what the difference is. Is their a particular reason why you&#039;ve done this?</description>
		<content:encoded><![CDATA[<p>@Kim Wang</p>
<p>I see what your driving at&#8230; you want easing capabilities, don&#8217;t worry, its coming. </p>
<p>Aside from that, I don&#8217;t see much difference between your implementation and mine other than moving &#8220;frame&#8221;, &#8220;endAttr&#8221;, and &#8220;startAttr&#8221; into the constructor. </p>
<p>Not sure what the difference is. Is their a particular reason why you&#8217;ve done this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kim Wang</title>
		<link>http://ryanmorr.com/archives/fx-lightweight-and-standalone-animation/comment-page-1#comment-255</link>
		<dc:creator>Kim Wang</dc:creator>
		<pubDate>Tue, 16 Jun 2009 02:16:55 +0000</pubDate>
		<guid isPermaLink="false">http://ryanmorr.com/?p=281#comment-255</guid>
		<description>The FX function should be changed to    

this.FX = function(el, attributes, opt) {
        this.el = DOM.get(el);
        this.attributes = attributes;
        this.duration = opt.duration &#124;&#124; 0.7;
        this.tweenType = opt.tweenType &#124;&#124; &quot;Sine&quot;;
        this.easeType = opt.easeType &#124;&#124; &quot;easeInOut&quot;;
        this.callback = opt.callback &#124;&#124; function() { };
        this.ctx = opt.ctx &#124;&#124; window;
        
        /**
        * The object to carry the current values for each frame
        * @type Object
        */
        this.frame =  {},

        /**
        * The object containing all the ending values for each attribute
        * @type Object
        */
        this.endAttr=  {},

        /**
        * The object containing all the starting values for each attribute
        * @type Object
        */
        this.startAttr= {};
    };</description>
		<content:encoded><![CDATA[<p>The FX function should be changed to    </p>
<p>this.FX = function(el, attributes, opt) {<br />
        this.el = DOM.get(el);<br />
        this.attributes = attributes;<br />
        this.duration = opt.duration || 0.7;<br />
        this.tweenType = opt.tweenType || &#8220;Sine&#8221;;<br />
        this.easeType = opt.easeType || &#8220;easeInOut&#8221;;<br />
        this.callback = opt.callback || function() { };<br />
        this.ctx = opt.ctx || window;</p>
<p>        /**<br />
        * The object to carry the current values for each frame<br />
        * @type Object<br />
        */<br />
        this.frame =  {},</p>
<p>        /**<br />
        * The object containing all the ending values for each attribute<br />
        * @type Object<br />
        */<br />
        this.endAttr=  {},</p>
<p>        /**<br />
        * The object containing all the starting values for each attribute<br />
        * @type Object<br />
        */<br />
        this.startAttr= {};<br />
    };</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony Alexander</title>
		<link>http://ryanmorr.com/archives/fx-lightweight-and-standalone-animation/comment-page-1#comment-228</link>
		<dc:creator>Anthony Alexander</dc:creator>
		<pubDate>Tue, 26 May 2009 16:05:17 +0000</pubDate>
		<guid isPermaLink="false">http://ryanmorr.com/?p=281#comment-228</guid>
		<description>I remember when my framework was light weight.. oh the good old days.. I didn&#039;t hate IE back then</description>
		<content:encoded><![CDATA[<p>I remember when my framework was light weight.. oh the good old days.. I didn&#8217;t hate IE back then</p>
]]></content:encoded>
	</item>
</channel>
</rss>
