Drawing Board

I need to know how to script the drawing board as in the user can only draw on a specified area.For example, on a 800x600 layout, only 1/4 of it is the drawing board.After the user has drawn the image, when he/she clicks on a button, the image will be replicated on another area in the same 800x600 space.
So far, i can only manage to make a drawing board on the whole 800x600 space and erasing. Seriously need help…

Why don’t you make your drawing board a movie clip that has some onClipEvent handlers like:

onPress() … draw
onRelease … stop drawing


This is how my script looks but i need the drawing to be restrain to only part of the stage.That means the user can only draw on this particular square area on the stage.The user can’t draw on any other parts of the stage except the specified one.

_root.onMouseDown = function(){
_root.lineStyle(5, 0x000000, 100);
_root.moveTo(_root._xmouse, _root._ymouse);
isDrawing = true;
_root.onMouseMove = function() {
if (isDrawing == true) {
_root.lineTo(_root._xmouse, _root._ymouse);
_root.onMouseUp = function() {
isDrawing = false;
clear_btn.onRelease = function() {

Anyway, thanks for the reply…