Extremely Easy Question about Rollout

I have this code attached to a button:

onClipEvent (enterFrame) {
_root.xInit = 150;
_root.yInit = 150;

if (_root._ymouse > 50 && _root._ymouse < 150) {
    _root.yChange = Math.round(_root._ymouse-this._y);
    _root.xChange = Math.round(_root._xmouse-this._x);
    _root.yMove = Math.round(_root.yChange/20);
    _root.xMove = Math.round(_root.xChange/20);
    this._y += _root.yMove;
    this._x += _root.xMove;
}
else {
	_root.yChange = Math.round(this._y - 60);
	_root.xChange = Math.round(this._x - 50);
	_root.yMove = Math.round(_root.yChange/20);		
	_root.xMove = Math.round(_root.xChange/20);
	this._x -= _root.xMove;
	this._y -= _root.yMove;
}

}instanceName.

onRollOutustomEasing = {};
customEasing.pts = [{Mx:0,My:0,Nx:18,Ny:-236,Px:2,Py:-19},{Mx:20,My:-255,Nx:16,Ny:-96,Px:2,Py:119},{Mx:38,My:-232,Nx:30,Ny:186,Px:3,Py:-148},{Mx:71,My:-194,Nx:22,Ny:-46,Px:8,Py:37},{Mx:101,My:-203,Nx:30,Ny:24,Px:1,Py:-21},{Mx:132,My:-200,Nx:28,Ny:-6,Px:4,Py:6},{Mx:164,My:-200,Nx:40,Ny:2,Px:-4,Py:-2},{Mx:200, My:-200}];
customEasing.ease = function(t,b,c,d,pl){
var i,r;
r = 200 * t/d;
for(i = 0;r>pl[i+1].Mx;i++){
}
i=pl*;
if(i.Px != 0){
r=(-i.Nx+Math.sqrt(i.Nxi.Nx-4i.Px*(i.Mx-r)))/(2i.Px);
}else{
r=-(i.Mx-r)/i.Nx;
}
return b-c
((i.My+i.Nyr+i.Pyr*r)/200);
}

Flash says:

Error Scene=Scene 1, layer=Layer 1, frame=1:Line 22: Statement must appear within on/onClipEvent handler
}instanceName.

Error Scene=Scene 1, layer=Layer 1, frame=1:Line 24: Statement must appear within on/onClipEvent handler
customEasing.pts = [{Mx:0,My:0,Nx:18,Ny:-236,Px:2,Py:-19},{Mx:20,My:-255,Nx:16,Ny:-96,Px:2,Py:119},{Mx:38,My:-232,Nx:30,Ny:186,Px:3,Py:-148},{Mx:71,My:-194,Nx:22,Ny:-46,Px:8,Py:37},{Mx:101,My:-203,Nx:30,Ny:24,Px:1,Py:-21},{Mx:132,My:-200,Nx:28,Ny:-6,Px:4,Py:6},{Mx:164,My:-200,Nx:40,Ny:2,Px:-4,Py:-2},{Mx:200, My:-200}];

Error Scene=Scene 1, layer=Layer 1, frame=1:Line 25: Statement must appear within on/onClipEvent handler
customEasing.ease = function(t,b,c,d,pl){

Total ActionScript Errors: 3 Reported Errors: 3

how do I fix this

-Dean

onClipEvent (enterFrame) {
_root.xInit = 150;
_root.yInit = 150;
if (_root._ymouse>50 && _root._ymouse<150) {
_root.yChange = Math.round(_root._ymouse-this._y);
_root.xChange = Math.round(_root._xmouse-this._x);
_root.yMove = Math.round(_root.yChange/20);
_root.xMove = Math.round(_root.xChange/20);
this._y += _root.yMove;
this._x += _root.xMove;
} else {
_root.yChange = Math.round(this._y-60);
_root.xChange = Math.round(this._x-50);
_root.yMove = Math.round(_root.yChange/20);
_root.xMove = Math.round(_root.xChange/20);
this._x -= _root.xMove;
this._y -= _root.yMove;
}
instanceName.onRollOut = function() {
customEasing.pts = [{Mx:0, My:0, Nx:18, Ny:-236, Px:2, Py:-19}, {Mx:20, My:-255, Nx:16, Ny:-96, Px:2, Py:119}, {Mx:38, My:-232, Nx:30, Ny:186, Px:3, Py:-148}, {Mx:71, My:-194, Nx:22, Ny:-46, Px:8, Py:37}, {Mx:101, My:-203, Nx:30, Ny:24, Px:1, Py:-21}, {Mx:132, My:-200, Nx:28, Ny:-6, Px:4, Py:6}, {Mx:164, My:-200, Nx:40, Ny:2, Px:-4, Py:-2}, {Mx:200, My:-200}];
customEasing.ease = function(t, b, c, d, pl) {
var i, r;
r = 200t/d;
for (i=0; r>pl[i+1].Mx; i++) {
}
i = pl
;
if (i.Px != 0) {
r = (-i.Nx+Math.sqrt(i.Nxi.Nx-4i.Px*(i.Mx-r)))/(2i.Px);
} else {
r = -(i.Mx-r)/i.Nx;
}
return b-c
((i.My+i.Nyr+i.Pyr*r)/200);
};
};
}

error free, but onClipEvent (enterFrame) events can be used with movie clips only.

ummm… i dont no what ur trying to do but… u cant have an event handler on a button… u need

on(release){

}

hmm

well i want to make this: http://www.phantomplanet.com/
and I have this: http://www.actionscript.org/tutorials/beginner/Simple_Magnetic_Menu/index.shtml

I wanted to add some elastic type things to the code

you understand? lol

-Thanks a lot

Deano