Regarding the saving: you can either save the data the user has entered in a Database ( with the help of a server-side language like PHP or ASP.NET ), you could save it to the user's machine with SharedObject or with Flash Player 10 you should be able to write a file to the users PC ( just that I don't think you are allowed to write without he accepting... meaning that he'll have to press OK or something on a pop-up window ).
If you could provide more details then I could give a more exact answer.
With best regards,
It's an AIR application. And its 'sensitive' data, and there is no server side for the application either. So basically i want it to save it in EncryptedLocalStore or something. Would you be able to give some example code showing that as well as the detection of the close please??
you can listen for close event in several ways in air
or add closing event in your Windowed Application tag
layout="absolute" width="860" closing="onExititnEventHandler"
you can find information on storing data in ELS in the link below.