Clearing a remote MC

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:

<critique>You should have the Welcome to Hillcrest info as an intro to the site.

Maybe have a normal index page open with the message about the flash player etc. and have the intro stuff on that, then another link that opens the main site in a no scroll or resize window.

My art is rubbish - but I noticed that you go from brighter colours to softer - when you go to the volunteer alley and the links disappear when you move the mouse off them.</critique>

Well, from not knowing how to load and unload movies you’ve certainly come a long way .

The functionality is there, just work on the presentation - like I said my colour preferences are funky - so don’t take too much advice from me re. that.

Also some people may not have their email client set up properly, so think about a contact form, and maybe use a flash form for a subscribe list.

It’s simple to browse aswell and that’s good.

Thank you so much, the positives mean a lot to me.

Yes, you are right, I to am not an artist, I am surprised I even spelled it correct right there… lol

Contact form - I have some ideas and even had one in there, it is just the backend that kills me. I have not been able to get a cgi or other style to carry the data anywhere, so I went back to the email link until I learned how to make the backend work. I want to do an entire volunteer form within the movie. I can build the form, bit will need help to make it work.

I have to do some reading on a loader style page to introduce the site, I never thought about the intro stage within the main stage, good idea!
The site is used by a Parent teacher organization, and they said they wanted color. I will see what they say about the setup.

No Scroll or resize window? got me on that one, how to do??

Thanks for sharing the good with the constructive, that is great feedback.

Later…:slight_smile: