2 Replies Latest reply on Jun 22, 2012 3:29 PM by MatteoLegittimo

    AIR - black screen when packaged

    daviiiiiiiiid

      When I run the application from Flash Develop everything is fine, both in Debug and Release.

       

      After the application is packaged and installed, I just get a black screen when run.

       

      However if I add a 'debug' file to applicationDirecty\META-INF\AIR\debug the application runs normally.

       

      What could be causing this? and how can it be solved?

        • 1. Re: AIR - black screen when packaged
          daviiiiiiiiid Level 1

          A debugging utility seemed to be causing the problem in the release build... removing calls to this solved the issue.

           

          /** Gets the name of the function which is calling */
          public function Log(prefix:String = "", suffix:String = "", params:* = null):void
          {
             
          var error:Error = new Error();3
             
          var stackTrace:String = error.getStackTrace();     // entire stack trace
             
          var startIndex:int = stackTrace.indexOf("at ", stackTrace.indexOf("at ") + 1); //start of second line
             
          var endIndex:int = stackTrace.indexOf("()", startIndex);   // end of function name

             
          var lastLine:String = stackTrace.substring(startIndex + 3, endIndex);
             
          var functionSeperatorIndex:int = lastLine.indexOf('/');
             
          var ClassSeperatorIndex:int = lastLine.indexOf(':');

             
          var objectName:String = lastLine.substring(ClassSeperatorIndex+2, functionSeperatorIndex);
             
          var functionName:String = lastLine.substring(functionSeperatorIndex + 1, lastLine.length);

              trace
          (prefix +" " + "[" + objectName + "]" + " > " + functionName + " " + suffix);
          }

          • 2. Re: AIR - black screen when packaged
            MatteoLegittimo Level 1

            Hi,

            im having this problem in a flex mobile project in the release build for ios!

            Im using Flash Builder 4.6

            How ca i solve it?

            Thanks a lot!