flexcover

How to exit an air application from an actionscript library?

孤街浪徒 提交于 2019-12-11 05:48:44
问题 I am trying the following but every once in awhile the nativeApp is not defined. var nativeApp:Object = getDefinitionByName("flash.desktop.NativeApplication"); nativeApp.nativeApplication.exit(); I am confused why sometimes getDefinitionByName("flash.desktop.NativeApplication") resolves and other times it does not. I am trying to resolve this problem to address the following issue in flexcover - code.google.com/p/flexcover/issues/detail?id=33 Update - here is the class I am attempting to fix: