I got this code from a friend that makes objects move away from your mouse like a backwards magnet, then moves back into place after the mouse is gone. I want to upgrade the code to scale the object down the further away it moves out of place, then return to full size when it moves back into place. I've tried a few diffrent things, nothing worked, I am pritty much confused how to do it at this point. If anybody could help me I would really appreciate it. Thanks in advance.

code------------------
//variables loaded once
onClipEvent(load){
homeX = this._x
homeY = this._y
magnet = 500
}

//variables = sub formula that update every new frame
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

//formula
this._x = powerx + forcex
this._y = powery + forcey
}
------------------------

This is a link to see what the code is doing now.
http://www.geocities.com/beatlemier

Thanks again for any help.