# Drawing api tutorial

**URL:** <https://forum.kirupa.com/t/drawing-api-tutorial/227715>\
**Category:** flash\
**Created:** [June 1, 2007, 2:03pm UTC](https://forum.kirupa.com/t/drawing-api-tutorial/227715 "2007-06-01T14:03:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FlashFish](https://avatars.discourse-cdn.com/v4/letter/f/b9e5f3/32.png) [@FlashFish](https://forum.kirupa.com/u/FlashFish)\
**Post date:** [June 1, 2007, 2:03pm UTC](https://forum.kirupa.com/t/drawing-api-tutorial/227715/1 "2007-06-01T14:03:37Z")

</div>

Yo. I’m using some code from this tutorial on a project

[http://www.kirupa.com/developer/actionscript/drawingboard.htm](http://www.kirupa.com/developer/actionscript/drawingboard.htm)

and I need to modify it so that you can only draw on certain areas of the screen. I chucked in an if (\_xmouse \< 118) but that just means you can’t start drawing past 118 and you can still start before 118 and drag all over. I imagine a mask or summat should do the trick but I’m not sure where the lines actually are in terms of layers or levels. Can I load in something to cover it on a level above? Or anything? Cheers in advance.
