简体   繁体   English

Flex(桌面浏览器)项目将无缝导出到AIR(桌面),还是需要进行调整?

[英]Will Flex (desktop browser) project export to AIR (desktop) seamlessly, or require tweaking?

I'm developing a Flex web application for desktop browsers. 我正在为桌面浏览器开发Flex Web应用程序。 I have no experience with AIR. 我没有AIR的经验。

Is it a simple turnkey process to get the Flex application exported to AIR for desktop environment (eg I'm not talking about mobile or tablet application here, only desktop)? 将Flex应用程序导出到AIR以用于桌面环境是否是一个简单的交钥匙过程(例如,在这里我不是在谈论移动或平板电脑应用程序,而只是在桌面上)? Or, will I need to re-write the Flex/AS3 code in order to make it work for AIR? 或者,是否需要重新编写Flex / AS3代码才能使其适用于AIR?

That is, will I need to develop a branch in the code for an AIR application and commit to troubleshooting in the AIR environment, or will 100% of the code work the same in both (desktop browser and AIR desktop) applications? 也就是说,我是否需要在AIR应用程序的代码中开发一个分支并致力于在AIR环境中进行故障排除,还是100%的代码在(桌面浏览器和AIR桌面)应用程序中都可以工作?

If you are not planning any Air specific features (eg file system operations) in Air version of your web application and at the same time you are not using any web specific features (eg JavaScript to Flash communication), then publishing your web application as an Air application should be smooth. 如果您不打算在Web应用程序的Air版本中计划任何特定于Air的功能(例如,文件系统操作),并且同时不使用任何特定于Web的功能(例如,JavaScript与Flash的通信),则将Web应用程序发布为空气喷涂应平稳。 Otherwise it can be tricky. 否则可能会很棘手。

The code will not 100% work. 该代码将无法100%工作。

Off the top of my head the base class of a web-based Flex application is Application while an AIR-based Flex app will be WindowedApplication (EDIT: reading the docs this may not be strictly required as WindowedApplication inherits from Application ). 在我的头顶上,基于Web的Flex应用程序的基类是Application而基于AIR的Flex应用程序将是WindowedApplication (编辑:阅读文档,由于WindowedApplication继承自Application因此可能并不需要严格要求)。 You'll also need to handle things like the application menu (and the fact that this menu is different on Mac and Windows) and situations like the user clicking the "x" close button on the app window. 您还需要处理诸如应用程序菜单(以及Mac和Windows上此菜单不同的事实)之类的事情,以及诸如用户单击应用程序窗口上的“ x”关闭按钮之类的情况。

I would expect the core code for your application to work without any major changes though. 我希望您的应用程序的核心代码能够正常运行,而无需进行任何重大更改。 If I were doing this I'd branch so that I have "web" and "desktop" versions and look to abstract away the differences (having an isDesktop() helper method for instance). 如果执行此操作,则将分支,以便具有“ web”和“ desktop”版本,并寻求抽象化差异(例如,具有isDesktop()帮助器方法)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM