Sequence

Kind of class:class
Inherits from:Chain < EventDispatcher < CoreObject
Version:09/12/07
Author:Aaron Clinger
Classpath:org.casalib.time.Sequence
File last modified:Monday, 01 December 2008, 13:34:40
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();

Summary


Constructor
  • Sequence (isLooping:Boolean)
    • Creates a new sequence.
Class properties
Instance methods
  • addTask (scope:Object, methodName:String, delay:Number, position:Number) : Void
    • Adds a method call to the sequence.

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.