Jump to content
unplugged_web

unloadMovie

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.

Share this post


Link to post
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.

Share this post


Link to post
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);

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...