An indicator light that can be turned on, off, or set_to flash.

Constructor

new (?parent:DisplayObjectContainer, ?xpos:Float, ?ypos:Float, ?color:UInt, ?label:String)

Constructor

Parameters:

parent

The parent DisplayObjectContainer on which to add this CheckBox.

xpos

The x position to place this component.

ypos

The y position to place this component.

color

The color of this light.

label

String containing the label for this component.

Variables

color:UInt

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

read onlyisFlashing:Bool

Returns whether or not the light is currently flashing.

isLit:Bool

Sets or gets whether or not the light is lit.

label:String

Sets / gets the label text shown on this component.

Methods

draw ():Void

Draws the visual ui of the component.

flash (?interval:Int):Void

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

get_color ():UInt

get_isLit ():Bool

get_label ():String

set_color (value:UInt):UInt

set_isLit (value:Bool):Bool

set_label (str:String):String

Inherited Variables

Defined by Component

enabled:Bool

Sets/gets whether this component is enabled or not.

tag:Int

Sets/gets in integer that can identify the component.

Inherited Methods

Defined by Component

get_enabled ():Bool

get_height ():Float

get_tag ():Int

get_width ():Float

move (xpos:Float, ypos:Float):Void

Moves the component to the specified position.

Parameters:

xpos

the x position to move the component

ypos

the y position to move the component

setSize (w:Float, h:Float):Void

Sets the size of the component.

Parameters:

w

The width of the component.

h

The height of the component.

set_enabled (value:Bool):Bool

set_height (value:Float):Void

Sets/gets the height of the component.

set_tag (value:Int):Int

set_width (value:Float):Void

Sets/gets the width of the component.

set_x (value:Float):Void

Overrides the setter for x to always place the component on a whole pixel.

set_y (value:Float):Void

Overrides the setter for y to always place the component on a whole pixel.