Fps
Kind of class: | class |
---|---|
Inherits from: | CoreObject |
Implements: | |
Version: | 12/14/06 |
Author: | Aaron Clinger |
Classpath: | org.casalib.util.Fps |
File last modified: | Monday, 01 December 2008, 13:34:40 |
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
Class methods
Instance methods
- getFps : Number
- Calculates the current frames per second of the movie.
- setFramesToAverage (total:Number) : Void
- Defines the amount of frames the class compares and averages.
- start : Void
- Starts observing the FPS and actively records and calulates the FPS.
- stop : Void
- Stops observing the FPS.
Instance methods inherited from CoreObject
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.
Specified by:
stop
function stop (
) : Void
Stops observing the FPS.
Specified by: