com.triomotor

GraphBar

extends: MovieClip

This class shows a value in a horizontal chart.
It is used by the Information class to show charge, inverter and oil.

See Also
Graphics, Information

Property Summary

private Numbery = 12
private Numberheight = 13
private Number_value
private Numberrgb = 0x003366
private Graphicsgraph
public Voidvalue

Constructor Summary

GraphBar()

Method Summary

private onLoad()

Property Details

y

private y:Number = 12

Y position of the bar, default value is 12

height

private height:Number = 13

height of the bar, default value is 13

_value

private _value:Number

internal value, it is accessed through the setters and getters only

rgb

private rgb:Number = 0x003366

color of the bar, default value is 0x003366 (blue)

graph

private graph:Graphics

this is an instance of the Graphics class that it's used to paint the bar

value

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)

Constructor Details

GraphBar

GraphBar()

Method Details

onLoad

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