Function for buttons

Is there a better way to write those code more clean?
Let’s say I have several buttons and I want to write a nice function to manage them like that:

For example instead of using:

tab_option1.onRollOut = function() {
gotoAndPlay(‘transition’);
};

tab_option1.onRollOver = function() {
gotoAndPlay(‘debut’);

};

tab_option1.onRelease = function() {
getURL("…","…");
};

How about put them in an array and write a function to manage them instead to rewrite those code again…

Any examples?