Need help optimizing navi script, flash mx2004

Alright, I got this navi that when you go enter the button area of the word it latches on to your mouse and then snaps back to initial state on rollOut.

here’s the code:


//initiate tween class
#include "lmc_tween.as"

stop();

//initial variables
var workxCoor:Number = work_mc._x;
var workyCoor:Number = work_mc._y;

//function used by onEnterFrame to cause follow
function onGrip() {
	var xMouse:Number = _root._xmouse;
	var yMouse:Number = _root._ymouse;
	work_mc._x = xMouse;
	work_mc._y = yMouse;
}

//button
work_btn.onRollOver = function () {
	//call onEnterFrame function
	onEnterFrame = onGrip;
	work_mc.scaleTo(150, 1, "easeOutElastic");
}
work_btn.onRollOut = function () {
	//delete onEnterFrame
	delete onEnterFrame;
	work_mc.tween("_x", workxCoor, 1, "easeOutElastic");
	work_mc.tween("_y", workyCoor, 1, "easeOutelastic");
	work_mc.scaleTo(100, 1, "easeOutElastic");
}

alright i got three buttons, work, news, and contact and all this code is just for the work button. I need to a way to maybe use a prototype to make the actionscripted movie generic so i can apply it to any button i add. i’m not sure if you can use onEnterFrames with prototypes but i really think that might be a way. If anyone has any suggestions lemme know.