# Drawing API

**URL:** <https://forum.kirupa.com/t/drawing-api/287163>\
**Category:** Uncategorized\
**Created:** [April 27, 2009, 2:12pm UTC](https://forum.kirupa.com/t/drawing-api/287163 "2009-04-27T14:12:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattj0070](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@mattj0070](https://forum.kirupa.com/u/mattj0070)\
**Post date:** [April 27, 2009, 2:12pm UTC](https://forum.kirupa.com/t/drawing-api/287163/1 "2009-04-27T14:12:53Z")

</div>

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]
