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

Posted on 2004-10-28
Last Modified: 2008-03-10
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.


Question by:geod100
    1 Comment
    LVL 16

    Accepted Solution


    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);


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
    I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
    The goal of the tutorial is to teach the user how to how to record live broadcast.
    This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

    846 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    5 Experts available now in Live!

    Get 1:1 Help Now