# Drawing board tutorial

**URL:** <https://forum.kirupa.com/t/drawing-board-tutorial/1606>\
**Category:** Uncategorized\
**Created:** [June 7, 2002, 5:15pm UTC](https://forum.kirupa.com/t/drawing-board-tutorial/1606 "2002-06-07T17:15:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 7, 2002, 5:15pm UTC](https://forum.kirupa.com/t/drawing-board-tutorial/1606/1 "2002-06-07T17:15:24Z")

</div>

I think that it might be missing a few lines of code at the end. The end result doesn´t work too well. Here´s what I have in the actions for the “container clip”\r\r\ronClipEvent (load) {\r&nbsp &nbsp &nbsp &nbsp function draw () {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp i++ ;\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp this.attachMovie(“mcLine”,“line”+i,i);\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp var mc = this[“line”+i] ;\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp x\_start = x\_end ;\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp y\_start = y\_end ;\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp x\_end = \_xmouse ;\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp y\_end = \_ymouse ;\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp mc.\_x = x\_start ;\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp mc.\_y = y\_start ;\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp mc.\_xscale = x\_end - x\_start ;\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp mc.\_yscale = y\_end - y\_start ;\r&nbsp &nbsp &nbsp &nbsp }\r}\ronClipEvent(mouseUp){\r pressing = 0;\r}\r\ronClipEvent (enterFrame) {\r&nbsp &nbsp &nbsp &nbsp if (pressing) draw () ;\r}\r\r\rI´m using Flash 5.\r\rSeems to me that the pressing variable needs to be set to 1 at some point, so I tried adding \r\ronClipEvent(mouseDown){\r pressing = 1;\r}\r\r\rwhich works, but it always starts at the end of the last line. Which, as the tutorial points out, is good for creating polygons but not for a drawing board.\r\r\rshould these lines be edited?\r\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp x\_start = x\_end ;\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp y\_start = y\_end ;\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp x\_end = \_xmouse ;\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp y\_end = \_ymouse ;\r\r\rany followup?\r\rgood tutorial otherwise.\r\rthanks\r\_sic

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 7, 2002, 10:43pm UTC](https://forum.kirupa.com/t/drawing-board-tutorial/1606/2 "2002-06-07T22:43:43Z")

</div>

Oops, I must have forgotten that…\r\rAnd concerning the polygon thing, of course you have to put \_xend = \_xmouse and everything. I was just trying to show why we had to put that…\r\rThanks !!\r\rpom 0]
