title: AIR 4.0 flash.desktop::NativeApplication is not defined
body: <p>I have done this many time before but can't seem to fix this. I simply want to exit an AIR Desktop application running on Windows 8 with touch. So I have the following code:</p>
  
  <pre><code>import flash.desktop.NativeApplication;
  import flash.events.TouchEvent;
  
  btn_exit.addEventListener(TouchEvent.TOUCH_TAP, exit);
  
  function exit(e:TouchEvent) {
          NativeApplication.nativeApplication.exit();
          }
  </code></pre>
  
  <p>Even though it compiles, when I touch the exit button I get variable not found error:</p>
  
  <pre><code>Error #1065: Variable flash.desktop::NativeApplication is not defined
  </code></pre>
  
  <p>Any ideas how to fix this please?</p>