Share Posted March 17, 2011 Dear Gurus, Here's the situation; I have a LoaderMax, with 4 SFWLoaders. Each SWFLoader has its own LoaderMax to which several ImageLoaders are appended. The progress of the loading is visualised using a simple progress bar. Now this progress bar is jumping backwards now and then. I already read the Tips & Tricks page on LoaderMax and am using rawProgress instead of progress, all LoaderMax in the SWFs have the attribute requireWithRoot: this.root, and I've also appended new SelfLoader(this) to the LoaderMax in the SWFs. In the BandwithProfiler I see that first my SWFs are loaded, and then the Images start loading. Knowing this it's perfectly normal that my progress bar is jumping backwards, because new info concerning the size of the images is only known after loading the SWFs. But is there a way to solve this, so that the info of the total load of the LoaderMax in the SWFs is already know upfront? It's not possible for me to use estimatedBytes, because the SWFs are dynamically loaded from a framework, so the filesize differs. Any tips are highly appreciated! TIA, R. Link to comment Share on other sites More sharing options...
Share Posted March 17, 2011 Hey R, wow, it sounds like you've done your research. Thank you for documenting all the steps you have taken. it really saves us time in trying to help you. WIthout it I probably would have just told you to read tips and tricks:) Being that estimatedBytes isn't a valid solution for you, I'm wondering if a dirty hack would be acceptable? Perhaps on the progressHandler that is responsible for resizing your loader bar you check if the new value is less than or greater than the current value, then you can only adjust the size if there is an increase. I apologize for not having a more elegant solution. Carl Link to comment Share on other sites More sharing options...
Share Posted March 17, 2011 Seems like a pretty elegant solution to me. A loadingBar class that takes in values and handles it appropriately (eg ignoring negative/lesser values). You can even tween the bar movements for smoooooth bar moving. Link to comment Share on other sites More sharing options...
Share Posted March 18, 2011 Would you mind trying the attached updated version of LoaderMax to see if it helps your rawProgress to smooth out? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now