Hi I have a question about the load/unloadMovie commands.
I have a movie, with a second movie loaded into a section of it. I was wondering if it is possible to have an action inside this loaded movie that tells the main movie to unload it and go to the next frame.
I tried doing it like this:
I put
loadMovieNum(“second.swf”, 5);
stop();
in the main timeline, with unloadMovieNum(5); on the next frame, then in the loaded movie I put:
tellTarget (“mainmovie.swf”) {
nextFrame();
}
on the last frame, which I thought would cause the main movie to unload the second movie and continue the animation.
Instead, I get this error when I publish:
Target not found: Target=“21.swf” Base="_level5"
and I am stumped.
Any help at all would be incredible appreciated. Also please bear in mind that I am pretty new to actionscript, so if you could spell it out for me that would be great.
unloading _level0 unloads everything above it i believe. for example to completely change your main movie, simply load another one into _level0 and all levels will be unloaded.
why don’t you just have a _level0 that does this:
loadMovieNum(“firstAnimation.swf”,2);
load your second movie onto _level5…
loadMovieNum(“secondAnimation.swf”,5);
then when the first animation is done just unloadMovieNum(2); this will get rid of the first scene. you can use a bunch of levels…
if you want to add advanced options to the movies you are loading such as being able to position them, rotate, scale, etc…
load the movie into a movie clip instead of a level. make an empty movie clip, instance name = “mc”. then when you are ready to load a movie into it, loadMovie(“myMovie.swf”,“mc”);
this will load the movie into the movie clip. you can easily position it scale, etc.
bottom line… use _level0 as a controller… load movies onto upper levels or into movie clips… either way you will be able to load and unload them easily
What I was actually trying to do was have a button in the second movie that would jump to a closing animation in the second movie, then have that second movie unload itself somehow.
Since the second movie is not a fixed length, but rather I want it to close when the user pushes a button, I don’t think I can just unload it from a level_0 at a certain point in time. I think I need to have an action in the second movie that says “after the user has pushed the close button (in the second movie), and the closing animation has finished (also in the second movie), THEN unload the second movie”.
The only thing I could think of that might work would be to use tellTarget to make the first movie unload the second one after the button is pushed in the second one, but as I said before I’m pretty new and don’t know all that well what’s going on.
Right click the mouse on the frame you want to unload and select actions from the drop down list, once in the actions box click the action tab then browser/Network…you will then see the loadmovie funtion and the unload movie function. when you load your 2nd movie into the main movie load it into level1, when you want to unload it use the unload funtion in the actions box, make sure your in normal mode not expert…then type in 1 where it ask you the level you want to unload…hope this helps! Jesse H
or you can try the quit function in the actions box, put this function in your second movie at the end, it may work I havent tried it, good luck JesseH
Hi guys.
Even after all your generous and appreciated help so far, I still can’t get it to do what I want it to. The problem is that upon unloading the second movie from inside the first, I want to first to advance to the next frame.
Since I don’t think I’m explaining myself very well, I put the two movies online at