Drawing API

I am creating a car driving game in Flash 8. Im using the Drawing API to make the car leave tracks as it moves using the following method:

lines = {}
_root.createEmptyMovieClip(“pen”, 10)
pen.lineStyle(10, 000000, 6)
pen.moveTo(this.car._x, this.car._y)

_root.onEnterFrame = function(){

	pen.lineTo(this.car._x, this.car._y)
	segments += 1
	name = "line"+segments
	lines[name] = [this.car._x, this.car._y]

}

A requirement of the game although is that the tracks fade after 2 - 3 car lengths and I was not sure if this was possible using the method I have already implemented.

Any help would be much appriciated!

[COLOR=“Red”][SIZE=“1”]modEdit: Your identical thread in Game/AI Programming has been removed. Please avoid crossposting in the future.[/SIZE][/COLOR]