# Fading Drawing API lines?

**URL:** <https://forum.kirupa.com/t/fading-drawing-api-lines/189298>\
**Category:** Uncategorized\
**Created:** [June 1, 2006, 3:01pm UTC](https://forum.kirupa.com/t/fading-drawing-api-lines/189298 "2006-06-01T15:01:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mwirth](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@mwirth](https://forum.kirupa.com/u/mwirth)\
**Post date:** [June 1, 2006, 3:01pm UTC](https://forum.kirupa.com/t/fading-drawing-api-lines/189298/1 "2006-06-01T15:01:44Z")

</div>

Im trying to figure out how to capture segments of a LineTo path to an array. and start to fade out pieces to \_alpha = 25. I thinking they should start to fade when the array length reaches a certain value…Any suggestions ?

```auto
bloop = .90;
lineStyle(.20, 0xff0033, 45, true, "none", "square", "miter", 0.8);
var lines:Array = new Array();
segments =0;

moveTo(dot_mc._x, dot_mc._y);
dot_mc.vx = dot_mc.vy = 0;
dot_mc.onEnterFrame = function() {
    
    this.vx += Math.random()*.8-.4;
    this.vy += Math.random()*.8-.4;
    this.vx *= bloop;
    this.vy *= bloop;
     
    this._x += this.vx;
    this._y += this.vy;
    lineTo(this._x, this._y);
    //trace(ct);
    
    segments += 1;
        name = "line"+segments;
        lines[name] = [this._x, this._y];
    
    if(segments >=50) {
        var popped:Object = lines.pop();
        popped.lineStyle(10, ct, 45, true, "none", "square", "miter", 0.8);
        trace(popped);
    }
    
};

```
