Sequence

Kind of class:class
Inherits from:Chain < EventDispatcher < CoreObject
Version:12/11/06
Author:Aaron Clinger
Classpath:org.casaframework.time.Sequence
File last modified:Wednesday, 07 March 2007, 14:18:41
Creates a sequence of methods calls at defined times.
Example:
function hideBox():Void {
    this.box_mc._visible = false;
}

function showBox():Void {
    this.box_mc._visible = true;
}

var seq:Sequence = new Sequence(true);
seq.addTask(this, "hideBox", 3000);
seq.addTask(this, "showBox", 1000);
seq.start();

Constructor

Sequence

function Sequence (
isLooping:Boolean)
Creates a new sequence.
Parameters:
isLooping:
[optional] Indicates the sequence replays once completed true, or stops false; defaults to false.

Instance methods

addTask

function addTask (
scope:Object, methodName:String, delay:Number, position:Number) : Void
Adds a method call to the sequence.
Parameters:
scope :
An object that contains the method specified by "methodName".
methodName:
A method that exists in the scope of the object specified by "scope".
delay :
The time in milliseconds after the previous call or from the start.
position :
[optional] Specifies the index of the insertion in the sequence order; defaults to the next position.