all groups > flash actionscript > november 2006 >
You're in the

flash actionscript

group:

remove loaded movie after new loadMovie has been loaded


remove loaded movie after new loadMovie has been loaded franchise4
11/30/2006 8:24:10 PM
flash actionscript:
i need to unload a movie once the new loadMovie is fully loaded because once i
click on my button to do so, my current loaded movie goes away & the screen is
white until the new loaded movie is loaded. (i hope that made sense)
Re: remove loaded movie after new loadMovie has been loaded Mr Helpy mcHelpson
12/1/2006 12:00:00 AM
so, you can do this two ways. (well, technically you can do this a million
ways, but here's two)...

1) Use a preloader movieclip to look at the progress of the loadMovie function.

2) Use the MovieClipLoader class to do the same thing. <- this is the
prefered method these days, but to be honest, I still use my lil' personal
preloader components.

Using one of those two, you can then script your other movie to unload using
the MovieClip.unloadMovie(); method

make sense?
Re: remove loaded movie after new loadMovie has been loaded champion25
12/1/2006 12:00:00 AM
had a similar issue where I used a MoviClipLoader but the swf just boot out
whatever is on the level until you reach the last one, thenit just stays in the
holder clip. How do you script it so that the next movie unloads the previous?
Re: remove loaded movie after new loadMovie has been loaded Mr Helpy mcHelpson
12/1/2006 8:09:49 PM
well I've done it a few ways successfully.

The most recent, I dynamically create new movie clips.

see --- http://www.13studios.com/erin --- Its a figurative painter's
portoflio, so while its oil paint it is perhaps a bit [NSFW].

Anyway, the panning effect kinda killed my normal process, so when you click a
new button, it goes like this...

PSEudoCODE
//tickerVariable is defined on frame 1
holder.create a new movie clip with name "something + tickerVariable"
play preloader(tickerVariable);
on completion of preloader {
holder[something+(tickerVariable-1)].unloadMovie();
//do anything else you need to do
tickerVariable++
}

I hope I didn't just make that more confusing.
AddThis Social Bookmark Button