Draw box

Hello. I have a flash file that draws a box when the user clicks down on the mouse, adjusting the box to any size they need. Here is the code:

box._visible = false;
box.onMouseDown = function() {
	this._x = _root._xmouse;
	this._y = _root._ymouse;
	this._xscale = this._yscale=0;
	this._visible = true;
	this.onMouseMove = function() {
		this._xscale = _root._xmouse-this._x;
		this._yscale = _root._ymouse-this._y;
		updateAfterEvent();
	};
};
box.onMouseUp = function() {
	delete this.onMouseMove;
	this._visible = true;
};

This works fine, but I need the user to be able to create multiple boxes. Right now, after drawing a box, then clicking again it erases the existing box. I also need these boxes that are created to attach themselves to a movie clip. I’ve tried the attachMovie script, but cannot seem to get it to work the way I need it to. Any ideas?