View Full Version : unload a swf file from a movie

02-04-2006, 06:17 PM
hi all, this is my first thread so please bear with me if i do, do sumthin wrong.

my set up:

i have found code on the net to link (load file1.swf) to my project.exe (in a movie) when i click a button.
But now i have discovered that to load file2.swf on a differnt button on the same sence i have to unload file1.swf, this is where i have a problem.
All of this is in one sence

here is the code used to load the swf file into a movie in the project.exe:

on (release) {
on (release) {
if (_level0.current_selection == "about") {
} else {
_level0.current_selection = "about";


if ther is an easier way to do all of this please could you inform me,
thank you all for your time and help.

Flash Gordon
02-04-2006, 06:40 PM
that looks pretty easy to me ;)

I'd combine the on (releases) 's

02-04-2006, 06:47 PM
hi flash, how would that help me unload the movie when i'm finished wathcin it, so i can load the second one?

Flash Gordon
02-04-2006, 06:51 PM
var num:Number = 1;
_mc.onRelease = function() {
temp = this["file"+num];
container_mc.loadMovie(temp, 0);

One code to continuaslly load consective movies.

02-04-2006, 07:04 PM
but now what if i want to controll which swf file i want to play with a button, how do i load a movie then unload it, so i'm ready to play the next one that i choose?

Flash Gordon
02-04-2006, 07:09 PM
if you load it into the same place and same level is automatically replaces the old swf.

02-04-2006, 07:20 PM
but if i still wanted to unload the movie, if it was'nt in the same place and knowin the code i showed you?

Flash Gordon
02-04-2006, 07:24 PM

search for unLoadMovie();

02-04-2006, 07:28 PM
thank you for your time and help

02-04-2006, 07:57 PM