My favorites | Sign in
Project Logo
                
Show all Featured downloads:
thelab_bytetween_1_3.zip
People details
Project owners:
  egpdcosta

Intro

This project has the objective to host all as3 classes related to tweening. There will be 2 main focus:

1) ByteTween

Light weight engine (focusing in low Kb increase and not being a do-it-all engine).

v1.3

Fixes some bugs from v1.2 that causes malfunction on large number of tweens. Adds new modules to the module list, they are the Gradients module. Added too the ShortTween wich is a shortcut for the most common tweens (x,y,alpha,...). Correction of bugs added some bytes to the basic version.

Features

Modules Available

New Modules

ShortTween List

Usage:

//has_overlap: Flag that says if the engine will check overlap.
//has_control: Flag that says if the engine can do pause,unpause,cancel actions.
//... args: Adds 0 or more modules by just adding the module classes separated by commas.
//Ex.: ByteTween.init(stage,true,true,OverlapModule,ControlModule,ColorModule);
ByteTween.init(stage,has_overlap:Boolean,has_control:Boolean,... args);
ByteTween.add(target:*, property:String,value:*,duration:Number,delay:Number, ease:Function,p_callback:Function,... arguments);

//New ShortTween **some examples
ShortTween.x(target:*,pos_x:Number,duration:Number,delay:Number, ease:Function,p_callback:Function,... arguments);
ShortTween.alpha(target:*,alpha:Number,duration:Number,delay:Number, ease:Function,p_callback:Function,... arguments);
//Same as alpha but tween directly to alpha=1.0
ShortTween.fadeIn(target:*,duration:Number,delay:Number, ease:Function,p_callback:Function,... arguments);
//Same as alpha but tween directly to alpha=-0.1
ShortTween.fadeOut(target:*,duration:Number,delay:Number, ease:Function,p_callback:Function,... arguments);

v1.2

Upgrade of version 1.1 with pratically same features. The difference is now the system can be configured by setting wich functionality module you want active on compile time. With this system you can setup from just a numeric tweener to the full functional tween engine with color,scale,... tweens. Well this is the most stable version. I think that new versions will come in form of modules but now I'm busy in finishing the MotionPack and new useful classes for ya!

Features

v1.1

First official version. v1.0 is a gold version :).

Features

2) MotionPack

Package of classes,events and interfaces that allows the developer not only to do the common tweening tasks (with the BaseTween class), but also develop its own tweening classes. It uses a Interface system that allow easy implementation and do not use the only "slot" of the "extends" keyword :).

Easing Functions Expansion

Within the "org.thelab.motion.transition" package are the most common transitions used in tweens, and also the well known Robert Penner's transition functions.

But one can also implement its own tween functions.

Both tween engines uses default functions for it. The template for them is:

function ease_name(r:Number):Number;

Where the "r" parameter is a Number inside 0.0 -> 1.0 range. Where 0.0 is the tween start and 1.0 is the tween end. The result of this function is used in the following equation:

target[property] = initial_value + (delta_value)*ease_name(r);









Hosted by Google Code