# Drawing box within a movie

**URL:** <https://forum.kirupa.com/t/drawing-box-within-a-movie/213195>\
**Category:** flash\
**Created:** [January 17, 2007, 5:38pm UTC](https://forum.kirupa.com/t/drawing-box-within-a-movie/213195 "2007-01-17T17:38:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ljs](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@ljs](https://forum.kirupa.com/u/ljs)\
**Post date:** [January 17, 2007, 5:38pm UTC](https://forum.kirupa.com/t/drawing-box-within-a-movie/213195/1 "2007-01-17T17:38:40Z")

</div>

Hey i’m new to the forums and fairly new to flash, currently using flash 8.

This code below is from a tutorial on this site, what i want to do is create a drawing box within my movie, rather than having the whole background available to draw on like in this code, I want the user only to be able to draw on a small area of the movie. I am making an interactive movie where the user is allowed to graffiti on a wall, but the wall does not take up the whole scene, and there are other interactive elements in the scene that i don’t want the user to be able to draw all over

Anyone got any tips on how I could go about doing this, i’ve had a few goes myself but can’t seem to work it out, thanks.

// 1. SETTING THINGS  
\_root.createEmptyMovieClip(“line”,1);  
// 2. EVENTS IN \_ROOT:  
\_root.onMouseDown = function(){  
line.moveTo(\_xmouse,\_ymouse);  
line.lineStyle(2,0x000000,100);  
this.onMouseMove = function(){  
line.lineTo(\_xmouse,\_ymouse);  
updateAfterEvent();  
}  
}  
\_root.onMouseUp = function(){  
this.onMouseMove = null;  
}
