Caurina Tweener for haXe

Tweener is a powerful tweening Class for Flash ActionScript. You can tween any numeric value of an object via code.

The author of Tweener is Zeh Fernando.

My contribution was the port to haXe. Tweener for haXe is a single version for AS2 and AS3 projects, thanks to conditional compiling.

haXe?

haXe is a free ActionScript compiler but is also a new language.

Usage

I'll not bore with details here, if you don't know how to use please visit original project page here and online documentation here.

Some AS2 samples anyway:

import caurina.transitions.Tweener;
Tweener.addTween ([movieclip, textfield], {_alpha:100, time:1});


import caurina.transitions.Tweener;
Tweener.removeTweens (movieclip, ["_x", "_y", "_alpha"]);


import caurina.transitions.Tweener;
import caurina.transitions.properties.CurveModifiers;
CurveModifiers.init();
var myPath = new Array();
myPath.push ({_x:120, _y:120});
myPath.push ({_x:650, _y:280});
myPath.push ({_x:750, _y:60});
Tweener.addTween (movieclip, {_x:50, _y:50, _bezier:myPath, time:2, transition:"easeoutquad"});


import caurina.transitions.Tweener;
import caurina.transitions.properties.ColorShortcuts;
ColorShortcuts.init();
Tweener.addTween (movieclip, {_color:0xFF0000, time:2, transition:"linear"});

Features

"-D tweener_lite" conditional compiling flag. Will limit Tweener as folows:

• only linear and Cubic equations are available (easeOutCubic is also the default if none specified);

• isTweening, getTweens, getTweenCount, addCaller methods are disabled;

• only blur and glow from FilterShortcuts are available;

• only _text property from TextShortcuts is available;

• scrollRect not available;

• only _color and _colorTransform available from ColorShortcuts.


Test with all special properties included: 22kb full; 16kb with tweener_lite. But you'll not get this difference if used without special properties.

Known problems

• DisplacementMapFilter special property is missing.

• Tweener.addCaller - transitions works oposite as normal (ex: easeInCubic works as easeOutCubic, and vice versa).

Download

download source (AS2+AS3 1.31.71)

download usage samples (AS2+AS3 1.31.71)

Contact

If you want to check how I am, if you want to report bugs or solve them, or have a question, use the e-mail.

E-mail: cristi.baluta on gmail.com

Links

Original project page and more info about Tweener

Online documentation for Tweener

more haxelib projects (old interface)

haxelib usage

my personal website