# Draw Line tool like flash line tool

**URL:** https://forum.kirupa.com/t/draw-line-tool-like-flash-line-tool/306291
**Category:** flash
**Created:** [March 12, 2010, 11:30am UTC](https://forum.kirupa.com/t/draw-line-tool-like-flash-line-tool/306291 "2010-03-12T11:30:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![black\_pearl](https://avatars.discourse-cdn.com/v4/letter/b/aeb1de/32.png) [@black\_pearl](https://forum.kirupa.com/u/black_pearl)
#### Post date: [March 12, 2010, 11:30am UTC](https://forum.kirupa.com/t/draw-line-tool-like-flash-line-tool/306291/1 "2010-03-12T11:30:43Z")

</div>

I want to create a line tool exactly like flash line tool. But the code that I am using shows the line when we release the mouse button. How can I show the lines while it is drawing

```auto
this.createEmptyMovieClip("drawing_mc",this.getNextHighestDepth());
drawing_mc.lineStyle(1,100);

this.onMouseDown = function() {
    drawing_mc.moveTo(_xmouse,_ymouse);
};

this.onMouseUp = function() {
    drawing_mc.lineTo(_xmouse,_ymouse);
};

```
