Class sandy.core.transform.BasicInterpolator

Description

Method Index

addEventListener(), broadcastEvent(), destroy(), dispatchEvent(), getDuration(), getDurationElapsed(), getDurationRemaining(), getFrame(), getMatrix(), getPercent(), getProgress(), getType(), isFinished(), isModified(), isPaused(), pause(), redo(), removeEventListener(), resume(), setDuration(), setModified(), yoyo()

Method Detail

pause

public function pause(Void):Void

Make a pause in the Interpolation. You can continue the motion later with resume method. Broadcast an InterpolationEvent.

resume

public function resume(Void):Void

Resume the motion after it was paused. Broadcast an InterpolationEvent.

redo

public function redo(Void):Void

redo

Make the interpolation starting again

yoyo

public function yoyo(Void):Void

yoyo

Make the interpolation going in the inversed way

getFrame

public function getFrame(Void):Number

getPercent

public function getPercent(Void):Number

Returns the percent of the interpolator. 0 is the beginning, and 100 is the end.

Parameters

Void

Return

a Number between [0-100] corresponding on the percentage of the interpolation progress.

getProgress

public function getProgress(Void):Number

Returns the progress of the interpolator. 0 is the beginning, and 1 is the end.

Parameters

Void

Return

a Number between [0-1] corresponding on the interpolation progress.

getType

public function getType(Void):TransformType

Returns the type of the interpolation.

Parameters

Void

Return

TransformType the type of the interpolation

setDuration

public function setDuration(t:Number):Void

set the interpolation duration in number of frames. Could be lower than 5!

Parameters

Return

Void

getDuration

public function getDuration(Void):Number

getDurationElapsed

public function getDurationElapsed(Void):Number

getDurationRemaining

public function getDurationRemaining(Void):Number

destroy

public function destroy(Void):Void

Destroy the transformation instance and remove all its listeners. Shall be implemented in the derivated classes.

Parameters

Void

addEventListener

public function addEventListener(t:String, oL):Void

Adds passed-in oL listener for receiving passed-in t event type.

Take a look at example below to see all possible method call.

Example var oEB : IEventDispatcher = new EventBroadcaster(this); oEB.addEventListener( myClass.onSometingEVENT, myFirstObject); oEB.addEventListener( myClass.onSometingElseEVENT, this, __onSomethingElse); oEB.addEventListener( myClass.onSometingElseEVENT, this, Delegate.create(this, __onSomething) );

Parameters

tName of the Event.
oLListener object.

removeEventListener

public function removeEventListener(t:String, oL):Void

Removes passed-in oL listener that suscribed for passed-in t event.

Example var oEB : IEventDispatcher = new EventBroadcaster(this); oEB.removeEventListener( myClass.onSometingEVENT, myFirstObject); oEB.removeEventListener( myClass.onSometingElseEVENT, this);

Parameters

tName of the Event.
oLListener object.

dispatchEvent

public function dispatchEvent(o:Object):Void

Wrapper for Macromedia EventDispatcher polymorphism.

Example var oEB : IEventDispatcher = new EventBroadcaster(this); oEB.dispatchEvent( {type:'onSomething', target:this, param:12} );

Parameters

oEvent object.

broadcastEvent

public function broadcastEvent(e:IEvent):Void

Broadcasts event to suscribed listeners.

Example using full Pixlib API var oEB : IEventDispatcher = new EventBroadcaster(this); var e : IEvent = new BasicEvent( myClass.onSomeThing, this); oEB.addEventListener( myClass.onSomeThing, this); oEB.broadcastEvent( e );

Parameters

ean IEvent instance

getMatrix

public function getMatrix(Void):Matrix4

Returns the associated matrix.

Parameters

Void

Return

Matrix4 The matrix of the transform3D associated to the interpolator.

isModified

public function isModified(Void):Boolean

Allows you to know if the transformation has been modified.

Parameters

Void

Return

Boolean True if the transformation has been modified, false otherwise.

setModified

public function setModified(b:Boolean):Void

Set the transformation as modified or not. Very usefull for the cache transformation system.

Parameters

bBoolean True value means the transformation has been modified, and false the opposite.

isFinished

public function isFinished(Void):Boolean

isPaused

public function isPaused(Void):Boolean