Packageorg.flixel.system.debug
Classpublic class Perf
InheritancePerf Inheritance FlxWindow Inheritance flash.display.Sprite

A simple performance monitor widget, for use in the debugger overlay.



Public Properties
 PropertyDefined By
 InheritedmaxSize : Point
Maximum allowed X and Y dimensions for this window.
FlxWindow
 InheritedminSize : Point
Minimum allowed X and Y dimensions for this window.
FlxWindow
Protected Properties
 PropertyDefined By
  _activeObject : Array
Perf
 Inherited_background : Bitmap
Window display element.
FlxWindow
 Inherited_bounds : Rectangle
Controls where the window is allowed to be positioned.
FlxWindow
 Inherited_drag : Point
Helper for interaction.
FlxWindow
 Inherited_dragging : Boolean
Helper for interaction.
FlxWindow
  _flash : Array
Perf
  _flashMarker : uint
Perf
  _flixelDraw : Array
Perf
  _flixelDrawMarker : uint
Perf
  _flixelUpdate : Array
Perf
  _flixelUpdateMarker : uint
Perf
 Inherited_handle : Bitmap
Window display element.
FlxWindow
 Inherited_header : Bitmap
Window display element.
FlxWindow
 Inherited_height : uint
Height of the window.
FlxWindow
 InheritedImgHandle : Class
FlxWindow
  _lastTime : int
Perf
  _objectMarker : uint
Perf
 Inherited_overHandle : Boolean
Helper for interaction.
FlxWindow
 Inherited_overHeader : Boolean
Helper for interaction.
FlxWindow
 Inherited_resizable : Boolean
Helper for interaction.
FlxWindow
 Inherited_resizing : Boolean
Helper for interaction.
FlxWindow
 Inherited_shadow : Bitmap
Window display element.
FlxWindow
  _text : TextField
Perf
 Inherited_title : TextField
Window display element.
FlxWindow
  _updateTimer : int
Perf
  _visibleObject : Array
Perf
  _visibleObjectMarker : uint
Perf
 Inherited_width : uint
Width of the window.
FlxWindow
Public Methods
 MethodDefined By
  
Perf(Title:String, Width:Number, Height:Number, Resizable:Boolean = true, Bounds:Rectangle = null, BGColor:uint = 0x7f7f7f7f, TopColor:uint = 0x7f000000)
Creates flashPlayerFramerate new window object.
Perf
  
activeObjects(Count:int):void
Keep track of how many objects were updated.
Perf
  
destroy():void
[override] Clean up memory.
Perf
  
flash(Time:int):void
Keep track of how long the Flash player and browser take.
Perf
  
flixelDraw(Time:int):void
Keep track of how long renders take.
Perf
  
flixelUpdate(Time:int):void
Keep track of how long updates take.
Perf
 Inherited
reposition(X:Number, Y:Number):void
Change the position of the window.
FlxWindow
 Inherited
resize(Width:Number, Height:Number):void
Resize the window.
FlxWindow
  
update():void
Called each frame, but really only updates once every second or so, to save on performance.
Perf
  
visibleObjects(Count:int):void
Keep track of how many objects were updated.
Perf
Protected Methods
 MethodDefined By
 Inherited
bound():void
Keep the window within the pre-specified bounding rectangle.
FlxWindow
 Inherited
init(E:Event = null):void
Used to set up basic mouse listeners.
FlxWindow
 Inherited
onMouseDown(E:MouseEvent = null):void
Figure out if window is being repositioned (clicked on header) or resized (clicked on handle).
FlxWindow
 Inherited
onMouseMove(E:MouseEvent = null):void
Mouse movement handler.
FlxWindow
 Inherited
onMouseUp(E:MouseEvent = null):void
User let go of header bar or handler (or nothing), so turn off drag and resize behaviors.
FlxWindow
 Inherited
updateGUI():void
Figure out if the header or handle are highlighted.
FlxWindow
 Inherited
updateSize():void
Update the Flash shapes to match the new size, and reposition the header, shadow, and handle accordingly.
FlxWindow
Property Detail
_activeObjectproperty
protected var _activeObject:Array

_flashproperty 
protected var _flash:Array

_flashMarkerproperty 
protected var _flashMarker:uint

_flixelDrawproperty 
protected var _flixelDraw:Array

_flixelDrawMarkerproperty 
protected var _flixelDrawMarker:uint

_flixelUpdateproperty 
protected var _flixelUpdate:Array

_flixelUpdateMarkerproperty 
protected var _flixelUpdateMarker:uint

_lastTimeproperty 
protected var _lastTime:int

_objectMarkerproperty 
protected var _objectMarker:uint

_textproperty 
protected var _text:TextField

_updateTimerproperty 
protected var _updateTimer:int

_visibleObjectproperty 
protected var _visibleObject:Array

_visibleObjectMarkerproperty 
protected var _visibleObjectMarker:uint

Constructor Detail
Perf()Constructor
public function Perf(Title:String, Width:Number, Height:Number, Resizable:Boolean = true, Bounds:Rectangle = null, BGColor:uint = 0x7f7f7f7f, TopColor:uint = 0x7f000000)

Creates flashPlayerFramerate new window object. This Flash-based class is mainly (only?) used by FlxDebugger.

Parameters
Title:String — The name of the window, displayed in the header bar.
 
Width:Number — The initial width of the window.
 
Height:Number — The initial height of the window.
 
Resizable:Boolean (default = true) — Whether you can change the size of the window with flashPlayerFramerate drag handle.
 
Bounds:Rectangle (default = null) — A rectangle indicating the valid screen area for the window.
 
BGColor:uint (default = 0x7f7f7f7f) — What color the window background should be, default is gray and transparent.
 
TopColor:uint (default = 0x7f000000) — What color the window header bar should be, default is black and transparent.
Method Detail
activeObjects()method
public function activeObjects(Count:int):void

Keep track of how many objects were updated.

Parameters

Count:int — How many objects were updated.

destroy()method 
override public function destroy():void

Clean up memory.

flash()method 
public function flash(Time:int):void

Keep track of how long the Flash player and browser take.

Parameters

Time:int — How long Flash/browser took.

flixelDraw()method 
public function flixelDraw(Time:int):void

Keep track of how long renders take.

Parameters

Time:int — How long this render took.

flixelUpdate()method 
public function flixelUpdate(Time:int):void

Keep track of how long updates take.

Parameters

Time:int — How long this update took.

update()method 
public function update():void

Called each frame, but really only updates once every second or so, to save on performance. Takes all the data in the accumulators and parses it into useful performance data.

visibleObjects()method 
public function visibleObjects(Count:int):void

Keep track of how many objects were updated.

Parameters

Count:int — How many objects were updated.