PropertyTween

Kind of class:class
Inherits from:Tween < EventDispatcher < CoreObject
Version:03/22/07
Author:Aaron Clinger
Classpath:org.casalib.transitions.PropertyTween
File last modified:Monday, 01 December 2008, 13:34:40
A simple property tween class that extends Tween.
Example:
  • var boxMove:PropertyTween = new PropertyTween(this.box_mc, "_x", com.robertpenner.easing.Bounce.easeOut, 250, 2);
    boxMove.start();
Usage note:
  • If you want to tween a value other than a property use Tween.

Summary


Constructor
  • PropertyTween (scope:Object, property:String, equation:Function, endPos:Number, duration:Number, useFrames:Boolean)
    • Creates and defines property tween.
Instance methods
  • start : Void
    • Starts tween from start position.
  • resume : Void
    • Resumes tween from stopped position.
  • continueTo (endPos:Number, duration:Number) : Void
    • Instructs to tween from its current position to a new finish and duration position.
  • getScope : Object
    • Retrieves the object defined as scope in the class' constructor.
  • getProperty : String
    • Retrieves the property string defined in the class' constructor.
  • destroy : Void

Constructor

PropertyTween

function PropertyTween (
scope:Object, property:String, equation:Function, endPos:Number, duration:Number, useFrames:Boolean)

Creates and defines property tween.
Parameters:
scope :
An object that contains the property specified by "property".
property :
Name of the property you want to tween.
equation :
Tween equation.
endPos :
The ending value of the tween.
duration :
Length of time of the tween.
useFrames:
[optional] Indicates to use frames true, or seconds false in relation to the value specified in the duration parameter; defaults to false.
Usage note:
  • Class uses the property's current value when start is called as the starting position.

Instance methods

continueTo

function continueTo (
endPos:Number, duration:Number) : Void

Instructs to tween from its current position to a new finish and duration position.
#
Parameters:
endPos :
The ending value of the tween.
#
duration:
Length of time of the tween.
#
Overrides:

destroy

function destroy (
) : Void

Overrides:

getProperty

function getProperty (
) : String

Retrieves the property string defined in the class' constructor.
Returns:
  • Returns the name of property being tweened.

getScope

function getScope (
) : Object

Retrieves the object defined as scope in the class' constructor.
Returns:
  • Returns the object whose property is being tweened.

resume

function resume (
) : Void

Resumes tween from stopped position.
#
Overrides:

start

function start (
) : Void

Starts tween from start position.
#
Overrides: