View Full Version : unload yourself

10-18-2002, 01:17 PM

I searched on this, honest, just got even more sidetracked...

Quick question: is it possible for a movie to unload itself?

Here's the scenario - I'm loading small movies into a "holder" mc on the main timeline of my main movie. I want the wee loaded movies to unload themselves when they're done playing. Is this possible or do I need to unload them from the main movie?

Any help/pointers appreciated,



10-18-2002, 01:42 PM
Yes you can, If you load the movie onto root for example, just have an action in the swf loaded unloading it from root.


10-23-2002, 01:02 PM
Yes, you can create a function in your _level0 directory (or whichever is calling the movie) to unload the movie. Say you wanted a movie to play out some action before it is unloaded, and that movie is in _level1, while the command to have it play is in _level0. You might have something like:

in _level0:


then, when the _level1 movie had played, you could call a function in _level0 from the last frame of the _level1 movie:

(last frame)

In the _root of _level0 you would then write a function:

function unloadMyMovie(){

The _level1 movie would basically be asking another movie to give it a shove.

Hope this helps.

10-28-2002, 12:21 AM
If you load a swf into a specific _level/mC, then load the next swf into the same place, flash automatically unloads the first swf.