我为我的项目制作了一个运行时共享库,我们称之为 ResourceLibrary。它包含我项目的所有嵌入式资产(图像、声音、电影剪辑),并且在许多其他代码位中用作单例。
我正在使用这批编译它(不幸的是Windows):
SET normalstuff=--namespace+=http://ns.adobe.com/mxml/2009,${flexlib}/mxml-2009-manifest.xml --namespace+=http://www.adobe.com/2006/mxml,${flexlib}/mxml-manifest.xml --namespace+=library://ns.adobe.com/flex/spark,${flexlib}/spark-manifest.xml -external-library-path lib -external-library-path+=${flexlib}/libs -external-library-path+=${flexlib}/libs/player/10.0
call compc -source-path src/ -output lib-ext/resources.swc -include-namespaces+=http://MYPROJECT -namespace+=http://MYPROJECT,confs/ResourceLibrary-manifest.xml %normalstuff% -library-path+=data/characters -library-path+=data/menus -library-path+=data/icons/relationships -include-lookup-only=true
这就是我的 resources.swc 文件,当我在我的库中包含这个 swc 并且-static-link-runtime-shared-libraries =true 时。但我不想在我的主 swf 中嵌入我的运行时共享库(将文件大小从 10mb 减少到 ~3mb),所以static-link-runtime-shared-libraries必须为 false。
然而,当我运行我的代码时,我得到了这个错误:
[Starting debug session with FDB]
[Fault] exception, information=VerifyError: Error #1014: Class mx.core::BitmapAsset could not be found.
我一直在思考这个可能超级简单的解决方案,但无论我在哪里看到其他人得到的答案都是“static-link-runtime-shared-libraries to true”。
有人对从哪里开始有任何线索/想法吗?