I want to port some as3 code(to target html5), where I download a lot of external swf files via Loader and then access some classes from them using:
var c:Class = loaderInfo.applicationDomain.getDefinition(name) as Class;
var instance:Sprite = new c();
https://www.openfl.org/learn/haxelib/tutorials/using-swf-assets/ explains only how to embed swf files to access classes inside, does it mean that it’s the only possible way to do it?
UPDATE: Tested both approaches.
- My old as3 code still works in flash target, but for some reason in html5 target I can’t load .swfs (IOError). Perhaps html5 target simply does not support this approach?
- Then I tried to embed my swfs(around 60) via tags in project.xml, but after this project does not complile at all: Fatal error in gc Too many heap sections pops up. Is it because of the amount of swfs files and packing all assets in one fat swf will help? Or is it because of the assets amount and packing everything in one swf won’t help?