| Package | com.bit101.components |
| Class | public class Meter |
| Inheritance | Meter Component flash.display.Sprite |
| Property | Defined by | ||
|---|---|---|---|
![]() | height : Number | Component | |
| label : String | Meter | ||
| maximum : Number | Meter | ||
| minimum : Number | Meter | ||
| showValues : Boolean | Meter | ||
| value : Number | Meter | ||
![]() | width : Number | Component | |
![]() | x : Number
Overrides the setter for x to always place the component on a whole pixel.
| Component | |
![]() | y : Number
Overrides the setter for y to always place the component on a whole pixel.
| Component | |
| Method | Defined by | ||
|---|---|---|---|
|
Meter(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, text:String = "")
Constructor
| Meter | ||
|
draw():void
Draws the visual ui of the component.
| Meter | ||
![]() |
initStage(stage:Stage):void
[static]
Utility method to set up usual stage align and scaling.
| Component | |
![]() |
move(xpos:Number, ypos:Number):void
Moves the component to the specified position.
| Component | |
|
setSize(w:Number, h:Number):void
Sets the size of the component.
| Meter | ||
| Method | Defined by | ||
|---|---|---|---|
|
addChildren():void
Creates and adds the child display objects of this component.
| Meter | ||
![]() |
getShadow(dist:Number, knockout:Boolean = false):DropShadowFilter
DropShadowFilter factory method, used in many of the components.
| Component | |
|
init():void
Initializes the component.
| Meter | ||
![]() |
invalidate():void
Marks the component to be redrawn on the next frame.
| Component | |
| label | property |
label:String [read-write]Implementation
public function get label():String
public function set label(value:String):void
| maximum | property |
maximum:Number [read-write]Implementation
public function get maximum():Number
public function set maximum(value:Number):void
| minimum | property |
minimum:Number [read-write]Implementation
public function get minimum():Number
public function set minimum(value:Number):void
| showValues | property |
showValues:Boolean [read-write]Implementation
public function get showValues():Boolean
public function set showValues(value:Boolean):void
| value | property |
value:Number [read-write]Implementation
public function get value():Number
public function set value(value:Number):void
| Meter | () | constructor |
public function Meter(parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, text:String = "")Constructor
Parametersparent:DisplayObjectContainer (default = null) — The parent DisplayObjectContainer on which to add this Meter.
|
|
xpos:Number (default = 0) — The x position to place this component.
|
|
ypos:Number (default = 0) — The y position to place this component.
|
|
text:String (default = "") — The string to use as the initial text in this component.
|
| addChildren | () | method |
protected override function addChildren():voidCreates and adds the child display objects of this component.
| draw | () | method |
public override function draw():voidDraws the visual ui of the component.
| init | () | method |
protected override function init():voidInitializes the component.
| setSize | () | method |
public override function setSize(w:Number, h:Number):voidSets the size of the component. Adjusts height to be 1/2 width.
Parametersw:Number — The width of the component.
|
|
h:Number — The height of the component.
|