Skip to main content
Known Participant
March 17, 2013
Answered

Making .SWFs disappear in replacement for other ones

  • March 17, 2013
  • 1 reply
  • 1389 views

Oooh boy, I feel embarrased coming back here again but...

I was able to get my previous problem sorted out, by doing this:

on (Release) {

loadMovieNum("swfs/epictrance.swf",25);

}

I feel stupid. But now that I have constructed my swf, and have editted the position, I have to ask, is there like a ._visible=false code for foreign .swfs or something? How does one go about making it so choosing another button will remove that .swf, and change it to another. It was bad enough that I was only able to find one guide to importing swfs the way I needed, I doubt there will be one for making them disappear.

Previous discussion:
http://forums.adobe.com/message/5150720#5150720

This topic has been closed for replies.
Correct answer Ned Murphy

As I said, you need to learn to use the help documents.  Your other response indicated nothing was found... that only indicates you still need to learn how to use them because they contain all of the information you have been asking for.

If you are using loadMovieNum() to load the movie, the compliment for it to unload a movie is unloadMovieNum(). 

You should be cautious in using that particular loading function though, especially in picking a seemingly arbitrary value for the "Num"... you could be replacing some other content that lives at that level that you don't want to remove.  Sticking with loadMovie will be safer... you just need to find the info for using it.

Also, if you are just starting out coding with Flash, you should break the habit of putting code on objects like you show. Instead, assign instance names to the objects and keep the code in the timeline.  If you were to name the button "loadBtn", then the timeline version of its code would be....

loadBtn.onRelease = function(){

     loadMovieNum("swfs/epictrance.swf",25);

}

1 reply

Inspiring
March 17, 2013

I read that other discussion. Ned is right, you really need to learn how to use the documentation for flash. There will be entries for loading or unloading .swf's, it's just often the search terms have to be exact. Search particular books (with relevant book titles) and a relevant keyword and then search something like load, unload or .swf and then search through the list manually.

Google should be a little easier since the search may encompass more words without being exact, however the information is less relevant and you might not find much help without specific search terms.

As for the solution, I do not know I have not loaded and unloaded .swf's before.

Known Participant
March 17, 2013

The books come up with nothing. 'swf' gives nothing. Google doesn't have anything, and if it is there, the key words won't match mine.

Ned Murphy
Ned MurphyCorrect answer
Legend
March 17, 2013

As I said, you need to learn to use the help documents.  Your other response indicated nothing was found... that only indicates you still need to learn how to use them because they contain all of the information you have been asking for.

If you are using loadMovieNum() to load the movie, the compliment for it to unload a movie is unloadMovieNum(). 

You should be cautious in using that particular loading function though, especially in picking a seemingly arbitrary value for the "Num"... you could be replacing some other content that lives at that level that you don't want to remove.  Sticking with loadMovie will be safer... you just need to find the info for using it.

Also, if you are just starting out coding with Flash, you should break the habit of putting code on objects like you show. Instead, assign instance names to the objects and keep the code in the timeline.  If you were to name the button "loadBtn", then the timeline version of its code would be....

loadBtn.onRelease = function(){

     loadMovieNum("swfs/epictrance.swf",25);

}