SWF loader support for assets 😄


#1

Hey guys,

Quick update, we now have hot-reload support for SWF assets in the NPM releases, check out “features/display/UsingSWFAssets” or “demos/NyanCat” under https://github.com/openfl/openfl-samples-ts to get an example.

In short, you can import a SWF file, and processing is automatically done as a part of the build. The import returns the file path you can use to load it

import * as libraryPath from "./../assets/library.swf";

...

AssetLibrary.loadFromFile (libraryPath);

For anyone using Adobe Animate for Adobe Flash Professional, this provides a hot reload workflow for working with changed SWF assets, and simplifies the process of converting SWFs for use with HTML5 :thumbsup: