单个 AS3 项目的多个目标设备
我正在将现有项目从 Flash Pro 移植到 Flash Builder。
该代码在 Web/Android/Projector/AIR 之间几乎完全可移植,我只需在发布之前更改每个目标设备的一些常量...
但是,在 Flash Builder 中,它会在创建项目时询问我是否可以移动或网络。
在 Flash Builder 中从单个项目定位多个设备的最佳实践方法是什么?
或者,在 Flash Builder 中,它们必须都是自己的项目吗?如果它们必须每个都是自己的项目 - 是否有一种运行良好的多项目组织方法,请记住,在这种情况下,每个项目实际上只是几乎相同的代码库的不同构建(一方面 - 我想到有一个包含大多数类的“公共”项目,然后每个构建项目从那里实例化一个主类......)?
谢谢!
I am porting an existing project from Flash Pro to Flash Builder.
The code is almost completely portable between Web/Android/Projector/AIR, and I simply change a few constants for each target device before hitting publish...
However- in Flash Builder, it asks me when creating a project whether it will be mobile or web.
What's the best-practices way to target multiple devices from a single project in Flash Builder?
OR, in Flash Builder, must they each be their own project? If they must each be their own project- is there a multi-project organization method which works well, keeping in mind that in this context each project is really just a different build of the almost-identical codebase (On one foot- I thought of having a "common" project which would hold most classes, and then each build-project instantiates a Main class from there...)?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用一个代码库创建一个移动项目并选择多个设备(android、ios、blackberry playbook)。如果您还需要 Web 版本,则应该能够在 Web 版本的构建路径中指定该代码库。您可以通过转到属性 --> 来做到这一点Actionscript 构建路径。单击“源路径”,然后浏览到包含这些文件的文件夹。所以,是的,如果需要,您可以为每个项目创建不同的 Main.as。尽管在 Actionscript 中,入口点类通常与项目本身具有相同的名称。
然后,您将能够修改一组文件,但修改将同时应用于原始项目和以这种方式引用这些文件的任何项目。
You can create a mobile project with one codebase and select multiple devices (android, ios, blackberry playbook). If you also want a web version, you should be able to specify that codebase in the build path for your web version. You do that by going to Properties --> Actionscript Build Path. Click Source Path and then browse to the folder that contains those files. So yes, you can create a different Main.as, if you need to, for each project. Although in Actionscript the entrypoint class generally has the same name as the Project itself.
You'll then be able to modify one set of files, but the modifications will apply both to the original project and to any project which references those files in this way.