I've made a runtime shared library for my project, let's call it ResourceLibrary. It contains all of the embedded assets for my project (images, sounds, movie clips) and it's used as a singleton in a lot of other bits of code.
I am compiling it using this batch (Windows unfortunately):
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/men开发者_JS百科us -library-path+=data/icons/relationships -include-lookup-only=true
That makes my resources.swc file, which, when I include this swc in my library and have -static-link-runtime-shared-libraries=true. But I want to not embed my runtime shared libraries in my main swf (cuts down the file size from 10mb to ~3mb), so static-link-runtime-shared-libraries must be false.
When I run my code, however, I get this error:
[Starting debug session with FDB]
[Fault] exception, information=VerifyError: Error #1014: Class mx.core::BitmapAsset could not be found.
I've been raking my brain over this probably super simple solution, but everywhere I look the answer everyone else gets is "static-link-runtime-shared-libraries to true".
Anyone have any clues/ideas on where to start?
I figured this out but forgot to post here.
What you have to do is tell it where the swf to be used will be located, and what classes will be in it (the swc arg)
-runtime-shared-library-path=lib/MyLibrary.swc,MyLibrary.swf
I then extract the swc (using 7zip, but any works) and re-name the extracted swf to "MyLibrary.swf" and move it into the same directory as my main program.
If you're using a SDK that doesn't match the version of Flash Builder you're using, you may need to manually link to that SDK in the project properties.
You do know that creating a swc is not an RSL, right? swc = compile time library. swf = runtime library (or swz if it's Adobe signed libs).
http://livedocs.adobe.com/flex/3/html/help.html?content=rsl_01.html#168690 http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_14.html
精彩评论