Custom preloader and loading queue


#1

Hi.

class CTMPreloader extends DefaultPreloader
...

override public function onInit():Void 
	{
trace(1)
		Assets.loadLibrary("swf-library").onComplete(function(_)
		{
			trace(2);
			this._loader = Assets.getMovieClip("swf-library:LoaderCore");
			
			addEventListener(Event.RESIZE, onResize);
			onResize(null);
		});
	}

override public function onLoaded():Void 
	{
		trace(3);
		removeEventListener(Event.RESIZE, onResize);
		Timer.delay(loaded, 2000);
	}

Traces - 1,2,3 - if simulate loaded, but if start simple html5 build, traces 1,3,2 - why? I want to load some aasets before, the app starts load, i want to prevent all of init/progress/loaded methods while my assets will be available
Thx


#2

The application assets are loading before your preloader assets, I guess. Perhaps this has something to do with the limit we put here:

We should evaluate bumping that on HTML5, so smaller assets can load before the larger ones