4 Replies Latest reply: Oct 20, 2011 7:41 AM by eprevot123 RSS

    parallel loaders fail to fire some Event.COMPLETE

    eprevot123 Community Member

      Hi all,

       

      I want to dynamically load several png images from 6K to 2,5M.

      I create the loaders in a for loop and start them all at the same time, and listen Progress, Complete, IOError and SecurityError on each loader.

      The problem is the COMPLETE events are not always fired, even if Progress events show all images are fully downloaded.

       

      I tested with Firefox and Chrome, I load 4 images 2.5M, 2M, 1M, and 6K, then I just get 2 or 3 COMPLETE events, sometimes the 4 are fired with Chrome.

      Did not find any workaround. I tried to listen ProgressEvent and call the completeHandler when bytesLoaded == bytesTotal but the loaderInfo.content is null (and bytesAvailable =0) so I can't get the Bitmap.

       

      1) Is there a known limitation in the number of simultaneous loaders, from flash player or browsers ? Does Adobe recommend to have queued loaders instead of simultaneous ?

      2) Is there a way to get the loaded Bitmap when COMPLETE is not fired ?

      3) I don't keep the loaders in a property of my class, and use weakReference for the listeners : the issue can come from my code ? (but the ProgressEvents are received until the download is complete)