PropertyTween

Kind of class:public class
Package:org.casalib.transitions
Inherits from:Tween < Process < RemovableEventDispatcher < EventDispatcher
Version:07/08/08
Author:Aaron Clinger, Mike Creighton
Classpath:org.casalib.transitions.PropertyTween
File last modified:Wednesday, 31 December 2008, 20:18:28
A simple property tween class that extends Tween.
Example:
  • package {
        import fl.motion.easing.Bounce;
        import flash.display.MovieClip;
        import flash.display.Sprite;
        import org.casalib.transitions.PropertyTween;
    
    
        public class MyExample extends MovieClip {
            protected var _box:Sprite;
            protected var _tween:PropertyTween;
    
    
            public function MyExample() {
                super();
    
                this._box = new Sprite();
                this._box.graphics.beginFill(0xFF00FF);
                this._box.graphics.drawRect(0, 0, 25, 25);
                this._box.graphics.endFill();
    
                this.addChild(this._box);
    
                this._tween = new PropertyTween(this._box, "x", Bounce.easeOut, 200, 5);
                this._tween.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 = false)
    • Creates and defines a new PropertyTween.
Class properties
Class properties inherited from Process
Instance properties
  • scope : Object
    • Retrieves the object defined as scope in the class' constructor.
  • property : String
    • Retrieves the property as a String defined in the class' constructor.

Constructor

PropertyTween

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

Creates and defines a new PropertyTween.
Parameters:
scope :
An object that contains the property specified by property.
property :
Name of the property you want to tween.
equation :
The tween equation.
endPos :
The ending value of the transition.
duration :
Length of time of the transition.
useFrames:
Indicates to use frames true, or seconds false in relation to the value specified in the duration parameter.
Usage note:
  • The function specified in the equation parameter must follow the (currentTime, startPosition, endPosition, totalTime) parameter standard.

Instance properties

property

public property:String
(read)

Retrieves the property as a String defined in the class' constructor.

scope

public scope:Object
(read)

Retrieves the object defined as scope in the class' constructor.