Button help!

I have got this actionscript for my buttons. it rolls in and out, but on press i want it to play a frame of my choice, how do i do this?

heres the code.

button.onRollOver = function(){
animation.gotoAndPlay(2);
}
button.onRollOut = function(){
animation.gotoAndPlay(9);
}
button1.onRollOver = function(){
animation1.gotoAndPlay(2);
}
button1.onRollOut = function(){
animation1.gotoAndPlay(9);
}
button2.onRollOver = function(){
animation2.gotoAndPlay(2);
}
button2.onRollOut = function(){
animation2.gotoAndPlay(10);
}
button3.onRollOver = function(){
animation3.gotoAndPlay(2);
}
button3.onRollOut = function(){
animation3.gotoAndPlay(9);
}