# Two actions on the same button - please help!

**URL:** <https://forum.kirupa.com/t/two-actions-on-the-same-button-please-help/222207>\
**Category:** Uncategorized\
**Created:** [April 11, 2007, 4:31pm UTC](https://forum.kirupa.com/t/two-actions-on-the-same-button-please-help/222207 "2007-04-11T16:31:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flashgordon02](https://avatars.discourse-cdn.com/v4/letter/f/9d8465/32.png) [@flashgordon02](https://forum.kirupa.com/u/flashgordon02)\
**Post date:** [April 11, 2007, 4:31pm UTC](https://forum.kirupa.com/t/two-actions-on-the-same-button-please-help/222207/1 "2007-04-11T16:31:56Z")

</div>

Hi,

This is my first post here. I am a newbie to flash coding. I have a button inside a movie clip. When i click on the button it should gotoandplay a certain frame from another movie clip and when i do a rollOut it should gotoandplay a certain frame from another movie.  
Below is the code i tried but it does not work.

on (press) {  
\_root.Symbol7.gotoAndPlay(186); // Symbol7 is the name of the movie clip  
}  
on (rollOut) {  
\_root.Symbol9.gotoAndPlay(21); // Symbol9 is the name of the movie clip  
}

I have the above code on the button.

Please let me know how to get this done.

Thanks
