FrameTime

Kind of class:class
Inherits from:CoreObject
Version:08/02/07
Author:Aaron Clinger
Classpath:org.casalib.time.FrameTime
File last modified:Monday, 01 December 2008, 13:34:40
Creates a common time which isn't affected by delays caused by code execution; the time is only updated every frame.
Example:
  • var frameTimeInstance:FrameTime = FrameTime.getInstance();
    var field:TextField;
    var total:Number = 25;
    
    while (total--) {
        var field = this.createTextField("timer" + total + "_txt", this.getNextHighestDepth(), 0, total * 22, 500, 22);
        field.text = "Time when this field was created = " + frameTimeInstance.getTime();
    }

Summary


Class methods
Instance methods
Instance methods inherited from CoreObject

Class methods

getInstance

static function getInstance (

Returns:

Instance methods

getTime

function getTime (
) : Number

Returns:
  • Returns the number of milliseconds from when the SWF started playing to the last onEnterFrame event.