0

OK, the docs are messy at best. I have huge issues fading in and out preloaded assets if I do not add 'false' to the instance of PreloadJS. But when I add it I completely lose the progress event ... what is it that's so deeply hidden in the docs, that I cannot find anything about this?

And has anyone got a complete example of HOW to actually and properly load an array (actually an object) of images without losing the progress event AND still have an asset that behaves as expected when adding it to the DOM and fade it in?

2 Answers2

0

This was also posted in a question on GitHub.

The short answer is that loading with tags (setting the first param useXHR to false) doesn't support granular progress events because downloading images with tags doesn't give progress events in the browser.

You can still get progress events from the LoadQueue any time an image loads, but each image will just provide a single "complete" event.

Lanny
  • 11,244
  • 1
  • 22
  • 30
0

@Lanny True for that part, but in my case I was also missing the 'true' in .getResult(), and the createObjectURL() for the image data:

…
    var preloader = new createjs.LoadQueue();
…
…
    function handleFileLoad ( e ) {
        var item = e.item,
            result = preloader.getResult(item.id, true),
            blob_url = URL.createObjectURL( result );
…

So, that I was actually able to handle the image data as a blob … I couldn't find anything close to 'createObjectURL' in the docs. I guess that renders the docs 'not complete' at best …