# Button help!

**URL:** https://forum.kirupa.com/t/button-help/87079
**Category:** Uncategorized
**Created:** [April 18, 2005, 11:17am UTC](https://forum.kirupa.com/t/button-help/87079 "2005-04-18T11:17:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sauceyboy](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@sauceyboy](https://forum.kirupa.com/u/sauceyboy)
#### Post date: [April 18, 2005, 11:17am UTC](https://forum.kirupa.com/t/button-help/87079/1 "2005-04-18T11:17:13Z")

</div>

_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);  
}
