Packagecom.bit101.components
Classpublic class IndicatorLight
InheritanceIndicatorLight Inheritance Component Inheritance flash.display.Sprite



Public Properties
 PropertyDefined By
  color : uint
Sets / gets the color of this light (when lit).
IndicatorLight
 Inheritedenabled : Boolean
Sets/gets whether this component is enabled or not.
Component
 Inheritedheight : Number
[override] Sets/gets the height of the component.
Component
  isFlashing : Boolean
[read-only] Returns whether or not the light is currently flashing.
IndicatorLight
  isLit : Boolean
Sets or gets whether or not the light is lit.
IndicatorLight
  label : String
Sets / gets the label text shown on this component.
IndicatorLight
 Inheritedtag : int
Sets/gets in integer that can identify the component.
Component
 Inheritedwidth : Number
[override] Sets/gets the width of the component.
Component
 Inheritedx : Number
[override] [write-only] Overrides the setter for x to always place the component on a whole pixel.
Component
 Inheritedy : Number
[override] [write-only] Overrides the setter for y to always place the component on a whole pixel.
Component
Protected Properties
 PropertyDefined By
  _color : uint
IndicatorLight
 Inherited_enabled : Boolean = true
Component
 Inherited_height : Number = 0
Component
  _label : Label
IndicatorLight
  _labelText : String
IndicatorLight
  _lit : Boolean = false
IndicatorLight
  _lite : Shape
IndicatorLight
 InheritedRonda : Class
Component
 Inherited_tag : int = -1
Component
  _timer : Timer
IndicatorLight
 Inherited_width : Number = 0
Component
Public Methods
 MethodDefined By
  
IndicatorLight(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, color:uint = 0xff0000, label:String)
Constructor
IndicatorLight
  
draw():void
[override] Draws the visual ui of the component.
IndicatorLight
  
flash(interval:int = 500):void
Causes the light to flash on and off at the specified interval (milliseconds).
IndicatorLight
 Inherited
initStage(stage:Stage):void
[static] Utility method to set up usual stage align and scaling.
Component
 Inherited
move(xpos:Number, ypos:Number):void
Moves the component to the specified position.
Component
 Inherited
setSize(w:Number, h:Number):void
Sets the size of the component.
Component
Protected Methods
 MethodDefined By
  
[override] Creates the children for this component
IndicatorLight
  
drawLite():void
Draw the light.
IndicatorLight
 Inherited
getShadow(dist:Number, knockout:Boolean = false):DropShadowFilter
DropShadowFilter factory method, used in many of the components.
Component
  
init():void
[override] Initializes the component.
IndicatorLight
 Inherited
invalidate():void
Marks the component to be redrawn on the next frame.
Component
 Inherited
onInvalidate(event:Event):void
Called one frame after invalidate is called.
Component
  
onTimer(event:TimerEvent):void
Internal timer handler.
IndicatorLight
Public Constants
 ConstantDefined By
 InheritedDRAW : String = draw
[static]
Component
Property Detail
_colorproperty
protected var _color:uint

_labelproperty 
protected var _label:Label

_labelTextproperty 
protected var _labelText:String

_litproperty 
protected var _lit:Boolean = false

_liteproperty 
protected var _lite:Shape

_timerproperty 
protected var _timer:Timer

colorproperty 
color:uint

Sets / gets the color of this light (when lit).


Implementation
    public function get color():uint
    public function set color(value:uint):void
isFlashingproperty 
isFlashing:Boolean  [read-only]

Returns whether or not the light is currently flashing.


Implementation
    public function get isFlashing():Boolean
isLitproperty 
isLit:Boolean

Sets or gets whether or not the light is lit.


Implementation
    public function get isLit():Boolean
    public function set isLit(value:Boolean):void
labelproperty 
label:String

Sets / gets the label text shown on this component.


Implementation
    public function get label():String
    public function set label(value:String):void
Constructor Detail
IndicatorLight()Constructor
public function IndicatorLight(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, color:uint = 0xff0000, label:String)

Constructor

Parameters
parent:DisplayObjectContainer (default = null) — The parent DisplayObjectContainer on which to add this CheckBox.
 
xpos:Number (default = 0) — The x position to place this component.
 
ypos:Number (default = 0) — The y position to place this component.
 
color:uint (default = 0xff0000) — The color of this light.
 
label:String — String containing the label for this component.
Method Detail
addChildren()method
override protected function addChildren():void

Creates the children for this component

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

Draws the visual ui of the component.

drawLite()method 
protected function drawLite():void

Draw the light.

flash()method 
public function flash(interval:int = 500):void

Causes the light to flash on and off at the specified interval (milliseconds). A value less than 1 stops the flashing.

Parameters

interval:int (default = 500)

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

Initializes the component.

onTimer()method 
protected function onTimer(event:TimerEvent):void

Internal timer handler.

Parameters

event:TimerEvent — The TimerEvent passed by the system.