Adding a box to the sketch pad

Hi there,

I have a simple drawing pad that works, but I want to allow the user to draw only in a certain area (only within the box).

** My current code is:**

this.createEmptyMovieClip(“your_lines”, 100);
var Drawing_in_progress:Boolean = false;

//sets up a mouse listener event
var mouseListener:Object = new Object();
mouseListener.onMouseDown = function() {
// lineStyle(line width, hex color value, alpha)
your_lines.lineStyle(2, 0x00FF00, 100);
// sets the current drawing position
your_lines.moveTo(_xmouse, _ymouse);
Drawing_in_progress = true;
};
mouseListener.onMouseMove = function() {
if (Drawing_in_progress == true) {
//Draws a line using the current line style from the current drawing postion to (x,y)
your_lines.lineTo(_xmouse, _ymouse);
updateAfterEvent();
}
};
mouseListener.onMouseUp = function() {
Drawing_in_progress = false;
};
Mouse.addListener(mouseListener);

// sets up button to delete all the lines
delete_lines.onRelease = function() {
your_lines.clear();
};

Any help is appreciated. Thank you!