在Flex SDK中自动生成SWF
我正在使用 AS3 构建我的第一个网站,并使用 Flash Builder 4 创建/编辑我的 AS 类。我有两个 .fla 文件(preloader.fla 和 Portfolio.fla),我都将它们发布为 .swc 并将它们加载到 FB4 中的 ActionScript 项目(构建路径)中。当我点击调试时,FB4 会自动在 bin-debug 文件夹中生成一个名为 Preloader.swf 的 .SWF,但在我的 Preloader.as 中
new URLRequest("Portfolio.swf");
,这个 Portfolio.swf 并不是由它自己生成的。现在真正的问题是:我如何告诉 FB4 自动为我创建两个 .SWF 文件?或者说这不可能,有什么解决办法吗?
谢谢。
I'm building my first website with AS3, and I'm using Flash Builder 4 to create/edit my AS classes. I have two .fla files (preloader.fla and portfolio.fla) which I both published as .swc and loaded them into my ActionScript project in FB4 (build path). When I hit debug, FB4 automatically generates a .SWF in bin-debug folder called Preloader.swf, but in my Preloader.as I have
new URLRequest("Portfolio.swf");
and this Portfolio.swf isn't being generated by itself. Now the real question; how can I tell FB4 to automatically create both .SWF files for me? Or isn't that possible, any workaround then?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您无法使用 Flash Builder 编译 FLA 文件。只有 Flash Pro CS3/CS4/etc 可以编译 FLA 文件。它们是两个独立的 IDE,用于构建两种不同类型的应用程序。
您可以使用一种技巧,以便当您在 Flash Builder 中点击“编译”时,它会自动打开 Flash Pro CS4 并为您编译 FLA,但这实际上只是一种解决方法,并不能为您节省太多时间。以下是两个讨论此方法的网站:
(PS:如果你不知道,“Flex Builder 3”是“Flash Builder 4”的旧版本。他们重新命名了它,但它是同一个产品。“Flash Pro” CS5/CS4/CS3/8/MX2004/MX' 是与 FLA 配合使用的单独产品。)
You cannot use Flash Builder to compile FLA files. Only Flash Pro CS3/CS4/etc can compile FLA files. They are two separate IDE's meant for building two separate types of applications.
There is a hack you can use so that when you hit 'compile' in Flash Builder, it will automatically open Flash Pro CS4 and compile your FLA for you, but this is really only a workaround, and doesn't save you much. Here are two sites talking about this method:
(PS: In case you didn't know, 'Flex Builder 3' is the old version of 'Flash Builder 4'. They renamed it, but it's the same product. 'Flash Pro CS5/CS4/CS3/8/MX2004/MX' is the separate product that works with FLA's.)
我不确定 FB4 是否可以生成/编译 SWF,但可能值得向我们表明您希望通过这样做实现什么目标。可能可以构建一个更加基于框架的系统来基于加载的外部数据/资产进行操作?我并不是真的想使用 CMS 这个术语,而是可以根据需要设置框架的后端内容/配置?
I am not sure about whether FB4 can generate/compile an SWF, but it might be worth giving us an indication of what you want to achieve by doing that. It may be that a more framework based system could be built to operate based on the external data/assets loaded? I dont really want to use the term CMS, but a back-end content/configuration that can set up the framework as required?