unplugged_web Posted May 27, 2008 Share Posted May 27, 2008 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 More sharing options...
Ingolme Posted May 27, 2008 Share Posted May 27, 2008 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 More sharing options...
unplugged_web Posted May 27, 2008 Author Share Posted May 27, 2008 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 usedloadMovie("test.swf", this.book_mc); Link to comment Share on other sites More sharing options...
Ingolme Posted May 27, 2008 Share Posted May 27, 2008 Sorry I don't quite understand what you mean by the variable I used. To load the movie I usedloadMovie("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 More sharing options...
unplugged_web Posted May 27, 2008 Author Share Posted May 27, 2008 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.