I have a Flash application in which I have a close button. When the user hits the Flash close button, I then need to save some data, including the time of the closing and any other data that’s been saved over the course of a tutorial like errors they’ve made. However, if the student uses the Windows close functionality (Alt-F4 or X on browser window), I want to have an alert display telling the user to cancel the close.
Now, I’ve seen other posts elsewhere that I can use the onBeforeUnload to alert the user, but I get this alert even if they use the Flash close. Can I set a variable within the HTML page’s javascript so that the page won’t display the alert? And if so, how do I do that?
Chris