TweenMS

Kind of class:class
Inherits from:BasicTweenMS < AbstractTween
Implements:
Version:1.0
Author:Francis Bourre
Classpath:com.bourre.transitions.TweenMS
File last modified:Wednesday, 31 October 2007, 07:35:30
TweenMS extends BasicTweenMS class implementing
Pixlib Event API.

Can use these methods to control Tween event :

Example

var t : TweenMS = new TweenMS(mc, '_alpha', 0, 2000, 100);
t.addListener(this);
t.addEventListener(TweenMS.onMotionFinishedEVENT, this, __onFinish);
t.start();

Constructor

TweenMS

function TweenMS (
nEnd:Number, nMs:Number, nStart:Number, fE:Function)
Constructs a new TweenFPS instance.

Example

var t:TweenFPS = new TweenMS(mc, '_alpha', 0, 2000, 100);
Parameters:
oT :
Object which the Tween targets.
sP :
Setter (method or property).
nE :
Ending value of property.
nMs:
Length of time of the motion in milliseconds.
nS :
(optional) Starting value of property.
fE :
(optional) Easing function.

Class properties

onMotionChangedEVENT

static onMotionChangedEVENT:TweenEventType = TweenEventType.onMotionChangedEVENT
(read,write)
Broadcasted to listeners when property value is updated.
Component metadata:
Event
onMotionChanged

onMotionFinishedEVENT

static onMotionFinishedEVENT:TweenEventType = TweenEventType.onMotionFinishedEVENT
(read,write)
Broadcasted to listeners when tween is finished.
Component metadata:
Event
onMotionFinished

onStartEVENT

static onStartEVENT:TweenEventType = TweenEventType.onStartEVENT
(read,write)
Broadcasted to listeners when tween starts.
Component metadata:
Event
onStart

onStopEVENT

static onStopEVENT:TweenEventType = TweenEventType.onStopEVENT
(read,write)
Broadcasted to listeners when tween stops.
Component metadata:
Event
onStop

Instance methods

addEventListener

function addEventListener (
e:TweenEventType) : Void
Adds listener for specifical event.

Example

t.addEventListener( TweenMS.onMotionFinishedEVENT, myListener );
Parameters:
t :
Name of the Event.
oL:
Listener object.

addListener

function addListener (
oL:ITweenListener) : Void
Adds listener for receiving all events.

Example

t.addListener(myListener);
Parameters:
oL:
Listener object which implements ITweenListener interface.
Specified by:

execute

function execute (
e:IEvent) : Void
Starts tweening

com.bourre.commands.Command polymorphism.

removeEventListener

function removeEventListener (
e:TweenEventType) : Void
Removes listener for specifical event.

Example

t.removeEventListener( TweenMS.onMotionFinishedEVENT, myListener );
Parameters:
t :
Name of the Event.
oL:
Listener object.

removeListener

function removeListener (
oL:ITweenListener) : Void
Removes listener for receiving all events.

Example

t.removeListener(myListener);
Parameters:
oL:
Listener object which implements ITweenListener interface.

start

function start (
) : Void
Starts tweening.

AbstractTween.start overridding

stop

function stop (
) : Void
Stops tweening.

AbstractTween.stop overridding

Specified by:

toString

function toString (
) : String
Returns the string representation of this instance.
Returns:
the string representation of this instance

Event handlers

onMotionFinished

function onMotionFinished (
) : Void
Implemented to add tween as listener to another tween.