3 Replies Latest reply on Aug 17, 2010 1:45 PM by kglad

    Preloader problem

    n2dzyne Level 1

      This code was not written by me and I'm having a hard time figuring out how to fix it. I am getting a syntax error in the preloader.

       

      onClipEvent (load)
      {
      Total = Math.round(_root.getBytesTotal() / 1000);
      }
      onClipEvent (enterFrame)
      {
      Loaded = Math.round(_root.getBytesLoaded() / 1000);
      Remaining = Total - Loaded;
      Percent = Math.floor(Number(Loaded) / Number(Total) * 100);
      gotoAndStop(Percent);
      _parent.percentloaded = "LOADING " + Percent add "%";
      if (Percent == 100)
      {
      _parent._parent.play();
      } // end if
      }

       

      I changed

      _parent.percentloaded = "LOADING " + Percent add "%";
      to this

      _parent.percentloaded = "LOADING " + Percent + "%";

       

      This took away the syntax error but now the parent swf is not loading. Any suggestions?

       

      Thanks!