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 ?
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);
}
};