3 Replies Latest reply on Jun 22, 2010 2:06 AM by asydd

    Adding another swf file to the air application

    penugonda Level 1

      I have developed adobe air application. Before the application is launched, I want to play a .swf file with sound

      as introductory and then launch my air application.

       

       

      How to integrate the .swf file with my application?

      If some one can share how to do this in Adobe Air it will be of great help to me.

       

      Thanks in advance

        • 1. Re: Adding another swf file to the air application
          asydd Level 1

          You should be able to call a second swf from your main app, or embed the sound in your main app and just play it from there before the main process.

          To add to the Air.package, under file|air2 settings... add the other swf in the General tab at the bottom in Include Files.

          You'll have the main app.swf and then app.xml, then you can add folders of files and other files such as mp3/swf/jpg etc

          • 2. Re: Adding another swf file to the air application
            penugonda Level 1

            how will I know when the previous swf file played completely.

            • 3. Re: Adding another swf file to the air application
              asydd Level 1

              I am not aware if you can run various swf's from Air in any particular sequence, but it is pretty irrelevant as you can have a shell.swf that loads the sound from an external or attach it if embedded in the library, play it and onSoudComplete step to the next function. I can't see you need to load 2 swf's as it sounds like you just need an intro page, listen to the sound and move into the application, perhaps with an option for the user to skip the intro. If you are using AS3 I can't comment further - in AS2 it's simple and little coding.

               

              var sf1a:Sound = new Sound(this);
              sf1a.attachSound("snf1");

               

              stop();
              stopAllSounds();
              sf1b.onSoundComplete = function(success:Boolean) {
              if (sfp ==0 and sf >= 3) {
                gotoAndPlay("frame23");
              } else {
                sfp=0;
                gotoAndStop("frame3");
              }
              };
              sf1b.start();