io ho provato così, vedi se ti può andare bene

nei comandi del rettangolo:

onClipEvent (enterFrame) {
if (_root.foto.hitTest(_root._xmouse, _root._ymouse, true)) {
this.startDrag(true, left, top, right, bottom);
} else {
this.stopDrag();
}
}
onClipEvent (load) {
left = _root.foto._x-3;
top = _root.foto._y-3;
right = (_root.foto._x+_root.foto._width)-this._width;
bottom = (_root.foto._y+_root.foto._height)-this._height;
}


il 3 in queste due righe

left = _root.foto._x-3;
top = _root.foto._y-3;

l'ho messo per lasciare un po' di gioco al rettangolo, altrimenti si arrestava sempre prima del bordo della foto