Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Loading a flash movie from a flash movie



8:11 pm on May 1, 2006 (gmt 0)

10+ Year Member

Hey I'm looking to load a flash movie into a flash movie. I've figured out if I have a second swf file in my first I can go

this will load "ex.swf" on top of my already playing movie, but this isn't what I want. I want to load this movie and make the movie that's loading it dissapear until the movie I just loaded is done playing.

My original Idea was make a blank frame and before I load my second movie go to it so it gives the appearence that it's playing by itself. However when I do that I don't know how to regain control of my original movie when the second is done playing. Is there any type of onUnload type deal that can signal when this happens?


10:31 pm on May 1, 2006 (gmt 0)

you can load the movie over the top of the existing one by using an alternate depth ie 2 instead of 1 you could also load the second movie into an empty clip on the root movies timeline.

Both can then be conrolled via actionscript.


5:13 pm on May 2, 2006 (gmt 0)

10+ Year Member

to have the top level movie dissapear when it is done, you can try some AS like:


to check if the movie (loaded on _level1) is done playing, you could create a setInterval() within the _level0 or _root movie which checks something like this:

function isCompleted(){
if (_level1._currentframe == _level1._totalframes){
trace('_level1 movie is complete');
// load the swf into _level1
loadMovieNum('ex.swf', 1);
setInterval(isCompleted, 100);

Alternatively, you could have an action/function in the last frame of ex.swf that removes itself and starts the _root movie up again (or goes to a frame, etc)

There are many ways to accomplish this, the trick is finding the best one for your situation.


Featured Threads

Hot Threads This Week

Hot Threads This Month