0

I want to load assets using priority. I wrote an abstract class which will handle the preloadjs queue using priority.

Is there any better way to achieve this?

Vikas Yadav
  • 3,094
  • 2
  • 20
  • 21
keelbo
  • 19
  • 3

1 Answers1

1

Have a look at documentation of LoadQueue.js.

Here it is mentioned to use maintainScriptOrder property, like below.

     *      var queue = new createjs.LoadQueue();
     *      queue.setMaxConnections(3); // Set a higher number to load multiple items at once
     *      queue.maintainScriptOrder = true; // Ensure scripts are loaded in order
     *      queue.loadManifest([
     *          "script1.js",
     *          "script2.js",
     *          "image.png", // Load any time
     *          {src: "image2.png", maintainOrder: true} // Will wait for script2.js
     *          "image3.png",
     *          "script3.js" // Will wait for image2.png before loading (or completing when loading with XHR)
     *      ]);
Vipin Kumar
  • 6,441
  • 1
  • 19
  • 25