0 Replies Latest reply on Dec 2, 2011 1:06 PM by Bekenn

    app.xml produced in the wrong location

    Bekenn

      I am trying to add air support for mobile devices to an existing large code base, and I'm having some trouble setting up the initial ActionScript mobile project in Flash Builder.  The structure of the existing files requires that my main ActionScript class be located in a particular package rather than in the default global namespace.  FlashBuilder creates an accompanying app.xml file, but places it in the same location as the .as file, which is a subdirectory under the main source directory.  This causes the generated output app.xml file to also be placed in a subdirectory of the output location, while the generated swf is placed directly in the output location.  When trying to debug the application using the device simulator, the swf can't be located because it's not in the same place as the app.xml file.  When I move (or copy) the swf to the same location as the app.xml, everything works fine, but I'd much rather have this automated.

       

      For clarity, here's a diagram of the directory structure:

      <src>
      |-<mypackage>
        |-myapp.as
        |-myapp-app.xml
      
      <bin-debug>
      |-myapp.swf
      |-<mypackage>
        |-myapp-app.xml

       

      The generated app.xml file references the .swf file as if it were in the same directory, but clearly it isn't.  Incidentally, FlashBuilder initially failed to create the output app.xml file because the package directory in bin-debug didn't exist; I had to create that manually.

       

      Here's a sample application that demonstrates the issue:

      package mypackage
      {
           import flash.display.Sprite;
           import flash.text.TextField;
           
           public class myapp extends Sprite
           {
                public function myapp()
                {
                     super();
                     var tf:TextField = new TextField();
                     tf.x = 10;
                     tf.y = 10;
                     tf.text = "Hello!";
                     addChild(tf);
                }
           }
      }

       

      I've spent quite a bit of time trying to find a project setting that will address this issue, but I've come up empty.  Any ideas?