Clearing a remote MC

Okay, I have learned how to call a remote MC into an exising one, but I have looked around and am missing how to get the called MC to go away.
Here is what I have done -
Main MC has 5 scenes - while in 3rd scene I need to call a MC.
That works okay, but I cannot see how to make the called MC go away and stay within the 3rd scene. I see where I can do a “loadmovie” and go to the intro scene of my main MC. (not acceptable)

Also, I need to know how to make a called MC go to a specified point within the waiting scene. I have been reading and reading trying to learn Flash, and just need some help right now.

Hope that is enough detail.

Thanks,
Marshall:(

I presume when you mean called movie in an mc you mean a movie loaded into an mc.

If you load (call?) an external movie into an mc called holder, using:

[COLOR=blue]loadMovie (“movie.swf”, “holder”);[/COLOR]

You can unload it by:

[COLOR=blue]unloadMovie (“holder”)[/COLOR].

While the movie is loaded into “holder” if you want to make it go to a certain point, if the actions were on a button, it would be:

[COLOR=blue]on (release) {
_root.holder.gotoAndPlay(“framelabel”);
}[/COLOR]

You could use [COLOR=blue]_root.holder.gotoAndPlay(framenumber);[/COLOR] but it’s best to use frame labels when referring to frames.

Thanks Flex,

call = load

I am just learning Flash, been working with it about 3 weeks. The AC is still pretty scary, I am not a programmer.

If I load a MC into “holder” then “unloadMovie (“holder”)”
am I not left with the MC loaded into “holder” or is “holder” what stays from this command?

I have a button on the scene that when pressed loads in the MC. It is much smaller in dimension than “holder” and it is loading into the upper left corner of “holder”. I want it more to the middle right.

And _root is simply saying “look into the base directory where all the MC’s are stored” correct?

Thanks for your patience while I learn.

Try this fla. It might help. If you still have probs, post again

Yes _root refers to the main time line. A tip on how to position your clip is also in the fla.

Thanks Flex, I’ll go look now and get back in a bit.

Some light bulbs are coming on, good feeling.
So, holder is just a target that is labeled in the code.
Holder does not have to be any certain size - right??
I would just need to move holder to compensate for a larger dimensioned MC. I have a 275 w X 251 H MC.
I changed your file around and had my MC load into it, that worked, but my loaded MC sat under the unloading button.
So what is the best way to compenstae for the various sizes or loaded MC’s, so that they land in the proper spot?

Also, do you only need 1 unload button, no matter how many loaded MC’s one may load into holder?

Thank you very much for that file, it worked great to show me.:slight_smile:

There is way to create an empty movie clip dynamically, and set the x and y for it at the same time, but until you understand how it works, leave that method alone.

You can position holder mcs like this:

Create a blank mc.
Call it holder. Set the instance name to holder.
Drag it onto the stage from the library.
Double click on the mc or right click and select edit in place.
Draw a rectangle the same width and height as the swf you’ll be loading.
Make sure you have the whole rectangle selected then press CTRL + I.
An info panel should appear - you’ll see a 3x3 grid, with a black square and a white square.
Make sure “top left” square is black. If not, click it. That sets the registration point of the rectangle (ie. where the x and y will be calculated from).
Now in the X box type 0 and in the Y box type 0.
The top left of the rectangle should now be aligned with the “cross” of the movie clip.
Now go back to the main time line - come out of editing the movie clip.
You should now see a rectangle the same dimensions as the swf you wish to load.
Move it to where you want, now the external swf should load into there.

As for the buttons - you can use only one button to load and unload several clips with actionscript, but for now I suggest you use one for each. Here’s a fla I did for someone here to demonstrate this. It was their graphics, I just put the script on to load and unload the movies. It’s quite easy.

Open main2.fla

I’ll go work with it now. Thanks.

And the same holder can serve multiple loaded MC’s then, right?
So if there are 2 or 3 MC’s that I want to load at different times in the same scene, I can use the same holder for them all, and just have one button of some type to unload when needed?

I would have one button for each MC to be loaded, and the one button to unload prior to hitting the 2nd button??

Thanks again.

You can have one button, when pressed, load a movie, then when pressed again, unload the movie, then pressed again, load another, then pressed again unload, etc.

But what you’d want is, either 1 button to load or unload the movie, like the fla I gave, or, for example, 3 buttons, all loading swfs into holder. Each one would replace the other.

Try this

is this only for loading movies? if there not movies that are loaded then u can just use a removeMovieClip() i dunno

You can only use removeMovieClip for movies that are attached (attachMovie) or duplicated (duplicateMovieClip).

I spent ages once trying to remove a movie clip, then read the above.

Me45’s talking about mcs that are loaded into mcs acting as holders.

yeah i know…

just when i read call in the first post…i didn’t think that we were talking about loading movies

Hmm get’s confusing, so many people using that dude with beard’s pic - the other day I called brad, bezzer - but I had good reason…

http://www.kirupaforum.com/showthread.php?s=&threadid=6403

hehe i should really get my own… i’ll go make one now…:slight_smile:

Hehe whats the reason for calling brad bezzer? was he acting stupid? lol :slight_smile:

okay, I have it working now, thanks to you FLEX!!!

Now, one added thing. Can I load a dynamic scrollable text box into “holder” as I have the other MC’s.

Or, is there a way to push a button or something to make the text box dissapear after the user has read the text?

Always something, isn’t there…

Thanks again for helping me learn this stuff.

Hey Flex - Take a look at where I am so far. again, thank you for all the help.

http:www.hillcrestpat.com
There are still a few things to be done, please feel free to provide some feedback. I am learning all the time.
:nerd: