简体   繁体   English

如何将Flash CS4中的库符号从外部.swc(RSL)链接到基类?

[英]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. 我遵循了Theo的建议,并创建了一个具有所有常用类的.swc,并将.swc作为外部库添加到了我的模块.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. 这一切似乎都工作顺利-解压缩时我没有收到TypeErrors并且我的类都出现在.swc文件的catalog.xml中-但现在我遇到了一个新问题:尝试时要将模块.fla的库中的符号链接到我的.swc rsl的基类,它说在类路径中找不到基类定义。 The whole reason I want to use rsls is so I can do this, but google is no help. 我想使用rsls的全部原因是可以这样做,但是google并没有帮助。 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? 如果现在将项目的源路径或.swc包含在常规(而非外部)库路径中,这是否会取消rsl的共享优势,或者编译器是否仍会知道不将共享类编译到模块.swf中?

Thanks! 谢谢!

-Dane -丹

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. 如果仅使用外部库,则flash找不到类,也不允许您将符号链接到它们。 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. 但是,如果将.swc添加为普通库,而不是外部库,则flash确实允许您将符号链接到该类,并且如果然后删除刚刚添加的普通库,则链接将保留,并且可以使用外部库中的类。

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. 如果有人好奇,普通库和共享库之间的大小差异对我来说是4kb,但是我仍然需要在共享类上做很多工作……即使是很小的差异,尽管考虑了这一点,也可能会产生很大的影响应用程序最终可能会在一百个或更多模块的领域中使用,而我公司则使用即付即用的云托管服务。 So thanks again to those who answered my previous question and led me toward rsls. 因此,再次感谢那些回答了我之前的问题并带领我迈向rsls的人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM