PDA

View Full Version : Use loadMovie to load MC into MC ??


TBoyB
07-29-2001, 07:32 PM
I know I've asked this before, but I just can't find an answer.

I have four buttons, each button will launch an MC. An instance of each MC of corresponding button is place in it's own layer on the stage with a stop on the first frame in each MC so it does not play till told to via the button click.

on (release) {
tellTarget ("mc-vis-menu") {
gotoAndPlay ("vis-menu");
}
}

mc-vis-menu is the instance name of that MC.
vis-menu is the frame label name of frame 2 for that mc that will start it playing since frame 1 has a stop action.

How do I with one click of a button load the MC into an "empty" MC then use tellTarget to tell the corresponding MC in the empty MC to goto frame label and play?

I want to use one empty MC to load each of the button MCs into it so that each button click loads into the same empty MC in effect replacing the MC that was in it previously, regardless of whether the currently loaded MC in the empty MC is finished playing or not.

I have tried using the loadMovie action but that does not work. I get an error telling me it can not find file://blah blah blah. That doesn't surprise me since i'm not loading a movie, simply an MC.

Am I getting this using empty MC as a placeholder thing all wrong? Do I place all my button MCs into the "empty" first then refer to them via tellTarget? Does anyone understand what I'm trying to do?

MoFro
07-30-2001, 01:47 PM
I'm not sure I fully understand your question but here's what I think would help. I would create a MC with all four button MC's in it. Each having a frame label where they begin in the universal clip. Each button would then tell the universal clip which frame label to go to. Then where the frame label is I would put these actions: I would first tell all of the other MC's to gotoAndStop (1) So no matter which one is playing it will go to the blank frame at the start and stop. Then tell the desired MC gotoAndPlay the desired frame label.

I hope this will help. It sounded like you were looking for a more complex solution, but if I understood your problem correctly, this should work for you.

TBoyB
07-30-2001, 04:34 PM
Thanks MoFro, that would work, appreciate the help. But, what I'm trying to understand here is how to load an MC into an empty MC then target the loaded MC. I think, from what I've gathered on here, that that way would automaticaly replace whatever is playing/loaded in the empty MC.

This seems to be a crucial part of flash that I'm just not getting.

Siasia2
07-31-2001, 12:03 AM
I have the same question! I have a movie stage with four buttons: when each button is clicked it, I want it to bring up a seperate smaller MC on the main stage which describes a song and plays the complete song-and then goes away, so another button can be clicked. So I need to create four separate MC's with individual music MP3's appear when its button is clicked on the Main Stage.

How do I get this to work? Should I be using Load Movie? The script I was given for this was to use Tell Target as follows:
On (Roll Over)
Begin Tell Target "mc1")
Go to and Play (2)
End Tell Target
End On

My question is: I cannot locate in the Object Actions Dialog Box the "End" for "End Tell Target" and "End On". Where is it located? (I'm using Flash 5). And is this even the correct script to use for this?

zekebru
08-01-2001, 01:37 PM
Siasia2 --

For Flash 5, do not use tellTarget -- that's an old function from Flash 4. Use the following code

with( _root.mc_name){
do stuff
}

Just make sure that the path is correct (if the mc you want to work with is inside another mc, the path will look something like "_root.outerMC.innerMC")

As for loading the different MC's -- I'm not an expert in that. Everything I've worked with has been small enough that I've just loaded all the MCs, then played them when I need to . . .

Hope that helps some

Siasia2
08-02-2001, 03:47 AM
Okay, Jason,
I'll try it out! Thanks for your help!