2 Replies Latest reply on Jun 2, 2008 12:17 AM by mmm_fritzdimmel

    Reuse a Flex App as AIR application


      I've developed a Flex application and now I want to use it again with the same codebase as an AIR application.
      But there are several factors that don't work as expected.

      The Flex App uses some advanced features that make reuse a little bit complicated:
      I use the latest Cairngorm.swc in the app.
      I use ResourceBundles in the app.
      I often use "Application.application" in the app.

      These are the three things, which make porting to AIR a little bit complicated.

      Are there any "Best practices" for sharing the same codebase for Flex and AIR?

      I've tried to make the Flex app a module and reuse that, but then I get troubles with ResourceBundles, also the addressing doesn't work correctly anymore (I've refactored the Application.application.<element> calls to say: Application.application.app.<element> where "app" is the ID of the ModuleLoader). But I get the error that <ApplicationType> cannot be converted to ModuleLoader.

      Then I've tried to make a SWC out of the App, didn't work either.

      Has someone already done things like that?

      What's the best way to accomplish that?

      Thanks a lot for replies!