简体   繁体   中英

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

I'm developing a Flex web application for desktop browsers. I have no experience with 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)? Or, will I need to re-write the Flex/AS3 code in order to make it work for 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?

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. Otherwise it can be tricky.

The code will not 100% work.

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 ). 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.

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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