6 Replies Latest reply on Dec 12, 2006 9:41 PM by Sketchsta

    preloader improvement

    gdmt
      hi everyone!
      my preloader jumps for example, from 14 to 20 when it shows the percent loaded
      how can i do to force it to show every number? (14,15,16,17,18,19,20)


      this is the AS:
      byteloaded = _root.getBytesLoaded();
      bytetotal = _root.getBytesTotal();
      loaded = int(byteloaded /bytetotal * 100);
      percent = loaded;


      thanx in advance
      (sorry, my english isn't good)
        • 1. Re: preloader improvement
          Devendran Level 1
          Hi how u are Calling this Calculation?
          Using OnEnterFrame?
          Let me know the Frame Structure for your Preloader.

          • 2. Re: preloader improvement
            Sketchsta Level 1
            I had this problem before, i just forgot to change the animation to a Movie Clip.

            The way i had it set out...

            _root ----=>preloader code
            loader MC
            progress
            progress ---=>100 frame animation
            1 frame ( Movie Clip) with a loop animation inside.

            my loop animation was set as IMAGE, which made it skip frames.
            when i changed it to MOVIE CLIP, it worked on it's own timeline, no skipping.

            hope this helps.
            • 3. Re: preloader improvement
              gdmt Level 1
              hey, thanx Devendran & Sketchsta for reply!


              well, the AS in the first frame (loop) is

              byteloaded = _root.getBytesLoaded();
              bytetotal = _root.getBytesTotal();
              loaded = int(byteloaded /bytetotal * 100);
              percent = loaded;

              and the second frame:

              if (byteloaded == bytetotal) {
              gotoAndPlay("end");
              } else {
              gotoAndPlay("loop");
              }

              Sketchsta. i understand almost nothing... sorry, my english isn't good
              • 4. Re: preloader improvement
                Sketchsta Level 1
                Hey gdmt, sorry for the stupid way i described the layout before.

                I hope this is easier:

                on the _root timeline (main timeline) i have 3 layers.
                1---actions
                2---progress bar
                3---container

                the container is where the loaded content is loading in to. This is just an empty MovieClip.
                The progress bar is a MovieClip which contains the following on it's own timeline:
                3 layers here too:
                1---actions
                2---progress
                3---loop

                the progress layer contains a 100 frame animation ( loading progress from 0% to 100%)
                the loop layer has a 1 frame MovieClip symbol on the first frame. This is where you put your looping animation.
                ( this is where i had the problem you are having, the symbol was a Image, not a movieClip, which means it was being played to the progress bar movieClip timeline.)

                heres --=>THE .FLA <=-- for the last preloader i used.
                • 5. Re: preloader improvement
                  gdmt Level 1
                  thank you very much Sketchsta!
                  :D
                  • 6. Re: preloader improvement
                    Sketchsta Level 1
                    your welcome