source: EDIS/trunk/java/tracking-ui-core/src/main/flex/gov/va/med/edp/widget/Tick.as@ 1227

Last change on this file since 1227 was 1227, checked in by George Lilly, 13 years ago

initial load of EDIS 1.0

File size: 666 bytes
Line 
1package gov.va.med.edp.widget {
2
3 import flash.display.Sprite;
4
5
6
7 import mx.effects.Fade;
8
9
10
11 public class Tick extends Sprite {
12
13 private var tickFade:Fade = new Fade(this);
14
15
16
17
18
19 public function Tick(fromX:Number, fromY:Number, toX:Number, toY:Number, tickWidth:int, tickColor:uint) {
20
21 this.graphics.lineStyle(tickWidth, tickColor, 1.0, false, "normal", "rounded");
22
23 this.graphics.moveTo(fromX, fromY);
24
25 this.graphics.lineTo(toX, toY);
26
27 }
28
29
30
31
32
33 public function fade(duration:Number):void {
34
35 tickFade.alphaFrom = 1.0;
36
37 tickFade.alphaTo = 0.1;
38
39 tickFade.duration = duration;
40
41 tickFade.play();
42
43 }
44
45 }
46
47}
Note: See TracBrowser for help on using the repository browser.