How to embed flash library into the main swf file?

Currently, here is what I get after compilation:

But I found that this will cause a problem in browser, and assets will never be loaded.
How can I embed all assets into the generated SWF file?

Should be fixed on dev :slight_smile:

Thanks, I can see there that the next release is a hot release, as lots of issues I have reported that I hope it will be fixed too :slight_smile:

When you say “fixed on dev” do you mean the default behavior will be to put everything in a single swf? seems like I should have the option, here. For my project I want Json and swf files loaded externally at runtime in debug, so the animator can test changes to them without re-compiling. for release, I just want a single swf that I can put on a website. is this doable?

It should work this way currently, depending on whether you use embed="false" (or not) on the <library /> tag.

The only caveat right now is that you cannot instantiate the full timeline on the Flash target when it is embedded – only named child symbols. Still seeing if we can implement a workaround

1 Like

Thank you, I wasn’t expecting a reply this fast! and my game uses only library symbols rather than the main timeline, so this is perfect.

Just tried it, works for the libraries, but when I try to not embed json files (various run states of the game are manipulated with Debug.json) I get “assets/data/Debug.json” exists but only asynchronously. Is there a way to achieve this with those files as well?

Looks like I need to change my Assets.getText() call to Assets.loadtext()

Thanks for everything!

1 Like