2 Replies Latest reply on Feb 27, 2009 1:59 PM by Joe ... Ward

    Loaded .swf's compiled into single AIR app?

    Davey J.
      Good Morning,

      I plan on converting some standalone Flash games I've made in the past into AIR apps. What I'm wondering, as I'm new to this, is if I'm loading external .swf files into the main .swf that's running, are they compiled into the AIR app so it's one executable? In other words, I have main.swf that loads first.swf, second.swf and third.swf. What is the AIR output, a main.app file?

      Thanks!

      -Dave
        • 1. Re: Loaded .swf's compiled into single AIR app?
          tzeng Adobe Employee
          AIR SDK doesn't compile the SWF files. ADT just packages an AIR file with already compiled SWF files and other files.

          You need to look into what Flash generates in your case.
          • 2. Re: Loaded .swf's compiled into single AIR app?
            Joe ... Ward Level 4
            AIR creates a launcher executable when it installs an AIR app, but that's an implementation detail that's not very useful to you, as the developer.

            What happens when your application is launched is that AIR creates a window, constructs the main Sprite (or MovieClip) object and adds it to the stage of the window. Your application gets control in the constructor of that main Sprite.

            Asset files are installed in the directory structure in which you packaged them. So if you developed your app such that foo.swf was loaded from subdirectory "bar", things work the same when installed (unless you change the directory structure using ADT arguments like -C, or forget to include the assets in the package at all, of course).