Unloading a swf

hello all. this is probably a piece of cake, but i cant seem to get it right. i want to be able to close a swf from within another swf. iwant to be able to do this:

www.murderdolls.com

go to media… click on a photo thumbnail… the larger image contains a “close window” button.

how do i “close window”?

thanks in advance!

do you mean unloadMovieNum(levelNum); ?
(or even myMovieClip.removeMovieClip(); depending on where your ‘swf’ is)

yes. i crrently have

on (release) {
unloadMovie (1);
}

that aint doing the trick. any suggestions?

but thats not what I put

unloadMovieNum(levelNum);

:wink:

my pictures are currently loading into an empty MC with the follwing actions.

on (release) {
loadMovie (“pic1.swf”, “pic”);
}

so now…how would i close pic1.swf’s window in my main movie?

then use removemovieclip

i’m sorry. i’m really new to this… removemovieclip?

what would the action assigned to my “close window” button look like?

thanks man.

heres a windowed remove movieclip example
http://www.kirupaforum.com/attachment.php?s=&postid=80161

this doesnt load swfs, but the action would be the same (well depending)…

removeMovieclips removes the actuall containing movieclip where you might have loaded your external swf. If you want to re-use that movieclip for other swfs, you wouldnt want to remove that movieclip all together, but rather unload the movie thats in it. That would use

unloadMovie(moviecliptarget)

The example in the link above dynamically re-creates the movieclips which are the windows so removeMovieclip works fine.

thanks man. much appreciated.

dude… this is driving me nuts. i revised my code a little. now the photo thumbnail buttons look like this:

on (release) {
_root.pic.loadMovie(“pic1.swf”);
}

“pic1.swf” loads into an empty MC called “pic”.

so the user clicks on the first thumbnail, and “pic1.swf” loads onto the page. i still cant get the loaded pic1.swf to close. i dont get it. i’m not sure what the set the target to. i’m not sure what the correct code looks like. please help. i’m banging my head against the wall.

thanks!