all groups > flash actionscript > march 2005 >
You're in the

flash actionscript

group:

load/unload question


load/unload question tozzy2
3/24/2005 10:43:39 PM
flash actionscript:
Hi. Im kinda new to actionscript so this is probably a no-brainer for most of
you. Heres the problem.
I have a 2nd movie that opens and plays on the emptyclip of the main movie
when the movie loads. heres the code thats on t
the first frame of the main movie:

emptyClip2.loadMovie("introMovie.swf");

the 2nd movie(introMovie.swf) loads and play but it doesnt stop even though
there is a stop() on the last frame of this movie.
There are buttons on the main movie. When they are pressed, I want the 2nd
movie to unload and other movies to load on
another empty clip. The 2nd movie unloads but then after a moment, it loads
again and starts playing. Heres the code that's
on one of these buttons:

on (release) {
_root.emptyClip2.unloadMovie("introMovie.swf");
_root.emptyClip.loadMovie("movie4.swf");

}

Theres gotta be a better way to do this. Anyone ideas? Thanks!

toz
Re: load/unload question kglad
3/25/2005 2:22:17 AM
if introMove.swf is run without being loaded into another swf file, does it
stop on its last frame? if not, then double check that you have a stop() (with
left and right parantheses) in its last frame, the last frame is played, and
there's no other code causing your movie to run past that stop(). if so, then
there's code in your loading movie that causes emptyClip2 to play past that
stop(). it could be some looping preloader code that didn't terminate after
loading was completed.

on (release) {
_root.emptyClip2.unloadMovie(); // to remove emptyClip2
_root.emptyClip.loadMovie("movie4.swf");

}
Re: load/unload question tozzy2
3/25/2005 3:44:04 AM
Thank you. Yes , the intromovie stops on the last frame where the stop action
is. I did forget I had a preloader that might have
affected it but I still seem to have the same problem after I remove the
preloader. The introMovie stops momentarily and then starts
over and plays again. Could it be that the
"emptyClip2.loadMovie("introMovie.swf");" code on frame 1 of the main movie is
causing
introMovie to keep loading over again?


Re: load/unload question kglad
3/25/2005 3:57:12 AM
Re: load/unload question tozzy2
3/25/2005 4:01:52 AM
Re: load/unload question kglad
3/25/2005 5:36:23 AM
AddThis Social Bookmark Button