Re: smooth movement back to origin

What up. I’m making a website, and it’s using a drag and drop type deal for navigation. Basically the user must click and drag a module into the “dropZone” to go to that particular section.
here’s the AS I’m using so far:


*this.onLoad = function() {
    startX1 = button1._x;
    startY1 = button1._y;
};*

dropZone.onMouseUp = function() {
    //------------------------------
    if (dropZone.hitTest(button1)) {
        button1._x = dropZone._x;
        button1._y = dropZone._y;
        button1.stopDrag();
    **} else {
        button1._x = startX1;
        button1._y = startY1;
        button1.stopDrag();
    }**
};


Basically, button1 is the button that the user is dragging to the drop zone. Now, my query is about the bolded section. What that does, is when the user unclicks the mouse button, the module springs back to its origin which is defined during an onLoad event (in italics). Right now, it just jumps back to the origin, as opposed to smoothly animating back to the origin (which is what i want, and don’t know how to code). Thanks in advance!!!