Share Posted July 28, 2010 Hi, i create an XMLLoader like this : var configLoader:XMLLoader = new XMLLoader(applicationConfigURL,{name:"configLoader", onComplete:onLoadingComplete, onProgress:onLoadingProgress, onError:onLoadingError, autoDispose:true}); configLoader.load(); here is my XML: <?xml version="1.0" encoding="UTF-8"?> and when i trace the bytesTotal and the progress i got this result : Preloader.onLoadingProgress() 478 0.9895397489539749 Preloader.onLoadingProgress() 232545 0.031550882624868305 Preloader.onLoadingProgress() 232545 0.0434711561203208 Preloader.onLoadingProgress() 232545 0.05130619880023221 Preloader.onLoadingProgress() 232545 0.052523167558967084 Preloader.onLoadingProgress() 232545 0.05253606828785826 Preloader.onLoadingProgress() 232545 0.12299124900556882 Preloader.onLoadingProgress() 232545 0.19344642972327936 Preloader.onLoadingProgress() 232545 0.2639016104409899 Preloader.onLoadingProgress() 232545 0.3343567911587005 Preloader.onLoadingProgress() 232545 0.404811971876411 Preloader.onLoadingProgress() 232545 0.47526715259412156 Preloader.onLoadingProgress() 232545 0.5457223333118321 Preloader.onLoadingProgress() 232545 0.6161775140295427 Preloader.onLoadingProgress() 232545 0.6786901459932486 Preloader.onLoadingProgress() 232545 0.6807456621299104 Preloader.onLoadingProgress() 232545 0.7512008428476209 Preloader.onLoadingProgress() 232545 0.8216560235653314 Preloader.onLoadingProgress() 232545 0.892111204283042 Preloader.onLoadingProgress() 232545 0.9625663850007525 Preloader.onLoadingProgress() 232545 0.9925777806446064 Preloader.onLoadingProgress() 232545 1 Preloader.onLoadingProgress() 478 0.9895397489539749 (the first Number is the bytesTotal and the second one is the progress). i noticed that if i remove the autoDispose from the XMLLoader i don't have the last 478 bytesTotal. i also try to put the XMLLoader in a LoaderMax and put requireWithRoot:this.root but nothing changed. Any idea? thanks. Link to comment Share on other sites More sharing options...
Share Posted July 28, 2010 What version of XMLLoader and LoaderCore do you have? Please make sure you're using the latest version and let me know if you still run into the same issue. http://www.LoaderMax.com Link to comment Share on other sites More sharing options...
Author Share Posted July 29, 2010 I just downloaded the latest version. That's better because the final bytesTotal value is correct but I still have the problem with the first value. Link to comment Share on other sites More sharing options...
Share Posted July 29, 2010 Hmm, I can't seem to reproduce the problem - could you please post a sample FLA that demonstrates the issue? The simpler the better (doesn't need to be your production files). I just need some way to see this happening so that I can troubleshoot. Link to comment Share on other sites More sharing options...
Author Share Posted July 29, 2010 No problem, i'll post a zip file asap as i'm in a middle of project. Link to comment Share on other sites More sharing options...
Author Share Posted July 30, 2010 Here is a test project. I still have the problem. I think the first value is the bytesTotal of the xml file and the other is the bytesTotal of every objects loaded in the xml file. Link to comment Share on other sites More sharing options...
Share Posted July 30, 2010 This is the trace() I see in the output window: Preloader.onLoadingProgress 497 Preloader.onLoadingProgress 336716 Preloader.onLoadingProgress 336716 Preloader.onLoadingProgress 336716 Preloader.onLoadingProgress 336716 Preloader.onLoadingProgress 336716 Preloader.onLoadingProgress 336716 Preloader.onLoadingProgress 336716 Preloader.onLoadingProgress 336716 Preloader.onLoadingProgress 336716 Preloader.onLoadingProgress 336716 Preloader.onLoadingProgress 336716 Preloader.onLoadingProgress 336716 Preloader.onLoadingProgress 336716 Preloader.onLoadingComplete This is all correct. The XMLLoader must first load the XML file itself (and since you didn't define an estimatedBytes on your XMLLoader, its bytesTotal is initially set to just the XML file size itself) and then once it loads the XML, parses it and discovers other nested loaders, it adjusts the bytesTotal accordingly. Am I missing something? Were you thinking there was a problem with the bytesTotal? Help me understand. I was under the impression that you were originally saying that the problem was that it reported the smaller bytesTotal value right at completion when autoDispose was true, but as you can see that was fixed a few versions back. From what I can tell, this is all functioning appropriately but maybe I'm being dense (it happens plenty often). Link to comment Share on other sites More sharing options...
Author Share Posted July 30, 2010 That's what i guessed but i thought it was a bug cause i thought the bytesTotal in that case were the xml + all the nested loaders. I will define an estimatedBytes, that will fix my problem. And yes, the bug i report in my first post was fixed by downloading the current version on loadermax. Anyway, thank you for your time and explanations. 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