flashactionscript-3flash-cs4symbolsrsl

How to link library symbols in Flash CS4 to base classes from an external .swc (rsl)?


This question stems from this question that I asked yesterday. I've followed Theo's advice and created a .swc with all the common classes and added the .swc as an external library to my module .swf. This all seems to have worked smoothly--I don't get TypeErrors and my classes are all present in the catalog.xml of the .swc file when I unzip it--but now I've encountered a new problem: when I try to link a symbol in the module .fla's library to a base class from my .swc rsl, it says the base class definition can't be found in the classpath. The whole reason I want to use rsls is so I can do this, but google is no help. Any ideas? If I now include the project's source path or the .swc in the normal (not external) library path, will that cancel the sharing benefits of the rsl, or will the compiler still know not to compile the shared classes into the module .swf?

Thanks!

-Dane


Solution

  • Wow, this is pretty ridiculous.

    If you just use an external library, flash can't find the classes and won't let you link your symbols to them. You get the error I described in my question. HOWEVER, if you add the .swc as a normal library, not an external library, then flash does allow you to link the symbol to the class, and if you THEN remove the normal library that you just added, the linkage will remain and the class from the external library will be used without issues.

    Still curious if anyone has a less hacky way of accomplishing this.

    If anyone's curious, the size difference between the normal and shared library was 4kb for me, but I still have a LOT of building left to do on the shared classes... even a small difference like that could make a sizable impact though considering this app may eventually use in the realm of a hundred or more modules and my company uses a pay-as-you-go cloud hosting service. So thanks again to those who answered my previous question and led me toward rsls.