I think there's a cheap-hack way of doing this. Use ExternalInterface to call "eval" to write a Javascript event listener to the document, and have it pass the event back through to the swf. Just remember that IE has two events for close, though I don't exactly recall what they are- one fires before the document is actually closed, and the other fires after.
Michael Krotscheck Senior Developer RESOURCE INTERACTIVE <http://www.resource.com/> www.resource.com <http://www.resource.com> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ________________________________________________________________________ ____ This email and any of its attachments may contain Resource Interactive proprietary information, which is privileged, confidential and may be subject to copyright or other intellectual property rights belonging to Resource Interactive. This email is intended solely for the use of the individual or entity to which it is addressed. If you are not the intended recipient of this email, you are hereby notified that any dissemination, distribution, copying or action taken in relation to the contents of and attachments to this email is strictly prohibited and may be unlawful. If you have received this email in error, please notify the sender immediately and permanently delete the original and any copy of this email and any printout. ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, October 23, 2007 1:00 PM To: [email protected] Subject: [flexcoders] Detecting browser window close event? Hi to everyone, Is it possible to detect in Flex application browser window close event so that an action can be started when user closes Flex application, does anyone know how to do that if it's possible in the first place? The reason why i am asking this is because i have a multiuser Flex application where every user has it's own directory on a server side. Application has logout button which triggers cleanup of user's directory but what if the user just closes the window? I would like to be able to lunch that same cleanup upon browser close window. thanks in advance -- Best regards, Mirko mailto:msabljic[at]gmail.com

