Um. Why do you need this? What purpose does this code serve?
On Thu, Jan 15, 2009 at 1:13 PM, David Nolen (via Nabble) <
[email protected]<ml-user%[email protected]>
> wrote:
> window.addEvent('domready', run);
>
> var FxChain = new Class({
>
> name: "FxChain",
>
> Extends: Chain,
> Implements: Events,
>
> initialize: function()
> {
> this.chain(arguments);
> this.running = [];
> },
>
> callChain: function()
> {
> var fx = this.parent();
> if(fx)
> {
> this.running.push(fx);
> fx.addEvent('onComplete', this.callChain.bind(this));
> }
> },
>
> clearChain: function()
> {
> this.running.each(function(fx) {fx.cancel();});
> this.parent();
> }
>
> });
>
> var myChain;
> function run()
> {
> $('red').set('tween', {
> duration: 500,
> transition: Fx.Transitions.Cubic.easeIn
> });
> $('green').set('tween', {
> duration: 500,
> transition: Fx.Transitions.Cubic.easeOut
> });
> $('blue').set('tween', {
> duration: 500,
> transition: Fx.Transitions.Cubic.easeOut
> });
>
> myChain = new FxChain(
> function() { return $('red').get('tween').start('left', 200); },
> function() { return $('green').get('tween').start('left', 400); },
> function() { return $('blue').get('tween').start('left', 600); }
> );
>
> myChain.callChain();
> }
>
> Note that with FxChain you MUST return the animation as a return value of
> each function in the chain.
>
>
> ------------------------------
> View message @
> http://n2.nabble.com/Generalized-FxChain-Solution-tp2164944p2164944.html
> To start a new topic under MooTools Users, email
> [email protected]<ml-node%[email protected]>
> To unsubscribe from MooTools Users, click here< (link removed) >.
>
>
>
-----
The MooTools Tutorial: http://www.mootorial.com www.mootorial.com
Clientcide: http://www.clientcide.com www.clientcide.com
--
View this message in context:
http://n2.nabble.com/Generalized-FxChain-Solution-tp2164944p2164958.html
Sent from the MooTools Users mailing list archive at Nabble.com.