Control movieclips......!

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

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).

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

Then your buttons would do

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

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

pom :asian:

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

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

thanks for the help

i got it to work.