带功能的SWC可以被Adobe Flash IDE使用吗
我用类、函数和符号创建了 SWC。当我尝试将其导入 Adobe Flash CS3 中的库时,没有任何反应。如果我创建没有函数的 SWC,它将毫无问题地导入到库中。这是预期的行为吗?还是Adobe Flash CS3的bug? Flash CS4和Flash CS5导入SWC的功能是否没有问题,然后可以使用SWC中的功能?
I created SWC with classes, functions and symbols. When I trying import it to library in Adobe Flash CS3 nothing happens. If I create SWC without functions it is imported to library without problems. Is it expected behaviour? Or is it bug of Adobe Flash CS3? Do Flash CS4 and Flash CS5 import SWC with functions without problems and then can use functions from SWC?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
SWC 存档通常包含已编译的代码、一个 XML 文件(描述编译到其中的类和符号)以及其他可选部分(例如图像或声音或基本上您可能在项目中使用的任何其他内容)。存档中包含 XML 文件的多个版本,有些版本无法被 Flash CS3 识别,因为它们是在程序发布后出现的。除此之外,CS3 对 SWC 提出了一项要求,即它必须至少包含一个扩展 DisplayObject 的类的类定义 - 这是因为历史上 SWC 用于 Flash IDE 组件和本来是 UI 对象的组件。
AFAIK,COMPC 存在无法编译可在 Flash CS3 中使用的 SWC 的问题(与签署库 IIRC 相关),但是,如果是这种情况,通常最好在使用 Flex 编译器时进行编译SWC 从 Flash IDE 生成,但反之则不然。
SWC archive usually contains compiled code, an XML file that describes what classes and symbols where compiled into it and other optional parts such as images or sounds or basically anything else you may be using in your project. There are versions of the XML file contained in the archive, some versions aren't recognized by Flash CS3 because they appeared after the program was released. Besides that, CS3 had a requirement for SWC that it has to contain at least one class definition of a class that extends DisplayObject - this is because historically SWCs were used for Flash IDE components and components where meant to be UI objects.
AFAIK, there were issues with COMPC not being able to compile an SWC that can be used in Flash CS3 (something related to signing the library IIRC), but, if this is the case, it is usually better to compile using Flex compilers while using SWCs generated from Flash IDE, but not the other way around.