PDA

View Full Version : how to stop/unload the external MC


madamada
11-27-2003, 06:05 PM
Hi all, i've had a good look around and cannot find what must be a pretty simple solution...
I load an external MC on entering a frame:
loadMovie("foodMov.swf",1)
and it happily plays where and how it should but the prob is I don't know how to make it go away when any other button is pressed (there are 8 other buttons).
Any help much appreciated, thanks!

CyanBlue
11-27-2003, 06:18 PM
Howdy and Welcome... ;)

You might be able to use unloadMovie() function to do whatever it is you are trying to do??? ;)

divarch
11-27-2003, 06:22 PM
Well, you can make an array of all movies then load and unload separately.

But, you don't want to do that.
Just load them all in the same level, that way only one can be present at a time.

Cheers
edit I definately misinterpreted the problem, I supposed other buttons loading different movies, sorry

madamada
11-27-2003, 06:31 PM
Thanks... stupid as this sounds tho, what do i attach that unloadMovie() actionScript to? The external MC plays in a corner of the main movie, and I need it to stop playing when a button is pressed in the navigation from the main movie.
:confused:

Colin Campbell
11-27-2003, 06:37 PM
loadMovie("foodMov.swf",1)
// unload it is:
unloadMovie(1);
//I believe thats it

CyanBlue
11-27-2003, 06:38 PM
Um... I don't really know where it might be... It all depends on how your movie is structured... But one thing is that you have to have the command within this place where you do this...when a button is pressed in the navigation from the main movie.

madamada
11-27-2003, 06:55 PM
Thanks for all the help. I found something that works:

loadMovie("foodMov.swf",1) LoadedMC=true;

then on all other navigation in that frame of the main movie:

on (release) {
if(LoadedMC)
{unloadMovie(1);
LoadedMC=false;
}
gotoAndPlay(target);
}
maybe a bit longwinded i dunno but does the trick

CyanBlue
11-27-2003, 07:06 PM
[useastags]