Using SWF's and bunch of files. HTML5 target

I use SWF with a lot of animations,

<library path="assets/swf/effects.swf" preload="true" generate="true" />

Everything works perfectly. But, it creates bunch of .png/.png files in libs folder (html5\bin\lib…)
2000k+ in my case.
Is it possible to archive these libs somehow? And then to use them from the archive.
Something similar to

<library name="default" type="pak" />
<assets path="assets/img" rename="img" library="default" />


The asset packing and SWF asset libraries are currently incompatible with one other, though a packed SWF approach would be interesting. I’m afraid that performance on HTML5 would be reduced, since we would lose browser GZIP compression, as well as requiring splitting bytes at runtime, but I still think it would be useful to see this as an option. The SWF tools would need to have some improvements to add the ability to write to one file, then the runtime SWFLiteAssetLibrary class would similarly need to have improvements to know how to read the format.

We actually have A LOT of flexibility in how the format is written and read, so definitely open to ideas for making SWF assets more useful :slight_smile:

1 Like

That would be a cool option :slight_smile: no joke
As for now, i think i’ll just spend some time to convert swf animations into spritesheets to use asset packing.
Thanks alot for the answer and for the openFL! :+1:

1 Like

If you can improve performance with a sprite batch rendering, that’s great!

1 Like

I recommend creating/handling animations outside of SWF using, for example, Spritesheet ( or skeletal animations with Dragonbones ( since its plugin is available and working OK.

Complex animations from SWFs are not performing great (FPS-wise) in compare to sprite/skeletal animations having HTML5 as your target.

1 Like