Jump to content

unloadMovie


unplugged_web

Recommended Posts

I've got movie that I use loadMovie to load an external swf file, but when somebody clicks on another button I want that movie to unload. I tried unloadMovie(test.swf) on the time line and

on (press) {	gotoAndPlay("about");unloadMovie(test.swf);}

on the buttons, but neither of them seem to work.

Link to comment
Share on other sites

I think you have to use the variable that you loaded to movie with, not the file name.And if you really did have to use the file name (which I don't think), it probably would have to go within quotation marks.

Link to comment
Share on other sites

I think you have to use the variable that you loaded to movie with, not the file name.And if you really did have to use the file name (which I don't think), it probably would have to go within quotation marks.
Sorry I don't quite understand what you mean by the variable I used. To load the movie I used
loadMovie("test.swf", this.book_mc);

Link to comment
Share on other sites

Sorry I don't quite understand what you mean by the variable I used. To load the movie I used
loadMovie("test.swf", this.book_mc);

I'm not the biggest expert in flash, I haven't programmed in ActionScript in over a year, so I'm not totally sure about anything, but if you just sent it a file name it won't know what you're referring to because there may be more than one instance of that loaded file in the document$.You probably have to do it like this:unloadMovie(this.book_mc)Or find out which movieclip "this" refers to and unload it through that reference.
Link to comment
Share on other sites

I'm not the biggest expert in flash, I haven't programmed in ActionScript in over a year, so I'm not totally sure about anything, but if you just sent it a file name it won't know what you're referring to because there may be more than one instance of that loaded file in the document$.You probably have to do it like this:unloadMovie(this.book_mc)Or find out which movieclip "this" refers to and unload it through that reference.
thanks
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...