PDA

View Full Version : Help with Movieclip


Br4K
12-15-2002, 04:35 PM
Hi..

I have two scenes and I'm trying to continue to the next one. To continue, you have to click a button, which loads a movieclip with attachMovie. I want to know how to make the next scene play right after the movie clip ends (do I have to remove it first or something?)

Here's some of the actionscript I used:

(On the button)

on (release) {
InstanceofMainMC.attachMovie("NewMC", "InstanceofNewMC", 1);
}

And that's all I have. Should I be putting actionscript in the MC timeline?

Anyways, thanks!

Mortimer Jazz
12-16-2002, 12:09 AM
Okie dokie.

Label the first frame in your second scene - let's call it "bob".

Then go in to your library because you want to edit the clip you're going to be attaching.
At the end of that clip you'll need some code on the timeline.

Because the code is in the clip, but the timeline you want to affect is one level up, you have to path to that timeline using either _root or _parent (the latter means go up one level from wherever you currently are). So:
_parent.gotoAndPlay("bob"); or _root.gotoAndPlay("bob");//assuming you're attaching the clip to the main timeline
Forget the fact that they are in two different scenes. Flash will target frame labels regardless.

Hope this helps
Mort

Br4K
12-16-2002, 12:15 AM
Ah, thank you so much! It worked.

Mortimer Jazz
12-16-2002, 12:22 AM
Heheh
It's always a pleasure - especially for those who say thanks :)