# Drawing API (Multiple Freeflowing Lines Issue)

**URL:** <https://forum.kirupa.com/t/drawing-api-multiple-freeflowing-lines-issue/211870>\
**Category:** flash\
**Created:** [January 5, 2007, 10:46pm UTC](https://forum.kirupa.com/t/drawing-api-multiple-freeflowing-lines-issue/211870 "2007-01-05T22:46:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![enriquepr](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/enriquepr/32/459_2.png) [@enriquepr](https://forum.kirupa.com/u/enriquepr)\
**Post date:** [January 5, 2007, 10:46pm UTC](https://forum.kirupa.com/t/drawing-api-multiple-freeflowing-lines-issue/211870/1 "2007-01-05T22:46:28Z")

</div>

I really need a fresh set of developer eyes to look at this one. I’ve been goofing around with learning the Drawing API and I cannot understand why this creates line segments rather than creating a free flowing line (if this needs more explanation, just let me know I really couldn’t think of another way to say it right now). Anyway, I’d like to see if anyone can explain that to me because I’m just confused. Any help or words are greatly appreciated.

To explain a little bit, I’ve just been going for the effect of drawing a line and whenever it is drawn over the 1 object I currently have on the stage, it reacts (only with a trace at the moment).

The code:

```auto
drawLevel = 0;
this.onMouseDown = function() {
	this.createEmptyMovieClip("sharp_mc"+drawLevel, drawLevel);
	this["sharp_mc"+drawLevel].sx = _xmouse;
	this["sharp_mc"+drawLevel].sy = _ymouse;
	this["sharp_mc"+drawLevel].drawing = true;
	createShape.apply(this["sharp_mc"+drawLevel]);
	drawLevel += 1;
};
createShape = function () {
	this.onMouseMove = function() {
		if (this.drawing) {
			this.cx = _xmouse;
			this.cy = _ymouse;
			this.clear();
			this.lineStyle(8, 0xFF9900, 50);
			this.moveTo(this.sx, this.sy);
			this.lineTo(this.cx, this.cy);
			updateAfterEvent();
		}
	};
	this.onMouseUp = function() {
		this.drawing = false;
		if (this.hitTest(photo1)) {
			trace("You Chose The First One!");
		}
	};
};

```
