Closing NativeWindows in Adobe AIR
This one took me a while to figure out, but here’s how to close all those NativeWindows that you’ve opened in your Adobe AIR app using HTML and JavaScript:
window.htmlControl.stage.window.close();
Wire that up to a click event on an element in your app, and you’ll be able to close the native window. window.close() only works for HTML windows, not AIR’s NativeWindows, but the Flash (Flex?) API sitting behind AIR can be used for cleaning up.