5 Replies Latest reply on Dec 19, 2007 10:31 PM by kglad

    Need help playing 2 SWFs in sequence

    tunghoy Level 1
      I have two SWFs that I want to play in sequence, using a third SWF (that has nothing besides this code). This should be simple -- play the first, wait for its timeline to end, then play the second. Problem is I can't get the timeline to wait.

      To load the first movie in frame 1, I have this, which works:

      this.createEmptyMovieClip("mcHolder", 1);
      var oListener:Object = new Object();
      var mclLoader:MovieClipLoader = new MovieClipLoader();
      mclLoader.loadClip("first movie.swf", mcHolder);

      In frame 10, I want to unload the first, then load the second. That happens, but w/o waiting. Here's what I have, so far:


      if (_level1.currentFrame == _level1.totalFrames) {
      // unload first movie

      // now load next movie
      this.createEmptyMovieClip("mcHolder2", 1);
      var oListener2:Object = new Object();
      var mclLoader2:MovieClipLoader = new MovieClipLoader();
      mclLoader2.loadClip("second movie.swf", mcHolder2);


      I suppose there's something wrong with my If statement, but what?