unloadMovie() when you have multiple external swfs -- flash 5, pls.

Okay, here's my rather simple question, in a nutshell.

I'm building a simple menu to load several image galleries.  Click a button, and the image gallery (and external SWF) loads into the main movie.  So far, so good.

Now, I don't want to bog down the system by having lots and lots of these loaded, so it makes sense to use unloadMovie to get rid of the previous movie.

This script is easy enough:


on (press) {
    unloadMovie ("movie1.swf");
    loadMovieNum ("movie2.swf", movieholder);
}

However, people will certainly jump from gallery to gallery, not in sequence.

How can I get the unloadMovie command to unload ANY previous movie before loading the next movie?

Or, should I even worry all that much?  I'm worried about the processor bogging down if the user winds up with 3 or 4 megs of stuff. If that is NOT a factor, well, let me know.

Thanks!


geod100Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vickerleungCommented:
geod100,

Actually when you use the loadMovie or loadMovieNum,
given a particular movie attachment movieclip
It will automatically unload the previous one before loading another one,
it is a replacement scheme.

Say for an example
You have a mc on the stage so called, movie_space

And you do a loadMovie process
loadMovie ("movie1", _root.movie_space);

And when you do another loadMovie, it will replace the existing one
loadMovie ("movie2", _root.movie_space);

Vicker
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.