I tried open my html5 games from online website and sometimes I got “Error load assets” (randomly can be sound, png, or fonts). That error cause my loading stopped and I must refresh it again to make loading working again.
Is it have connection with update lime 3.7.4, because change log : “Added verbose log messages during asset library preload”
I actually ran into the same problem with mobile Safari. It seems that some browsers place a hard limit on the amount of resources they will allow any single page to fetch from the internet. Other browsers have hard limits on how many concurrent connections they will allow for.
You’ll have to head over to the MDN and log a bug with their tracker if one doesn’t already exist.
Alternatively you could minimize your static asset pool and defer loading of - for instance, ‘Game Over’ screens until the game has started up.
This should reduce your initial resource pool and allow the preloader to complete. This is also, the solution we had to implement when building an HTML5 game.
Assets.loadLibrary ("level1").onComplete (function (library) {
var bitmapData = library.getBitmapData ("Image1.png");
var bitmapData2 = Assets.getBitmapData ("level1:Image1.png");
});
It will allow bundling assets into distinct asset libraries, which can be loaded at once, with a single progress and complete. Then it is possible to access assets directly from the library, or using a prefix when calling the global Assets class
If you have verbose asset loading, try using openfl test html5 -v, and it should show you which assets begin loading, which complete, and so if preloading hangs, we should be able to know which asset files it might have tripped up on
Open the Windows command-prompt, change to the directory of your project and run the command
I’ve had problems with cache in FlashDevelop on the HTML5 target, particularly.
It’s possible to also edit the target drop-down in FlashDevelop, so you can edit “html5” to “html5 -verbose”, but if the HTML5 project is not loading properly, I highly recommend trying the command prompt at least once to see if it works differently
Sorry for long reply, I’ve test openfl test html5 -v and html5 -verbose and the different was there is a log message of assets like this [lime.utils.AssetLibrary] Loaded asset: images/UI/lose.png [598/651]
IE : always stuck at preloader with random assets stuck. (random x/651)
Firefox : sometime stuck sometime pass the preloader. Stuck issue was random assets too. (random x/651)
Chrome : always pass the preloader.
The result was same like I mention it in the first post.
Wow, that’s a lot of assets. Well, by comparing the “Loaded” messages with the “Loading” messages, it should be possible to know what is not finished. I wonder if there’s a simpler way for us to figure that out. Perhaps its stuck on fonts?
Its stuck randomly, can be fonts, png, or sound. But before using the new preloader I’m never got this error.
Is there a way using old NMEPreloader on new version 4.8.1?
And here’s the test result online (I test it with window 7 64-Bit, 3 browser : IE, Firefox, and chrome): 1. IE - 5 times reload = 5x error type TEXT (.json) with different file