# Control movieclips......!

**URL:** <https://forum.kirupa.com/t/control-movieclips/4977>\
**Category:** Uncategorized\
**Created:** [August 27, 2002, 4:59pm UTC](https://forum.kirupa.com/t/control-movieclips/4977 "2002-08-27T16:59:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![skm0916](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@skm0916](https://forum.kirupa.com/u/skm0916)\
**Post date:** [August 27, 2002, 4:59pm UTC](https://forum.kirupa.com/t/control-movieclips/4977/1 "2002-08-27T16:59:44Z")

</div>

i’ve a couple of mc on the main time along with the a mc which has stop ,play,rewind… as buttons…

i want to control a movie clip which is being played with these buttons…

i’ve all the mc named, but i’m unable to think of how to get the mc instance name which is being played so that i can perform stop, play operations on it…

any help would be appreciated…

thanx  
kumar

---

<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:** [August 28, 2002, 9:22am UTC](https://forum.kirupa.com/t/control-movieclips/4977/2 "2002-08-28T09:22:59Z")

</div>

When the clip starts to play, you could store its name somewhere (for instance the \_root, even though it’s a bat habit, it will do).

```auto
// in the first frame of the movie
_root.currentMovie=this._name;
// you can also hard code the name

```

Then your buttons would do

```auto
on (press){
   _root[currentMovie].play();
  // etc.
}

```

I’m assuming that all your clips are on the \_root here.

pom :asian:

---

<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:** [August 28, 2002, 1:34pm UTC](https://forum.kirupa.com/t/control-movieclips/4977/3 "2002-08-28T13:34:32Z")

</div>

I’ll give it a try …hope it works.

it’s not working,actually i’ve a another empty MC instance(movie2) in between the root and the others…  
movie2 loads all the other mcs…i tried the following code

\_root.movie2[currentMovie].stop();

is this syntax correct…

thanks

---

<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:** [August 28, 2002, 2:15pm UTC](https://forum.kirupa.com/t/control-movieclips/4977/4 "2002-08-28T14:15:09Z")

</div>

That is correct syntax. If you’re clips are set up right that should work.

---

<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:** [August 28, 2002, 6:50pm UTC](https://forum.kirupa.com/t/control-movieclips/4977/5 "2002-08-28T18:50:51Z")

</div>

thanks for the help

i got it to work.
