12 Replies Latest reply on Jun 17, 2010 7:33 AM by asanti3d

    As2 issue with loader

    asanti3d

      I have been working on this

      for a minute and cannot seem to find out where I am going wrong been over the code several times and get the same result

       

      In my first layer I have 3 frames with unsing as2

       

      Layer 1 frame 1 i have action  script

       

      movieSize = this.getBytesTotal();
      moviePercent = movieSize / 100;
      sliderMove = _root.loadBar._x;
      percentMove = _root.percentContainer._x;

       

       

      Layer 1 frame 2 I have actionscript

       

      current = this.getBytesLoaded();
      _root.percentContainer.percent = Math.round(current / moviePercent);
      _root.loadBar._x = sliderMove + _root.percentContainer.percent;
      _root.percentContainer._x = percentMove + _root.percentContainer.percent;

       

      Layer 1 frame 3 I have actionscript

       

      if (_root.percentContainer.percent >= 100)
      {
          gotoAndPlay(4);
      }
      else
      {
          gotoAndPlay(2);
      }

       

       

      Everything works as it should the only problem is the loader only starts loading at 50% and loads correctly it doesnt seem to start at 1%

      also I just noticed i changed the bg color to black and noticed it stayed white and the loader nor the bg color showed until 59% loaded