4 Replies Latest reply on Jan 12, 2009 9:54 PM by W_Bell

    Reset the ProgressBar

    W_Bell Level 1
      When I load an image initially the bar goes to 100% and then when I reload another image
      the ProgressBar bar Starts at 100% and jumps back to 0 then continues to Play.
      I am using Poll Mode if that makes any difference.

      Tried the following with no luck. There is very little information I found and I am hoping possibly someone else has done this before?

      Thank you,

      myPreloader.setProgress( 0, 100 );
      myPreloader.reset( 0, 100 );
        • 1. Re: Reset the ProgressBar
          W_Bell Level 1
          Well, I found this Doc on the problem and it looks like another Adobe bug.

          If you look at the composition of this component you will notice none of the progress line display
          when loading and the bar. This is the detail so what's the point in having detail if you can't see it?
          • 2. Re: Reset the ProgressBar
            W_Bell Level 1
            It also appears there may be another glitzch or possibly the reason the ProgressBar is the way it is;
            if you load a list of images using the polling method, then once you return to the cached images the
            bar won't function properly as it needs a data feed to work. So the bar will just sit there for an instance
            and show 100% while the cached image displays.

            This leads me to another possible fix... How can you show the bar "only if there is data to pull"?
            Otherwise make the bar _visible=false.

            Possibly someone can help with another method of making the constructor work in Manual mode.
            I have attached the code but had no success getting the bar to display 0% except on the initial load.

            Any suggestions are welcome
            • 3. Re: Reset the ProgressBar
              robdillon Most Valuable Participant
              If you have more than one file to load then create more than one instance of the loader component. Use one instance for each file. Once you've loaded the file, attach it to a movieClip or store it in a variable. Once the file is loaded you now have a reference to it and don't need to try and load it again.
              • 4. Reset the ProgressBar
                W_Bell Level 1
                Rob, I was looking at the destroyObject(instanceName) class.
                I thought maybe just destroy the instance after each use and recreate it on each call.
                This progressBar does not work when caching if you repeat an image download.
                Perhaps you could show me your method to use with this listener: