PDA

View Full Version : call frame label from another MC


sandman9
05-27-2003, 08:44 PM
I have two MC's on my timeline (MC1 in frame one, layer 1 and MC2 on frame two, layer 2). In frame one lets say we have MC1 and in frame two we have MC 2. Say MC1 is 40frames long and MC2 starts at frame 41 and goes till frame 70.

Now is there a way I can put a script in frame 70 of MC1 and tell it to go and play a frame labeled "over" which is present IN MC1. So in other words, frame label over is not on the main timeline (it is in MC1) and i want to call that frame label from WITHIN MC2.

Hope this wasn't too confusing

Sandman9

spriggan
05-27-2003, 09:25 PM
_root.MC1.gotoAndPlay("frame");

have a look at this turorial by Jesse, should explain everything to you http://www.actionscript.org/tutorials/beginner/paths/index.shtml

eggnogg
05-27-2003, 09:31 PM
heya


i didnt quite understand your question but :


if you wanna call a frame label in a diferent MC,
first, name your MC2 instance (eg. mc2)
then you must use the gotoAndStop, but since you want to go and stop inside a different MC, you have to "lead" the way toMC2

here is how its done:


on (press) {
_root.mc2.gotoAndPlay("over");
}

from MC2 to Mc1 its the same but the other way round:
_root.mc1.gotoAndPlay("over");
}

eggnogg

sandman9
05-27-2003, 10:44 PM
You guys are the best! For some reason i was putting the MC name instead of the instance name in the script *duph!!!*

Thanks
Sandman9