About easing classes and methods

Adding tweens and transitions to a file in Flash describes how to use the Bounce easing class to add a bouncing effect to the movie clip. In addition to Bounce, Flash offers five additional easing classes, which are described in the following table:

Transition

Description

Back

Extends the animation beyond the transition range at one or both ends once to resemble an overflow effect.

Bounce

Adds a bouncing effect within the transition range at one or both ends. The number of bounces relates to the duration--longer durations produce more bounces.

Elastic

Adds an elastic effect that falls outside the transition range at one or both ends. The amount of elasticity is unaffected by the duration.

Regular

Adds slower movement at one or both ends. This feature lets you add a speeding up effect, a slowing down effect, or both.

Strong

Adds slower movement at one or both ends. This effect is similar to Regular easing, but it's more pronounced.

None

Adds an equal movement from start to end without effects, slowing down, or speeding up. This transition is also called a linear transition.

These six easing classes each have three easing methods, which are described in the following table:

Method

Description

easeIn

Provides the easing effect at the beginning of the transition.

easeOut

Provides the easing effect at the end of the transition.

easeInOut

Provides the easing effect at the beginning and end of the transition.

To open these classes in Flash or your ActionScript editor, browse to Hard Disk\Program Files\Adobe\Adobe Flash CS3\language\First Run\Classes\mx\transitions\easing\ folder on Windows (assumes a default installation), or Macintosh HD:Applications:Adobe Flash CS3:First Run:Classes:mx:transitions:easing.

The procedure on zooming images under Animating with the TransitionManager and Tween classes used the mx.transitions.easing.Bounce.easeOut easing class and method. In the folder on your hard disk, the ActionScript refers to the easeOut() method within the Bounce.as class. This ActionScript file is in the easing folder.

For information on each method and property of the Tween class and TransitionManager class, see ActionScript 2.0 Components Language Reference.

TIP

 

To preview how each transition works with the different methods in the easing classes, you can double-click Transition.swf in boot drive\Program Files\Adobe\Adobe Flash CS3\language\First Run\Behaviors\ or Macintosh HD:Applications:Adobe Flash CS3:First Run:Behaviors: to open the SWF file in the stand-alone player.

For a sample source file that adds scripted animation using the Tween and TransitionManager classes, tweenProgress.fla, see the Flash Samples page at www.adobe.com/go/learn_fl_samples. Download the Samples zip file and navigate to the ActionScript2.0/Tween ProgressBar folder to access this sample.


Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00000963.html