This should be possible if you run
openfl process first:
openfl process test.swf
This should generate a “test.bundle” directory.
We are currently working on a newer SWF conversion format that outputs to a ZIP file instead.
1. Including a .bundle in your assets directory
If you drop a *.bundle directory in your assets directory, it should be possible to use
Assets.loadLibrary with the path to the bundle, like this:
var clip = Assets.getMovieClip("assets/test.bundle:MyMovieClip");
2. Including a .bundle separately
You should be able to load a *.bundle from an arbitrary location at runtime using one of two methods
var loader = new Loader();
Similar to how Flash instantiates content when using a
Loader, this will instantiate the main timeline of the target library once it is loaded. I believe we might also register it with
Assets so that you can reference other resources
var clip = Assets.getMovieClip("path/to/test.bundle:MyMovieClip");
The other method is to use
openfl.utils.AssetLibrary and to load it that way. Once loaded you can register with
openfl.utils.Assets if you like for convenience.
var clip = library.getMovieClip("MyMovieClip");
var clip = Assets.getMovieClip("test:MyMovieClip");