4 Replies Latest reply on May 18, 2008 4:37 PM by kglad

    Preloader Issues - Loads Scene 1 fine but...

    cfords
      NOOB here again... I did finally (with help) get my first flash movie/menu working, oh happy day. Now I have built a simple preloader in a seperate Scene above Scene 1, and it works up to the point the main SWF is supposed to play. The preloader loads the movie correctly and goes to the 1st frame in Scene1 and then it just sits there..mocking me. I have this code in the first frame of the preloader Scene:

      ifFrameLoaded ("Scene 1", _totalframes) {
      gotoAndPlay ("Scene 1", 1);
      }

      And this code in the last frame of the preloader to keep it looping until Scene 1 loads and the preloader Scene breaks:

      gotoAndPlay ("Preload", 1);

      Once Scene 1 is fully loaded, the preloader Scene goes by-by as it should, but the main Scene just sits there. None of my nested movie clips are playing but the background is there and the buttons are working. I have (2) nested movie clips on their own timeline doing nada, however everything plays fine without the preloader. I am missing something simple aren't I. ???
        • 1. Re: Preloader Issues - Loads Scene 1 fine but...
          kglad Adobe Community Professional & MVP
          don't use scene info for navigation and don't use the goto functions. use frame labels and the goto methods.

          so:

          gotoAndPlay ("Scene 1", 1);

          should be

          _root.gotoAndPlay ("Scene 1_frame1"); // where Scene 1_frame1 is a frame label.

          and ifFrameLoaded() needs to be defined somewhere.
          • 2. Re: Preloader Issues - Loads Scene 1 fine but...
            cfords Level 1
            Interestingly enough, I was able to fix this problem by adding this to the top of the actions in Frame 1 of Scene1:

            //Start main movie from preloader
            nextFrame();

            I am not sure WHY this worked. I am wondering if this is a valid call in this case or a noob band-aid and that I am on the road to developing a bad habit. I have seen quite a few preloader examples and none of them incorporated a call to nextFrame(). Of course none of the preloader examples that I looked at had nested movie clips on their own timelines, all of the preloaders I looked at occured with only a main timeline. I "discovered" this fix by learning that the movie would "unfreeze" if I clicked "forward" on the movie context menu while playing. I figured nextFrame() was kind of the same thing. Yes, I feel like the second guy who invented the paperclip.
            • 3. Re: Preloader Issues - Loads Scene 1 fine but...
              cfords Level 1
              Ok I am laughing now. I posted this prior to seeing your post. I will make the proper changes and lose the nextFrame(). I would rather do this the correct way. Thank you!
              • 4. Re: Preloader Issues - Loads Scene 1 fine but...
                kglad Adobe Community Professional & MVP
                you're welcome.