如何在 AS2 Flash 项目中包含 SWC?
在 AS3 中,我知道如何实现这一点。只需单击“ActionScript 设置”,然后导航至“SWC 文件或包含 SWC 文件的文件夹”下的 SWC 文件即可。
但是,当项目设置为 AS2 时,“Actionscript 2.0 设置”是一个相当稀疏的菜单,并且将文件夹添加为类路径似乎不起作用。
这还能实现吗?
In AS3, I know how to accomplish this. One needs only to click "ActionScript Settings", and navigate to the SWC file under "SWC Files or Folders Containing SWC Files".
However, when the project is set to AS2, the "Actionscript 2.0 Settings" is a rather sparse menu, and adding the folder as a classpath doesn't seem to work.
Can this even be accomplished?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设您的 SWC 是为 AS2 作为编译组件创建的,您必须将其添加到 Flash 组件文件夹中。对我来说,在Win7上使用CS4路径是:
完成此操作后,重新启动 Flash,并且组件 SWC 应在 IDE 的“组件”面板中可见。将其拖到舞台上,然后将其删除,这将在您的库中留下它的副本。您现在应该能够通过代码访问 SWC 中的类。
来源(还包含超出范围的 SWC 创建说明问题的范围)
Assuming that your SWC was created for AS2 as a compiled component, you have to add it to your Flash components folder. For me, using CS4 on Win7 the path is:
Once this is done, restart Flash and the component SWC should be visible in the Components panel of the IDE. Drag it to the stage and then delete it, which will leave a copy of it in your library. You should now be able to access the classes within the SWC in code.
Source (also contains instructions for SWC creation which is beyond the scope of the question)