PDA

View Full Version : How to make MovieClip on Level 2 control another MovieClip on same level


shortbuss
08-07-2002, 08:55 AM
Ok folks i'll try to explain this.

I have my movie clips setup like this

Main Time line
-Movie clip 1 (level 1)
-Movie clips 2 & 3 (level 2)

I want the last frame in Movie clip 3 to goto and play a specific frame number on movie clip 2 which is on the same level as movie clip 3. Once this plays movie clip 2, I'd like for it to go back to the very beginning timeline. This is how I have the code setup for the last frame on clip 3 right now:

_root.clip1.clip2.gotoAndPlay(exit);

This fails to work with the above coding. Exit is the frame label on Movie clip 2.

Any suggestions? What the heck am I doing wrong? Can I use the with variable to play the instance of movie clip 2?

Any help would be greatly appreciated.

Billy T
08-07-2002, 10:23 AM
I think you are confused regarding levels - are you using load movie?

also, if you want target a frame label you need to use gotoAndPlay("exit")

cheers

shortbuss
08-07-2002, 06:55 PM
I'm not using load movie...should I? My movie clip #2 is already loaded that's why I didn't use the load movie scripting.

Let me elaborate slightly. I've already read a tutorial on levels and it seems to help none. What I have is movie clip 3 which plays to say frame 10 and stops. Same thing with the movie clip #2. Now on release of a button it tells movie clip 3 to begin playing on frame 11 which should then allow that movie clip to play until the last frame. On this last frame of Movie clip 3 I want to place an action that would tell Movie clip 2 to begin playing as well, but only after movie clip 3 has already finished. I hope this makes sense. Any suggestions now?

Thanks guys,

Eric

shortbuss
08-07-2002, 07:02 PM
I'm not using load movie...should I? My movie clip #2 is already loaded that's why I didn't use the load movie scripting.

Let me elaborate slightly. I've already read a tutorial on levels and it seems to help none. What I have is movie clip 3 which plays to say frame 10 and stops. Same thing with the movie clip #2. Now on release of a button it tells movie clip 3 to begin playing on frame 11 which should then allow that movie clip to play until the last frame. On this last frame of Movie clip 3 I want to place an action that would tell Movie clip 2 to begin playing as well, but only after movie clip 3 has already finished. I hope this makes sense. Any suggestions now?

Thanks guys,

Eric

pinkaboo
08-07-2002, 08:22 PM
Hi shortbuss,
yep you sound pretty confoosled, and you've certainly confoosled me.

For a start I think you have your terms all mixed up, right lets hope I get this right explaining:

The main timeline, which is what you see when you look at the main stage in the editing environment is the first level, this is _level0.
When you make a movie in Flash you can use the layers in the timeline to order your file to make it easy for you to produce and manage. However when you publish the file, Flash compiles those layers into one level - yep you've got it _level0.

Now, you can also load other movies into your main movie. you can, for example, stick an empty movieclip onto the main stage and load the external swf into it, or, you can load the external movie into a higher level, ie _level1.

So, when you say you are using levels, I'm pretty certain you don't mean it in those terms. so, what do you mean?

At first I thought that you were confusing layers with levels, but a look at your code tells me that is probably not the case either.

I'm guessing you mean that mcs 2+3 are children of 1 (embedded within movieclip1). Iin which case, your code and method seem fine. I would suggest that you make sure that you have definitely labelled your mcs correctly and that the exit frame is also labelled.

Also as BillyT said, if you are using frame labels you'll need to use quote marks:

_root.mc1.mc2.gotoAndPlay("exit");

damn, I just did you a test file with the file laid out as you described it, but for some reason my pooter isn't letting me save it - sorry. *kicks pooter*

Billy T
08-07-2002, 10:40 PM
nicely explained ;)

Also, make sure your movieclips have instance names.

cheers

shortbuss
08-08-2002, 03:02 AM
I understand the levels concept because i read Jesse's tutorial on it. My problem was that I forgot to label my Movie Clip 1. Once I did that it all worked fine.

Thanx for the info anyway guys...I appreciate it,

Eric