AS3 AIR - 打包时黑屏

发布于 2024-12-09 08:54:56 字数 195 浏览 0 评论 0原文

当我从 Flash Develop 运行应用程序时,无论是在调试还是发布中,一切都很好。

应用程序打包并安装后,我在运行时只是黑屏。

但是,如果我将“调试”文件添加到 applicationDirecty\META-INF\AIR\debug 中,应用程序将正常运行。

可能是什么原因造成的?如何解决?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

花期渐远 2024-12-16 08:54:56

调试实用程序似乎导致了发布版本中的问题...删除对此的调用解决了问题。

/** Gets the name of the function which is calling */
public function Log(prefix:String = "", suffix:String = "", params:* = null):void 
{
    var error:Error = new Error();
    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);
}

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();
    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);
}
沩ん囻菔务 2024-12-16 08:54:56

打开 Run.bat 并替换

set OPTIONS=-connect %DEBUG_IP%

set DEBUG_IP=%DEBUG_IP%

Open Run.bat and replace

set OPTIONS=-connect %DEBUG_IP%

with

set DEBUG_IP=%DEBUG_IP%
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文