How to exit an air application from an actionscript library?
- by Vincen Collins
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 - http://code.google.com/p/flexcover/issues/detail?id=33