A diffrence from player 6 to 8

I have this code that will work … when attched to a movie clip … in Flash Player 6 or less
BUT it will NOT work if the player is Flash 8.

onClipEvent(load){
homeX = this._x
homeY = this._y
magnet = 5000
}
onClipEvent(enterFrame){
x0 = this._x
y0 = this._y
x1 = _root._xmouse
y1 = _root._ymouse

distancex = x1-x0
distancey = y1-y0
distance = Math.sqrt((distancex * distancex) + (distancey * distancey))

powerx = this._x - (distancex / distance) * magnet / distance
powery = this._y - (distancey / distance) * magnet / distance
forcex = (forcex + (homex - x0) / 2) / 1.66
forcey = (forcey + (homey - y0) / 2) / 1.66
this._x = powerx + forcex
this._y = powery + forcey
}


so what in this code fails under 8?