Package com.grafluxe
Class public class GXT
Language Version: ActionScript 3.0Class public class GXT
Runtime Versions: Flash Player 9, AIR 1.0, Flash Lite 4
Tween class.
Basic setup
import com.grafluxe.GXT;
import fl.motion.easing.*;
GXT.tweenTo(myMc, 2, {x: 400}, Elastic.easeIn, {onComplete: myFn});
function myFn():void {
trace('complete');
}
import fl.motion.easing.*;
GXT.tweenTo(myMc, 2, {x: 400}, Elastic.easeIn, {onComplete: myFn});
function myFn():void {
trace('complete');
}
Public Properties
Property
Defined By
defaultEase : Function = easeOutQuad
[static] The default ease to use across all tweens. Tween calls that have the ease param set override this default.
[static] The default ease to use across all tweens. Tween calls that have the ease param set override this default.
GXT
Public Methods
Method
Defined By
clearTweensOf(targ:DisplayObject):void
[static] Clear the tweens of a specified instance.
[static] Clear the tweens of a specified instance.
GXT
tweenFrom(targ:DisplayObject, secs:Number, props:Object, ease:Function = null, evts:Object = null):void
[static] Tween properties from a value to it's current value. More on the evts param.
[static] Tween properties from a value to it's current value. More on the evts param.
GXT
tweenTo(targ:DisplayObject, secs:Number, props:Object, ease:Function = null, evts:Object = null):void
[static] Tween properties to a value. More on the evts param.
[static] Tween properties to a value. More on the evts param.
GXT
Available properties of the 'evts' param:
onStart: Fires when the tween starts.
The onStart property expects either a function or an array with the first index as the function and the rest as arguments:
{onStart: myFn} or {onStart: [myFn, 'arg1', 'arg2']}
{onStart: myFn} or {onStart: [myFn, 'arg1', 'arg2']}
onChange: Fires when the tween updates.
The onChange property expects either a function or an array with the first index as the function and the rest as arguments:
{onChange: myFn} or {onChange: [myFn, 'arg1', 'arg2']}
{onChange: myFn} or {onChange: [myFn, 'arg1', 'arg2']}
onComplete: Fires when the tween completes.
The onComplete property expects either a function or an array with the first index as the function and the rest as arguments:
{onComplete: myFn} or {onComplete: [myFn, 'arg1', 'arg2']}
{onComplete: myFn} or {onComplete: [myFn, 'arg1', 'arg2']}
delay: Delays the start of the tween.
The delay property expects a number in second:
{delay: 2}
{delay: 2}
hideOnComplete: Sets the visibility of the target to false when the tween completes.
The hideOnComplete property expects a boolean:
{hideOnComplete: true}
{hideOnComplete: true}
Created Mar 12 2015