This class shows a value in a horizontal chart.
It is used by the Information class to show charge, inverter and oil.
| private | Number | y = 12 | |
| private | Number | height = 13 | |
| private | Number | _value | |
| private | Number | rgb = 0x003366 | |
| private | Graphics | graph | |
| public | Void | value |
GraphBar() |
| private | onLoad() |
private y:Number = 12
Y position of the bar, default value is 12
private height:Number = 13
height of the bar, default value is 13
private _value:Number
internal value, it is accessed through the setters and getters only
private rgb:Number = 0x003366
color of the bar, default value is 0x003366 (blue)
private graph:Graphics
this is an instance of the Graphics class that it's used to paint the bar
public value:Void
Description: Setter of the private property _value. Cleans the graph and draws a new value
Assumptions: the graph has already been instantiated
Globals: uses graph and _value
Calls: clearAll() and fillRect() of the graph Object
Is Called by: This function is called by the Information class to set the value of this specific graph (charge, inverter or oil)
GraphBar()
private onLoad():Void
Description: creates a new graph and sets its properties
Globals: instantiates graph
Calls: setLocation() and setColor() of the object graph
Is Called by: This function is called automatically by the player when this object is completely loaded. This is possible because this class extends from the MovieClip Class
- Returns
- Void