Copy link to clipboard
Copied
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
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
...Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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);
}
Copy link to clipboard
Copied
I figured out unloadMovieNum()., and was running over here to tell you. I was too late.
I'll look over your huge message, and try to make sense of it.
loadBtn.onRelease = function(){
loadMovieNum("swfs/epictrance.swf",25);
}
Yes, I already had that.
Copy link to clipboard
Copied
I do have to say, though, when it says:
Loads a SWF, JPEG, GIF, or PNG file into a movie clip in Flash Player while the original SWF file is playing
I'm not totally aware of what that means. A SWF, into a movie clip?
Copy link to clipboard
Copied
Ignore these last two comments. When working with multiple frames, and multiple buttons which should I use, loadMovie or loadMovieNum? I can' get there to be more than one. I've reviewed the adobe help pages, but they don't seem to be helping.
Copy link to clipboard
Copied
I finally solved it.
I made a new layer called "LoadMovies" and attached the code:
stop();
EpicBTN.onRelease = function(){
loadMovie("swfs/epictrance.swf",500);
}
And I selected another random button, and I put:
on (release){
unloadMovie(500);
stopAllSounds();
}
500 was a completely random number though, but clicking it, I don't see anything get deleted.
Copy link to clipboard
Copied
The loadMovie function does not use a number as the second argument, it loads a SWF, JPEG, GIF, or PNG file into a movie clip. Here is the general form of its use as indicated in the help documents:
loadMovie(url:String, target:Object, [method:String]) : Void OR
loadMovie(url:String, target:String, [method:String]) : Void
What you appear to be using would be valid for the loadMovieNum function that you were showing earlier which Loads a SWF, JPEG, GIF, or PNG file into a level.
loadMovie
Num(url:String, level:Number, [method:String]) : Void
Find more inspiration, events, and resources on the new Adobe Community
Explore Now