# Flash pencil tool using actionscript

**URL:** <https://forum.kirupa.com/t/flash-pencil-tool-using-actionscript/295643>\
**Category:** Uncategorized\
**Created:** [September 2, 2009, 9:33am UTC](https://forum.kirupa.com/t/flash-pencil-tool-using-actionscript/295643 "2009-09-02T09:33:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaji](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@shaji](https://forum.kirupa.com/u/shaji)\
**Post date:** [September 2, 2009, 9:33am UTC](https://forum.kirupa.com/t/flash-pencil-tool-using-actionscript/295643/1 "2009-09-02T09:33:47Z")

</div>

Hi, I need help with smoothing of lines. I have a application wherein the user can draw lines in any form. Most of the lines drawn aren’t smooth enough and in some instances the lines are very much zagged.

I happened to check similar functionality in the flash IDE, lines when drawn using pencil tool is zagged when the mouse is released the line smoothens. I would like to create the same smoothing functionality after the line is drawn using actionscript drawing API. Is there any algorithm or techniques using which I can acheive it.

Thanks  
James
