How to best manage embedded assets?


(Jacob Albano) #1

We were getting waaaay off topic, so:

Continuing the discussion from Access of undefined property:

My rule against globals only applies to mutable data. Since embedded assets are constant, there’s no problem with having them globally accessible. With FLAKit I actually generate an Assets class that includes every image, audio, and text file in the project.

I don’t know if the compiler combines duplicate assets, but my hunch is that it doesn’t. Could be interesting to experiment and see if it increases the size of the SWF.