# Changing frame in MC with button on main stage

**URL:** <https://forum.kirupa.com/t/changing-frame-in-mc-with-button-on-main-stage/204945>\
**Category:** flash\
**Created:** [October 24, 2006, 8:13pm UTC](https://forum.kirupa.com/t/changing-frame-in-mc-with-button-on-main-stage/204945 "2006-10-24T20:13:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ClearSailing](https://avatars.discourse-cdn.com/v4/letter/c/ee7513/32.png) [@ClearSailing](https://forum.kirupa.com/u/ClearSailing)\
**Post date:** [October 24, 2006, 8:13pm UTC](https://forum.kirupa.com/t/changing-frame-in-mc-with-button-on-main-stage/204945/1 "2006-10-24T20:13:10Z")

</div>

I have one button and it’s primary role is to stop all sounds in the project when triggered. It is just positioned on the main stage in the main project, not inside of a MC.

I then have a very simple music playing system (4 buttons, one for each song) in it’s own MC which displays text of the artist and title song when respective buttons are pressed.

This works fine, apart from the fact that when I click the ‘stop sounds’ button the text is still displayed from whetever the last song was that had been playing.

I was thinking there must be a simple method of incorporating an actionscript function into the ‘stop sounds’ button, so that when it’s pressed it also takes control of the movie clip and moves it to the first frame which doesn’t display any of this text.

I was thinking of a simple gotoAndPlay command followed by something, but I don’t know the command to tell Flash where to find frame 1 of this movie clip rather than just frame one of the whole project.

Help please. :glasses:

---

<div class="post-metadata">

**Author:** ![RileyBoy](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@RileyBoy](https://forum.kirupa.com/u/RileyBoy)\
**Post date:** [October 24, 2006, 8:33pm UTC](https://forum.kirupa.com/t/changing-frame-in-mc-with-button-on-main-stage/204945/2 "2006-10-24T20:33:24Z")

</div>

clip.gotoAndStop(1);

where “clip” would be replaced by the name of your movie clip…

---

<div class="post-metadata">

**Author:** ![ClearSailing](https://avatars.discourse-cdn.com/v4/letter/c/ee7513/32.png) [@ClearSailing](https://forum.kirupa.com/u/ClearSailing)\
**Post date:** [October 24, 2006, 8:56pm UTC](https://forum.kirupa.com/t/changing-frame-in-mc-with-button-on-main-stage/204945/3 "2006-10-24T20:56:20Z")

</div>

Hmmm no that doesn’t seem to work. All my code for the stop sounds button is:

on (press, keyPress “\<Space\>”)  
{  
stopAllSounds();  
bottombar.gotoAndStop(1);

}

No errors come up, it just doesn’t work.

---

<div class="post-metadata">

**Author:** ![ClearSailing](https://avatars.discourse-cdn.com/v4/letter/c/ee7513/32.png) [@ClearSailing](https://forum.kirupa.com/u/ClearSailing)\
**Post date:** [October 25, 2006, 3:09pm UTC](https://forum.kirupa.com/t/changing-frame-in-mc-with-button-on-main-stage/204945/4 "2006-10-25T15:09:16Z")

</div>

No-one know? :hurt:
