Releasing html5 project?


I would like to know the recommended approach to package a html5 release? like there is so many images and assets that would be downloaded from the server, while in flash target, there where only one swf file, so, is there any recommendation?

Hi. You should use an atlas. Take. Look at

Ah, and see this too:

Thanks, didn’t hear of such a tool before, My assets generated from swf file, and other from direct images, so, does the openfl-atlas forces Tilemap to display images? do I have to re-write the code to use Tilemap?

The way that web browsers are designed, downloading an archive file and extracting asset files (for example) would not be efficient, likely, compared separate images and asset files.

You can use <assets path="Assets" rename="assets" embed="true" /> to try and embed it in the JavaScript, but you lose the preloader if you do this.

I would recommend using the openfl test html5 -final to do dead-code-elimination and minification to reduce the final JS file size, though

Thanks, but where would the assets got embedded into incase of html5?
also, how would I exclude copying certain folder is assets?

It would be included in the final JS file, but you get no preloader for them, so it’s not the greatest user experience.

Be carefull with embed tag set to “true” in html5.
If you plan to acces on mobile device, your risk crash your browser due to memory overload. Especially with Ipad Mini.
I suggest to create a assets loader class to load you asset when you needed and dispose them correctly.

1 Like

Thanks for note, I am still scratching my head about packaging html5 target, I think I will minify js files and keep other assets as is