Package com.bit101.components
Class public class IndicatorLight
Inheritance IndicatorLight InheritanceComponent Inheritance flash.display.Sprite



Public Properties
  Property Defined By
    color : uint
Sets / gets the color of this light (when lit).
IndicatorLight
  Inherited enabled : Boolean
Sets/gets whether this component is enabled or not.
Component
  Inherited height : 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
  Inherited tag : int
Sets/gets in integer that can identify the component.
Component
  Inherited width : Number
[override] Sets/gets the width of the component.
Component
  Inherited x : Number
[override] [write-only] Overrides the setter for x to always place the component on a whole pixel.
Component
  Inherited y : Number
[override] [write-only] Overrides the setter for y to always place the component on a whole pixel.
Component
Protected Properties
  Property Defined 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
  Inherited Ronda : Class
Component
  Inherited _tag : int = -1
Component
    _timer : Timer
IndicatorLight
  Inherited _width : Number = 0
Component
Public Methods
  Method Defined 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
  Method Defined By
   
addChildren():void
[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
  Constant Defined By
  Inherited DRAW : String = draw
[static]
Component
Property Detail
_color property
protected var _color:uint

_label property  
protected var _label:Label

_labelText property  
protected var _labelText:String

_lit property  
protected var _lit:Boolean = false

_lite property  
protected var _lite:Shape

_timer property  
protected var _timer:Timer

color property  
color:uint

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


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

Returns whether or not the light is currently flashing.


Implementation
    public function get isFlashing():Boolean
isLit property  
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
label property  
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.