There are several Fx
methods that are useful for working with animation Fx
. You've already seen one of them, the start()
method, which simply starts an animation effect. In this section, we shall go over methods available to you when working with MooTools animation.
The start()
method allows you to start an effect. It takes in the properties you'd like to transition, and their end value. Here are a few examples of using the start method format on instances of Fx.Tween
and Fx.Morph
.
// In Fx.Tween this transitions the width from the current value //to 100px myTween.start('width', 100); // In Fx.Tween this transitions the width from 50px to 100px myTween.start('width', 50, 100); // In Fx.Morph this transitions the height to 100 and the color //to #ff0000 myMorph.start({ 'height' : 100, 'color' : #ff0000 }); // In Fx.Morph this transitions the height from 50px to 100px myMorph.start({ 'height' : [50px, 100px] });