4 Replies Latest reply on Jun 4, 2011 9:52 AM by Studio PROJEKTOR

    preloader problem

    Studio PROJEKTOR

      Help me with this preloader.

      Here's the source code:

      onClipEvent (load)
      {
          total = _root.getBytesTotal();
      }
      onClipEvent (enterFrame)
      {
          loaded = _root.getBytesLoaded();
          percent = int(loaded / total * 100);
          text = " " + percent + "%";
          gotoAndStop(percent);
          if (loaded == total && a != 1)
          {
              a = 1;
              _root.gotoAndPlay(2);
          } // end if
      }


      When loading the clip there are only 0 and 1 over and over again. And despite this clip to loading.

      As if the script does not count the percentages ...

      I ran out ideas.

       

      Help please.