# MC withing a button - and stopping the MC

**URL:** <https://forum.kirupa.com/t/mc-withing-a-button-and-stopping-the-mc/5411>\
**Category:** flash\
**Created:** [September 10, 2002, 4:04pm UTC](https://forum.kirupa.com/t/mc-withing-a-button-and-stopping-the-mc/5411 "2002-09-10T16:04:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![katirana](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@katirana](https://forum.kirupa.com/u/katirana)\
**Post date:** [September 10, 2002, 4:04pm UTC](https://forum.kirupa.com/t/mc-withing-a-button-and-stopping-the-mc/5411/1 "2002-09-10T16:04:24Z")

</div>

Ok, here’s the setup… I want to make a “sitemap” button that starts off with a static earth with the words “Site Map” over that. no problem… then when you roll over it, i want the earth to spin. also no problem. here is the problem… when you roll out, i want it to do more than just stop… i want it to freeze on the earth frame it was currently on, rather than skipping in the animation and returning to the first static earth picture…

ideas i have had is maybe keeping the “animated” earth (which is just an imported gif, i.e. an mc with about 11 frames) but for some reason i’m having a mental block and i can’t figure out how to get the mc (which is within a button) to stop and play on command… i start the movie and it plays. it’s probably something easy i’m overlooking, but if there’s a better way please let me know.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 10, 2002, 4:08pm UTC](https://forum.kirupa.com/t/mc-withing-a-button-and-stopping-the-mc/5411/2 "2002-09-10T16:08:03Z")

</div>

[COLOR=blue]on (rollOver) {  
play();  
}  
on (rollOut) {  
stop();  
}[/COLOR]

Is that what you’re using? If it is that should work. The stop should stop where it is and not jump to any specific frame.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 10, 2002, 4:12pm UTC](https://forum.kirupa.com/t/mc-withing-a-button-and-stopping-the-mc/5411/3 "2002-09-10T16:12:18Z")

</div>

Also the MC doesn’t need to be within a button. You can use more flexible actionscript on the movie clip and still make it behave like a button. Unless there’s a reason you need in to be within the button.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 10, 2002, 4:13pm UTC](https://forum.kirupa.com/t/mc-withing-a-button-and-stopping-the-mc/5411/4 "2002-09-10T16:13:20Z")

</div>

nah i just thought that was how it had to be 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 10, 2002, 4:23pm UTC](https://forum.kirupa.com/t/mc-withing-a-button-and-stopping-the-mc/5411/5 "2002-09-10T16:23:39Z")

</div>

when i took it out of the button, that code (Which i was indeed trying to use) actually worked. thanks. it was one of those “duh” questions lol, but it still feels like monday today so… 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 10, 2002, 7:37pm UTC](https://forum.kirupa.com/t/mc-withing-a-button-and-stopping-the-mc/5411/6 "2002-09-10T19:37:59Z")

</div>

it IS Monday!!

hehehh

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 10, 2002, 8:08pm UTC](https://forum.kirupa.com/t/mc-withing-a-button-and-stopping-the-mc/5411/7 "2002-09-10T20:08:32Z")

</div>

for me it is tuesday (even though i still maintain it doesn’t feel like it!) 🙂 thank goodness lol. that means only 3 more days till i can sleep in again hehehe
