Following mouse and stop following mouse

i have a movieclip that when pressed the following code executes:


function startDragging(mc1:MovieClip) {
    onEnterFrame = function () {
        mc1._x = _root._xmouse;
        mc1._y = _root._ymouse;
    };
}

jiggy1_1.onPress = function() {
    this.swapDepths(0);
    startDragging(jiggy1_1);
};

this enables it to follow the mouse but how do i then stop it following the mouse when the mouse is clicked again?