5 Replies Latest reply on Feb 26, 2010 4:34 PM by kglad

    Where is my preloader getting its "getBytesTotal" number from? It can't be correct!

    timmaciejewski123

      Hi all,

       

      I have a simple preloader script as follows on the first frame of my timeline:

       

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

       

      Everything runs fine, I'm just getting an odd number.

       

       

      The number of "getBytesTotal" being displayed on the loading screen is 3040 kb. The total size of the swf file is 1.38 megabytes. Why isnt "getBytesTotal" being displayed as something like 1380 kb? Is this script loading additional files from another directory? There is nothing else in the directory with this swf file to be loaded.

       

      Looking at the Adobe help file, the getBytesTotal number "Returns the total number of bytes downloaded by LoadVars.load()"

      . I don't recall seeing this variable anywhere in my fla file; I certainly never wrote it into the script.

       

      Any ideas?

       

      Thank you in advance.