2 Replies Latest reply on Mar 30, 2011 2:05 PM by brandonl2010

    Project will not convert to AIR


      We have been using Flash 9 for a significant project (just over 100k lines of code) and now need to migrate the project to AIR as flash 10 disables keyboard entry when in full screen.  The "Convert to AIR" options is greyed out in the project and if as a test we create a new test project in our copies of FB4 those new projects have the option enabled to convert to AIR.


      We're guessing there could be library support issues in AIR that may not be compatable as they are in Flash 9/10 but we need a way to help determine what may not be compatable.  Is there a logger, debugger, tracer, or anything we can use to tell us why FB4 is determining the project as not valid for converting to AIR?


      Time is critical, thank you.

        • 1. Re: Project will not convert to AIR
          brandonl2010 Level 1

          The project just FYI is an actionscript project, not flex.


          So we need information on how to convert an actionscript to Air directly or actionscript project to flex and then it /should/ work, correct?

          • 2. Re: Project will not convert to AIR
            brandonl2010 Level 1

            FYI, We ended up converting the AS3 only project to a Flex project which then can be changed to Air with the "Convert to Air" option in Flash Builder 4.


            There were some comments around the forums that you could convert direction from AS3 to Air and it was documented in "Adobe Air Docs" but after 3 man hour days of searching for this supposed document that was referenced by comment but never found a document, link or otherwise and we gave up on this phantom document.


            We found the main 'hack' of converting an AS3 to an Air project was first to convert the project to a flex project by deleting the project (but select to leave files untouched) and then create a new Flex application but use the same name and same file location which then created a Main.mxml (or PROJECTNAME.mxml) in the previous projects directory.  Close down FlashBuilder4 and restart it.  Edit the *.mxml and added a 'applicationComplete="init();" paramater in the <s:Application> tag and then created a <fx:Script> tag with flex code of:


            private var object:OriginalAs3Object;

            private function init():void {

            object = new OriginalAs3Object(stage);




            We also had to change embedded fonts and other items setup in the former main project file to instead be setup in the new .mxml.  Also we had to change the main class to accept a Stage variable.


            Hope this helps anyone else who can't find the phantom document.