如何在 AS2 Flash 项目中包含 SWC?

发布于 2024-09-30 14:59:06 字数 179 浏览 14 评论 0原文

在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不必你懂 2024-10-07 14:59:06

假设您的 SWC 是为 AS2 作为编译组件创建的,您必须将其添加到 Flash 组件文件夹中。对我来说,在Win7上使用CS4路径是:

C:\Users\USERNAME\AppData\Local\Adobe\Flash CS4\en\Configuration\Components

完成此操作后,重新启动 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:

C:\Users\USERNAME\AppData\Local\Adobe\Flash CS4\en\Configuration\Components

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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文