Archive for the 'EasingAround' Category

13AprEasingAround tween equations Cheatsheet

Download
EasingAround.zip v.1.0.2

After discovering the cheatseet available for the Tweener API, I've adapted it to display the equations from the EasingAround classes.

It is helpful to compare this graphs with the ones from the original equations, so I've included the original cheatseet created by the Tweener team.

This movie requires Flash Player 9

And this is the original cheatsheet from the Tweener project.

This movie requires Flash Player 9

Tweener is a popular framework for creating tweens in actionscript 2 and 3.

11AprEasingAround equations: simple easing back and forth

That should be "forth and back".

EasingAround is a class to simplify even more very basic tweens. The idea behind this class is to provide a means to create a tween that starts and ends at the same value.

Download
EasingAround.zip v.1.0.2

If your regular Easing function [from 1 to 10] behaves as follows:

   1 . . . . 5 . . . . 10

then, an EasingAround function with the same parameters behaves as:

   1 . .5. . 10 . .5. . 1

in the same amount of time.

These equations come in handy when we want to create some quick animation -like button rollovers- with the shortest code, without having to "chain" two consecutive tweens.

Example (rollover the icon or click the stage to tween):

This movie requires Flash Player 9

This is the code for the rollover tween:

new Tween(box, "scaleX", EasingAround.easeInOutSine, 1, 2, 0.3, true)
new Tween(box, "scaleY", EasingAround.easeInOutSine, 1, 2, 0.3, true)

This class contains only the easing equations and should be compatible with any AS3 tween engine out there (e.g. Tweener) or with code that uses fl.motion.easing.* or fl.transitions.easing.*

The functions are named as follows:

EasingAround.easeNone

EasingAround.easeInQuad
EasingAround.easeOutQuad
EasingAround.easeInOutQuad
EasingAround.easeOutInQuad

EasingAround.easeInCubic
EasingAround.easeOutCubic
EasingAround.easeInOutCubic
EasingAround.easeOutInCubic

etc...

Note: EasingAround uses the original easing equations by Robert Penner.