But not sure if people want me bumping, does this have no workaround for html5? I’m just trying to embed 9 swfs totaling 7.4mb. I have a Haxe+Flash game that I’m trying to port, I don’t think the runtime bundle hack works because I need the assets embedded for typecheck to pass.
But I’m can run openfl process on each one individually, could this be theoretically bypassed so that I could just supply the zips?
Edit2: I’d also like Type.getClassName(Type.getClass(X)) to work on them, but right now it only seem to work if you also give the movieclips an instance name. https://imgur.com/a/L45voiz
mc.__timeline.__symbol.className seems like is always have the right data, but it’s private, never returned, and I don’t see where I could change it to public.
Yes it is possible to use openfl process then to use AssetLibrary.loadFromFile at runtime or to use openfl.display.Loader (though that only allows seeing the main timeline)
It sounds like there might be an issue with memory running out in the SWF processing tool. I think it tries to process all SWFs in memory before writing them out at the end. Perhaps it would be possible to make the Lime tools call the processing tool once per file rather than once for all, or some quick fixes in the SWF library might help reduce memory pressure
Thanks for the reply. I did end up getting it working, if you baby the obj directory and delete the .zip files that get corrupt, you can build everything because the old stuff will get cached.
I started to look at the swf lib, but it’s a real OOP nightmare, hundreds of mostly empty classes blow through the whole 32bit heap by fragmenting unpredictably. It’s very hard to wrap my head around. >.<
Also, for people in the future, this snippet works to get class names after setting private fields to public:
var str:String;
if (!Std.is(obj, MovieClip)) {
str = "";
} else {
var timeline:Dynamic = cast(obj, MovieClip).__timeline;
str = timeline.__symbol.className;
}
A big help would be for the SWF exporter to either A.) run once per SWF file or B.) for the exporter to commit a processed SWF file to disk (and flush memory) before processing the next.
Here’s the file:
It’s rebuilt using lime rebuild swf or cd swf/scripts && haxe run.hxml
Here’s where Lime calls external tools to process asset libraries (in this case, to call the SWF tools):
It calls it once per handler, so it will call the SWF tools once with the Lime project and ask for the SWF tools to return processed libraries. This could be changed to run once per library, though it could be nice for performance if we could figure it out on the SWF tool side