# Create alert before browser window is closed

**URL:** <https://forum.kirupa.com/t/create-alert-before-browser-window-is-closed/303982>\
**Category:** flash\
**Created:** [January 30, 2010, 2:11am UTC](https://forum.kirupa.com/t/create-alert-before-browser-window-is-closed/303982 "2010-01-30T02:11:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaedo](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@Shaedo](https://forum.kirupa.com/u/Shaedo)\
**Post date:** [January 30, 2010, 2:11am UTC](https://forum.kirupa.com/t/create-alert-before-browser-window-is-closed/303982/1 "2010-01-30T02:11:18Z")

</div>

I have flash as a gui to edit some docs. I’d like to caution the user to save before they close the window (or navigate away from it).

I know this can be done in AIR,  
[http://www.actionscript.org/resources/articles/868/1/Show-an-Alert-before-the-closure-of-an-AIR-application/Page1.html](http://www.actionscript.org/resources/articles/868/1/Show-an-Alert-before-the-closure-of-an-AIR-application/Page1.html)

but can it be done with a .swf ?

I think this was asked awhile back in this forum but I cant seem to locate it.  
All advice welcome!!

Thank you for your consideration,

S.
