Skip to main content
W_Bell
Inspiring
January 9, 2009
Question

Reset the ProgressBar

  • January 9, 2009
  • 2 replies
  • 454 views
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,
WBell

myPreloader.setProgress( 0, 100 );
myPreloader.reset( 0, 100 );
This topic has been closed for replies.

2 replies

robdillon
Participating Frequently
January 11, 2009
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.
W_Bell
W_BellAuthor
Inspiring
January 13, 2009
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:
W_Bell
W_BellAuthor
Inspiring
January 10, 2009
Well, I found this Doc on the problem and it looks like another Adobe bug.
http://bugs.adobe.com/jira/browse/SDK-15022

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?
W_Bell
W_BellAuthor
Inspiring
January 10, 2009
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