For the sake of users everywhere, I hope there is not...
is there a way to ask for a password when you close the application?
You have these events at your disposale: http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7e07. html
..but I'm not sure they would give you the desired effect.
What is the nature of this application exactly? I have a suspicion that AIR may not be the best platform for what you're looking to do. It doesn't have a lot of controll over how the OS manages the app. It does have some control, but as a multiplatform runtime, you will never have full OS control until they implement the whole extension business (which I believe is out in beta if I'm not mistaken).
private function stopClose(event:Event):void
this isn't working
No one would install AIR if it allowed such nonsense. If you are building a ligit application (like a kiosk terminal or something), and not some annoying crapware, than I suggest looking elsewhere for a solution. No one wants an app that takes controll of thier desktop, so I highly doubt Adobe spent time and effort in implementing such a feature.
Yes, on the surface it sounds like a really bad idea but maybe you could explain your reasoning and what you're trying to accomplish.
An AIR WindowedApplication dispatches a Close Event. You can listen for this event and use something like event.preventDefault or event.stopImmediatePropagation. Like everyone else said, I think this is a TERRIBLE idea for anything other than a kiosk.