whY?

why wont this code work in flash 8? it works in flash 5, but nothing higher. I cant seem to figure it out…

This is the code thats on the frame.



MovieClip.prototype.move = function(centerx, inertia, k) {
    x = -this._x+centerx;
    xp = xp*inertia+x*k;
    _x += xp;
};


This is the code thats on the MC.



onClipEvent (load) {
    // We define the reference point
    centerx = 0
    centery = 0
    // temporary variables used to calculate
    // the speed of the mass
    x0 = this._x;
}
onClipEvent (enterFrame) {
    if (pressing) {
        startDrag(this, false, -1000, this._y, Stage.width, this._y);
        xp = this._x-x0;
        x0 = this._x;
    } else {
        stopDrag();
        this.move(centerx, 0.9, 0.1);
    }
}



This is the code inside the MC on a button.



on (press) {
    pressing = 1;
}
on (releaseOutside) {
    pressing = 0;
}
on (release) {
    pressing = 0;
}


All it does is lets you drag the specific object to the sides and then when you let go it will snap back to place in an elastic type motion. Any help would be much appreciated. Thanks.

Jake Mize