4 Replies Latest reply on Oct 13, 2011 9:16 PM by Flex harUI

    Load AIR swf in browser

    mihksoft Level 1

      Hi,

       

      Is it possible to load a AIR swf in browser

      without creating a new flex application that load that AIR swf?

       

      Best Regards,

      Mihai

        • 1. Re: Load AIR swf in browser
          mihksoft Level 1

          I have tried to load with a Flex app and it is not working

          I think the only way is to re-compile the AIR app as a Flex app.

          Any idea?

          • 2. Re: Load AIR swf in browser
            Flex harUI Adobe Employee

            The only thing that really matters is whether important APIs are available in the runtime.  I can write a swf that draws a bunch of circles and it will run in both AIR and the browser.  But then it isn’t that useful for AIR, so I start using AIR APIs and then it won’t run in the browser because those APIs aren’t available in the browser players.

             

            You could design your AIR app as two pieces: an AIR shell that does AIR things, and a sub-SWF that doesn’t make any assumptions about AIR APIs.  That sub-SWF then has a better chance of running in the browser.

            • 3. Re: Load AIR swf in browser
              mihksoft Level 1

              The AIR application is a download manager.

              So what I understood from you is that is impossible to load this AIR into web browser.

              Should I make AS3/MXML classes ant then only add to Flex MXML or AIR MXML whatever app I want to make.

              Let say that I have my package com.downloadManager. I will import it into AIR app if I want a desktop app or into a Flex app if I want a browser app.

              Is this true?

              I don't really understand the part with sub-SWF .

              • 4. Re: Load AIR swf in browser
                Flex harUI Adobe Employee

                Yes, you can import it and compile it in, or you can use SWFLoader to load a sub-application as  long as it doesn’t rely on AIR APIs