Using Flash CS4, I am making a game in which there are a dozen sounds and several music tracks. To reduce publishing / compilation time, I moved the sounds and music to the (external) SWC, which is located in the "Library Path" for the project. This works, but with the caveat ...
Before I injected assets, I dynamically created Sound objects of inline sound, getting their classes with getDefinitionByName .
But now that they are in an external SWC, I need to have “specific” class references in order to load them like this, otherwise they will not be included in the published SWF and there will be a runtime error when getDefinitionByName tries to get a class that does not exist.
So my question is : in Flash Professional CS4, is there a way to force the inclusion of library resources, regardless of whether they are statically linked?
FlashDevelop has a compiler option "SWC Include Libraries", which is exactly what I want, and differs from the option "SWC Libraries". Description of the "SWC Include Libraries" option: "Associates all classes within the SWC file with the resulting application SWF file, regardless of whether they are used or not."
(In addition, it is important for me that all assets are contained in a single compiled SWF. Runtime linking is not what I need.)
flex flash actionscript-3 swc
aaaidan
source share