Actionscript 类到 1 个 SWC 文件

发布于 2024-08-25 05:22:10 字数 238 浏览 9 评论 0原文

我正在使用 Flash Builder 4(Flex Builder 3 之后的版本,因此与 Flex Builder 3 非常相似),并且有一堆我经常需要引用的动作脚本类。我将它们放在单独的文件夹/包中以保持干净。

我知道可以从这些动作脚本文件创建 SWC。我的问题是如何在 Flash Builder 4 或 Flex Builder 3 中执行此操作。我需要其他工具吗?我的目标只是在项目中使用 SWC 并保持干净,而不是拖拉所有这些文件。

I'm using Flash Builder 4 (the version after Flex Builder 3, so very similar to Flex Builder 3) and have a bunch of actionscript classes that I frequently need to reference. I have them in a separate folder/package to keep things clean.

I know that it's possible to create a SWC from these actionscript files. My question is how do I do it in Flash Builder 4 or Flex Builder 3. Do I need other tools? My objective is just to use the SWC in the project and keep things clean instead of dragging around all these files.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(3

肩上的翅膀 2024-09-01 05:22:10

创建一个Flex Library项目并将代码放在/src文件夹中。点击

  • 项目属性-> Flex 库构建路径 ->课程

以确保您的所有课程都包含在内。
您可以在此处设置“输出文件夹”以指向主项目 /libs 文件夹,以便将其自动构建到您的项目中,或者在创建 .swc 时手动将其从“输出文件夹”创建到项目的“libs”文件夹中。项目。点击 [确定] 按钮,您的 .swc 将被创建。该代码现在可在您的主项目中使用。

Create a Flex Library project and put the code in the /src folder. Click on

  • project properties-> Flex Library Build Path -> Classes

to make sure all your classes are included.
You can set the 'Output folder' here to point to your main project /libs folder to have it automatically build into your project or just drag the .swc manually when it's created from your 'Output folder' to the 'libs' folder of your project. Hit the [OK] button and your .swc will be created. The code is now available in your main project.

北斗星光 2024-09-01 05:22:10

在 Flex Builder 3 中,您可以右键单击项目面板并选择“新建”->“项目”。 Flex 库项目。创建项目的步骤与创建常规项目非常相似。您只需将要编译的类链接到 SWC 中,并告诉 Flex Builder 将编译后的代码放在哪里即可。

In Flex Builder 3 you can right click the projects panel and choose New -> Flex Library Project. The steps to creating a project are very similar to creating a regular project. You just link the classes you want compiled into your SWC and tell Flex Builder where to put the compiled code.

慕巷 2024-09-01 05:22:10

另一种方式是:
假设您有一个类名称 MyCls,您想要将其编译成 swc 文件。
创建一个Fla,然后ctrl+shift+f12,勾选发布项目到SWC。
转到操作面板,输入:

var v:MyCls;

最后,编译这个 fla。它生成一个包含您的 MyCls 的 SWC;

other way is:
suppose you have a class Name MyCls which you want to compile into swc file.
create a Fla, and ctrl+shift+f12, check the publish item to SWC.
go to the action panel, type :

var v:MyCls;

finally, just compile this fla. it generate a swc which contains your MyCls;

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