Packagecom.gestureworks.utils
Classpublic class Stats
InheritanceStats Inheritance flash.display.Sprite

The Stats class provides a simple FPS and RAM tracking widget intended for general purpose debugging.



Public Properties
 PropertyDefined By
  backgroundColor : uint
Sets the background color of the widget.
Stats
  fillBackground : Boolean
Determines if the background is displayed.
Stats
  resetOnTouch : Boolean
All data will be reset if the widget is clicked and this property is true.
Stats
  textColor : uint
Sets the color of the text on the widget.
Stats
  trackFPS : Boolean
If set to true, FPS tracking will be enabled.
Stats
  trackRAM : Boolean
If set to true, RAM tracking will be enabled
Stats
Public Methods
 MethodDefined By
  
Stats(x:int = 0, y:int = 0, color:uint = 0xffffff, fillBackground:Boolean = true, backgroundColor:uint = 0x000000, fpsHistoryDuration:uint = 5000, ramHistoryDuration:uint = 5000, resetOnTouch:Boolean = true, ramUpdateFrequency:uint = 200)
Constructor for the Stats class.
Stats
  
reset():void
reset forces all tracked data to be thrown out.
Stats
  
updateFPS():void
updateFPS forces an update to the FPS statistics tracking.
Stats
  
updateRAM():void
updateRam() forces an update to the RAM statistics tracking.
Stats
Property Detail
backgroundColorproperty
backgroundColor:uint

Sets the background color of the widget.

The default value is 0x000000.


Implementation
    public function get backgroundColor():uint
    public function set backgroundColor(value:uint):void
fillBackgroundproperty 
fillBackground:Boolean

Determines if the background is displayed. The background will be rendered if fillBackground is set to true.

The default value is true.


Implementation
    public function get fillBackground():Boolean
    public function set fillBackground(value:Boolean):void
resetOnTouchproperty 
resetOnTouch:Boolean

All data will be reset if the widget is clicked and this property is true.

The default value is true.


Implementation
    public function get resetOnTouch():Boolean
    public function set resetOnTouch(value:Boolean):void
textColorproperty 
textColor:uint

Sets the color of the text on the widget.

The default value is 0xffffff.


Implementation
    public function get textColor():uint
    public function set textColor(value:uint):void
trackFPSproperty 
trackFPS:Boolean

If set to true, FPS tracking will be enabled.

The default value is true.


Implementation
    public function get trackFPS():Boolean
    public function set trackFPS(value:Boolean):void
trackRAMproperty 
trackRAM:Boolean

If set to true, RAM tracking will be enabled

The default value is true.


Implementation
    public function get trackRAM():Boolean
    public function set trackRAM(value:Boolean):void
Constructor Detail
Stats()Constructor
public function Stats(x:int = 0, y:int = 0, color:uint = 0xffffff, fillBackground:Boolean = true, backgroundColor:uint = 0x000000, fpsHistoryDuration:uint = 5000, ramHistoryDuration:uint = 5000, resetOnTouch:Boolean = true, ramUpdateFrequency:uint = 200)

Constructor for the Stats class.

Parameters
x:int (default = 0) — desired x-position of this widget.
 
y:int (default = 0) — desired y-position of this widget.
 
color:uint (default = 0xffffff) — desired text color.
 
fillBackground:Boolean (default = true) — if true, the text background will be rendered.
 
backgroundColor:uint (default = 0x000000) — The desired background color.
 
fpsHistoryDuration:uint (default = 5000) — The duration of the running average for the FPS in milliseconds.
 
ramHistoryDuration:uint (default = 5000) — The duration of the running average for the RAM in milliseconds.
 
resetOnTouch:Boolean (default = true) — If true, touching the widget will cause all existing data to be reset
 
ramUpdateFrequency:uint (default = 200) — This parameter determines how often (in milliseconds) the ram will be updated.
Method Detail
reset()method
public function reset():void

reset forces all tracked data to be thrown out.

updateFPS()method 
public function updateFPS():void

updateFPS forces an update to the FPS statistics tracking.

updateRAM()method 
public function updateRAM():void

updateRam() forces an update to the RAM statistics tracking.