5 Replies Latest reply on Feb 27, 2007 9:40 PM by pandxsg

    Preloader starts late

    pandxsg Level 1
      Hi, I've created a preloader for my 1mb+ flash movie. However, when I tried to load it, the screen was empty for a few seconds before the preloader suddenly pops up. By then, it had already loaded about 50%. I thought it was supposed to start immediately from 0% and load till 100%?

      In the 1st frame I've the following AS:

      totalBytes = Math.round(getBytesTotal() / 1024);
      loadedBytes = Math.round(getBytesLoaded() / 1024);
      percentDone = Math.round((loadedBytes / totalBytes) * 100);
      if (_root._framesloaded >= _root._totalframes) {
      gotoAndPlay("start");
      }


      2nd frame:

      gotoAndPlay(1);

      and the 3rd frame is labeled "start". I've also assigned a dynamic text with the var name: percentDone.

      Can anyone help on this? Thanks very much!
        • 1. Re: Preloader starts late
          Sketchsta Level 1
          Im not too familiar with this preloader code you have... but why are you deviding bytesTotal and bytesLoaded by 1024???
          • 2. Re: Preloader starts late
            Pal_w_G Level 1
            A few things needs to be checked...

            1. how many things(graphical assets) do you have on your first frame.......try to make it blank.....as less as possible.....

            2. you are calculating byte size but sending playhead depending on the number of frames loaded .

            3. Why are you converting bytes to kilobytes by dividing 1024?

            $. and where does your preloader resides?
            • 3. Re: Preloader starts late
              bb73 Level 1
              What kind of elements do you have in your movie? If you are running things like components, mp3s, videos, etc., try right clicking on those items in the library, then choose "linkage." From there make sure "Export in first frame" is not checked.
              • 4. Re: Preloader starts late
                pandxsg Level 1
                I'm sorry I forgot to include some things: I've actually got 2 more dynamic texts named "totalBytes" and "loadedBytes". So I can let users know how big is the file and how much has been loaded in terms of kilobytes.
                • 5. Re: Preloader starts late
                  pandxsg Level 1
                  quote:

                  Originally posted by: bb73
                  What kind of elements do you have in your movie? If you are running things like components, mp3s, videos, etc., try right clicking on those items in the library, then choose "linkage." From there make sure "Export in first frame" is not checked.


                  Bingo! Thanks mate!