Rev | Line | |
---|
[1240] | 1 | package 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.