|
Special notice! While MC Tween is a nice extension and it will continue to work for AS1 and AS2 until the end of time, it is my duty to inform all citizens that I have switched the focus from further development on MC Tween to a new AS2 and AS3 extension, a real Class this time, called "caurina.transitions.Tweener" (or just Tweener). Tweener doesn't have as many features as MC Tween yet (for example, it doesn't have native filter tweens), and the documentation isn't 100% done, but it features a complete, more solid redesign with a few additional syntax features that were impossible to achieve with MC Tween. And it works the same for AS2 (including Flash Lite 2+) and AS3.
So, if you use MC Tween, or you're thinking about using it, I'd like to suggest you try Tweener instead. It follows all the principles of simplicity I tried to feature on MC Tween, but with a more powerful syntax. Tweener download, examples and documentation are available on Tweener's page. You can read more about this change on this blog post.
Thank you for your attention and sorry for this ugly box. And don't worry, this website will not be deleted or anything.
Notice for October 2008: also note that, if you are still interested in MC Tween and don't want to use class-based AS2 or AS3 solutions, Larry Benedict has taken the matter into his hands and updated MC Tween with some filter features that are not available in the latest version. You can read more about it (and download his version) here or here.
Animation Types
When tweening properties with MC Tween, there are several different animation types (or easing equation or transition types) that can be used . They are all based on Robert Penner's easing equations, so if you have played with other tweening systems, chances are you already know them by name (I even used his own words to describe most of the transition types here). If you don't, don't worry; they're quite simple to learn and use: just specify the type you want depending on the transition you want to achieve.
How to chose the best transition type? That's a tough question. It depends on where you are applying the tweening. As a rule of thumb, I usually use easeOutExpo or easeInOutExpo on movieclip sliding and transformation (or easeOutBack or easeOutElastic when I want something extra-fancy); I use linear transitions on all color transitions, including alpha changes, and on all sound transitions. Be careful, though, to take animation time into consideration too - if you do a easeOutElastic transition in 0.3 seconds, you won't even notice it. So try different ammount of times until you find the value that fits your animation best.
To exemplify the animation types available in a more graphical fashion, below is a list of all of them with a little animation and some explanation: look at the small circle on the right-side of the movie and notice how different animation types make it move differently. The graph on the middle shows the relation between time and value applied when sliding the circle. Keep in mind that while I have chosen to animate an object in this example, 'moving' objects is just one of the possibilities of this tweening extension. These different transition types can be applied to alpha changes, rotations, time seeks, sound volume control, or to whichever numerical-based attributes you can think of.
Also notice that the "animation type" parameter is case-insensitive on MC Tween methods. The example movie used below can be download from the examples page (source included).
|
---|
|
---|
|
---|