Swf library problem?

I use swf library to get BitmapData on flash and windows.and swf file has Bitmap class only(I need only).
It’s OK when I get TagDefineBitsLossless BitmapData on flash and windows,but don’t work when I get
TagDefineBitsJPEG3 BitmapData on flash(windows is OK),see the code,and I find it’s no handle on flash.

https://github.com/openfl/swf/blob/master/format/swf/instance/Bitmap.hx#L144

The “swf” format code is not guaranteed to work on Flash. When you use type “swf” with OpenFL, the Flash target uses an ordinary flash.display.Loader and uses Flash’s built-in SWF support. “swflite”, however, is the same on Flash and other targets

The only way to uncompress the bytes on Flash in a quick way is to use a Loader, which breaks the synchronous nature of this API. It could be done manually with a ByteArray here, but it could lock up Flash Player since its slow :slight_smile:

Thanks.
It’s means I must do it separately? use "swf " on windows,and flash.display.loader on flash.
I hope I could use the unified API

If you use <library path="library.swf" preload="true" /> and Assets.getMovieClip ("library:") it should work on all targets – it uses a display loader on Flash and the custom SWF elsewhere

Well,I don’t use this way.Thank your answer :yum: