Packageorg.flixel.system.debug
Classpublic class Log
InheritanceLog Inheritance FlxWindow Inheritance flash.display.Sprite

A simple trace output window 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
 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
 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
  _lines : Array
Log
 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
Log
 Inherited_title : TextField
Window display element.
FlxWindow
 Inherited_width : uint
Width of the window.
FlxWindow
Public Methods
 MethodDefined By
  
Log(Title:String, Width:Number, Height:Number, Resizable:Boolean = true, Bounds:Rectangle = null, BGColor:uint = 0x7f7f7f7f, TopColor:uint = 0x7f000000)
Creates a new window object.
Log
  
add(Text:String):void
Adds a new line to the log window.
Log
  
destroy():void
[override] Clean up memory.
Log
 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
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
  
updateSize():void
[override] Adjusts the width and height of the text field accordingly.
Log
Protected Constants
 ConstantDefined By
  MAX_LOG_LINES : uint = 200
[static]
Log
Property Detail
_linesproperty
protected var _lines:Array

_textproperty 
protected var _text:TextField

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

Creates a 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 a 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
add()method
public function add(Text:String):void

Adds a new line to the log window.

Parameters

Text:String — The line you want to add to the log window.

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

Clean up memory.

updateSize()method 
override protected function updateSize():void

Adjusts the width and height of the text field accordingly.

Constant Detail
MAX_LOG_LINESConstant
protected static const MAX_LOG_LINES:uint = 200