How to exit an air application from an actionscript library?

Posted by Vincen Collins on Stack Overflow See other posts from Stack Overflow or by Vincen Collins
Published on 2010-05-14T21:07:59Z Indexed on 2010/05/14 21:14 UTC
Read the original article Hit count: 209

Filed under:
|
|

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

© Stack Overflow or respective owner

Related posts about flex

Related posts about air