Access keys

Animations

Kind of class: class
Inherits from: none
Version: 1.01
Author: Jeroen Wijering
Classpath: com.jeroenwijering.utils.Animations
File last modified: Thursday, 16 November 2006, 15:52:22
A couple of commonly used animation functions
Example:
import com.jeroenwijering.utils.Animations;
Animations.fadeIn('some_clip');
Animations.write('some_title_clip','A sunny day at the beach',2);

Summary

Class methods

easeTo

static function easeTo (
tgt:MovieClip, xps:Number, yps:Number, spd:Number) : Void
Easing enterframe function for a Movieclip.
Parameters:
tgt:
MovieClip of the balloon to iterate
xps:
Final x position.
yps:
Final y position.
spd:
Speed of the ease (1 to 10)

fadeIn

static function fadeIn (
tgt:MovieClip, end:Number, spd:Number) : Void
Fadein function for MovieClip.
Parameters:
tgt:
Movieclip to fade.
end:
Final alpha value.
inc:
Speed of the fade (increment per frame).

fadeOut

static function fadeOut (
tgt:MovieClip, end:Number, spd:Number, rmv:Boolean) : Void
Fadeout function for MovieClip.
Parameters:
tgt:
Movieclip to fade.
end:
Final alpha value.
inc:
Speed of the fade (increment per frame).
rmv:
Remove the clip after fadeout.

jump

static function jump (
tgt:MovieClip, scl:Number, spd:Number) : Void
Make a Movieclip jump to a specific scale
Parameters:
tgt:
Movieclip that should jump.
scl:
Final scale.
spd:
Oscillation speed (0 to 1).

setColor

static function setColor (
tgt:MovieClip, red:Number, gre:Number, blu:Number, dur:Number) : Void
Transform the color of a MovieClip over time
Parameters:
tgt:
Target MovieClip.
red:
Red channel offset.
gre:
Green channel offset.
blu:
Blue channel offset.
dur:
Duration of the transformation (1 to 100).

write

static function write (
tgt:MovieClip, txt:String, spd:Number) : Void
Write text character by character in a Movieclip's 'tf' (and 'tf2') textfield.
Parameters:
tgt:
Movieclip to draw the shape into.
txt:
Text to write.
spd:
Writing speed (number of chars per frame).