Fps

Kind of class:class
Inherits from:CoreObject
Implements:
Version:12/14/06
Author:Aaron Clinger
Classpath:org.casaframework.util.Fps
File last modified:Wednesday, 07 March 2007, 14:18:49
Calculates the movie's frames per second.
Since:
Flash Player 7
Example:
var movieFps:Fps = Fps.getInstance();
this.movieFps.start();

this.myButton_btn.onRelease = function():Void {
    trace(this._parent.movieFps.getFps());
}

Summary

Instance properties
Instance properties inherited from CoreObject
Class methods

Class methods

getInstance

static function getInstance (
) : Fps
Returns:
Fps instance.

Instance methods

getFps

function getFps (
) : Number
Calculates the current frames per second of the movie.
Returns:
The FPS.

setFramesToAverage

function setFramesToAverage (
total:Number) : Void
Defines the amount of frames the class compares and averages.
Parameters:
total:
The amount of previous frames to average; defaults to 20.

start

function start (
) : Void
Starts observing the FPS and actively records and calulates the FPS.

stop

function stop (
) : Void
Stops observing the FPS.