1 package org
.sevenchan
.dongs
.ui
3 import flash
.display
.Sprite;
8 public class LCDProgressBar
extends Sprite
10 public static const opacity
:Number = 0.5;
11 public var color
:uint = 0x000000;
12 public function LCDProgressBar
()
16 public function draw
(steps
:Number, max
:Number, h
:Number, w
:Number):void {
17 //trace("Drawing: {x:"+x+", y:"+y+", h:"+h+", w:"+w+"}");
19 graphics
.lineStyle
(2, 0x000000, opacity
);
20 graphics
.moveTo
(0, 0);
21 graphics
.lineTo
(w
, 0);
22 graphics
.lineTo
(w
, h
);
23 graphics
.lineTo
(0, h
);
24 graphics
.lineTo
(0, 0);
27 graphics
.beginFill
(0x000000, opacity
);
28 graphics
.drawRect
(3, 3, (steps
/max
)*(w
- 6), h
- 6);