I currently have this code fragment to move a crosshair and shoot things:

onClipEvent (load) {
Mouse.hide();
}
onClipEvent (enterFrame) {
this._x = _root._xmouse;
this._y = _root._ymouse;
this.swapDepths(_root.z+1);


if (_root._currentframe == 3) {
removeMovieClip("");
}
}


Is there a line of code I can add so that the aim stops being dragged if it hits a boundry – this is going to be centre in my work and I don’t want it being dragged everywhere.