# Controlling mcs playing on the root layer

**URL:** <https://forum.kirupa.com/t/controlling-mcs-playing-on-the-root-layer/262304>\
**Category:** Uncategorized\
**Created:** [June 4, 2008, 8:55pm UTC](https://forum.kirupa.com/t/controlling-mcs-playing-on-the-root-layer/262304 "2008-06-04T20:55:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![magicmule](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@magicmule](https://forum.kirupa.com/u/magicmule)\
**Post date:** [June 4, 2008, 8:55pm UTC](https://forum.kirupa.com/t/controlling-mcs-playing-on-the-root-layer/262304/1 "2008-06-04T20:55:11Z")

</div>

Here’s my set up. I have a flash presentation on the main (\_root) timeline. There is a separate layer and frame for each of my mc’s which display the main content of the presentation. mc1 on frame 2, mc2 on frame 3 etc etc. On the main timeline i also have play/stop, skip forward and skip backwards buttons (buttons not mc’s).  
The presentation autoplays when it is opened. W

hen the user clicks the STOP button i want the controls to skip back to the first frame of the mc that is currently playing. My problem is that when all of the mcs are named something different, so how to i make the button know which mc is currently playing and go to the first frame of it?

Is there specific code that refers to “whatever mc is playing go to its first frame and stop”?

Thanks

---

<div class="post-metadata">

**Author:** ![JFXIW](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@JFXIW](https://forum.kirupa.com/u/JFXIW)\
**Post date:** [June 4, 2008, 9:12pm UTC](https://forum.kirupa.com/t/controlling-mcs-playing-on-the-root-layer/262304/2 "2008-06-04T21:12:01Z")

</div>

Hi Magicmule

it may be better for you to use a generic instance name for the mcs on the timline “content\_mc” then have actionscript on release function of the STOP button, tell content\_mc to gotoAndStop(1). then it doesnt matter which frame its on as it will still be the same command.

just an idea.

or just tell all of the instance names to do the same thing. content\_mc to gotoAndStop(1)…content2\_mc to gotoAndStop(1).content3\_mc to gotoAndStop(1). etc but you may need an if statement somewhere.

im sure there are other ways too but i hope that helps.

JFXIW
