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.


  1. 1 Chris09 Aug 2008

    Do you have the code that you put in the .fla file to make the bubbling effect that you have above? The download only includes the .as files.

  1. 1 EasingAround tween equations Cheatsheet | invassive.blog