PDA

View Full Version : Getting back to main doc from a loaded .swf


Huecifer
08-16-2006, 08:46 PM
Hi,

I'm loading a .swf into a file using:

loadMovieNum("port1.swf", 1) ;

Everything works fine in getting port1.swf to play, now I just need to be able to get back to a specific frame in my original file using a button in port1.swf. Is this possible? How do I do it?

-Hugh

Cota
08-16-2006, 09:23 PM
the button in the port1.swf... _root.gotoAndPlay(4) or what ever frame. Since, once its loaded, _root refers to the maintime line.

sophistikat
08-16-2006, 09:32 PM
you can also use _level0 since you're using loadMovieNum() to load your .swf; Welcome to AS[org] :)

Huecifer
08-17-2006, 03:14 PM
Hey thanks a lot! I got the _level0.gotoAndPlay(x) to work, but with one bug. When it gets back to the main file, the port1.swf still appears on the screen, above the rest of the stuff. Is there an easy way to get it out of there?

Cota
08-17-2006, 03:18 PM
unloadmovie()

Huecifer
08-17-2006, 04:13 PM
Sorry, to be a bother, but I'm having trouble with the unloadMovie() function. I've got everything working except for the movie clip disappearing. Here's the code for the frame I go back to from the loaded .swf:

stop();
unloadMovie("port1.swf") ;
gotoAndPlay(151)

All the script seems to be working except for the unload movie script.

Cota
08-17-2006, 04:22 PM
I apologize, I should have given you an example. Since you're using this, loadMovieNum("port1.swf", 1) to load the movie, you'll have to use
_level1.unloadMovie() to unload it...I think..its been awhile since I've used it. I usually load external swf's into a container movieclip.

Huecifer
08-17-2006, 06:32 PM
Boo-yah

thanks