Animate preloadJS "setMaxConnections" complications HTML/Javascript
Hi All,
I have added the following to the default exported content from animate in order to greatly speedup content pre-loading: PreloadJS API
loader.setMaxConnections(10);
loader.maintainScriptOrder = true;
The problem i have is that the "handleComplete" triggers before all the content has been downloaded. ( This problem gets worse when you emulate a slow network connection ) So the animate content starts even though its still downloading required images.
There are a few ways of doing this, but require overriding the way the default animate handleComplete ( see bellow ) works.
loader.addEventListener("complete", function(evt){handleComplete(evt,comp)});
As in adding array/loop that adds .complete / .onload to the images in the manifest and then overrides the complete function once they have all downloaded.
Edit: Possibly within animate:
this.stop on frame 1.....create another "EventListener", detect once all library/stage elements are loaded....this.play....
Thanks !!
