PDA

View Full Version : Create alert before browser window is closed



Shaedo
January 29th, 2010, 09:11 PM
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

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.

ponthedashboard
January 30th, 2010, 08:18 AM
http://www.4guysfromrolla.com/demos/OnBeforeUnloadDemo1.htm
this sample should help you, with using externallInterface method you can call the functions in actionscript from Javascript

Shaedo
January 30th, 2010, 07:33 PM
Thank you ponthedashboard most appreciated!