close air app, where is it?

こ雲淡風輕ζ 提交于 2019-12-12 23:00:37

问题


Seems System.exit(0) and flash.system.System.exit(0) both throw the error "[Fault] exception, information=SecurityError: Error #2018: System.exit is only available in the standalone Flash Player."

I'm creating a fullscreen app and im simply want to add a close button that will close all windows and exit (i have a secondary window via NativeWindow open). Tons and tons of googling any nothing. Makes me wonder if im missing something super simple since all "chromless" apps would have to have this.

Poking around I found stage.NativeWindow but closing that does not exit the whole app.

*note I am building and testing in flashdevlop 4.0 with pure as3, no flex.


回答1:


NativeApplication.nativeApplication.exit();

When in doubt, check the docs! :)

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/desktop/NativeApplication.html#exit()



来源:https://stackoverflow.com/questions/6768594/close-air-app-where-is-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!