We have had success in onBeforeUnload, make the final request, and then in onUnload, create a 500ms loop in JS which gives the networking layer enough time to put the request on the wire before the flash is torn down.
This was for a logout call, and it worked pretty well except in Safari (it might work on safari now, I am not sure). Since it was only a logout call and we had a timeout after 30 seconds anyway, it was not a huge issue if it was not 100% successful. But in practice it works pretty well. It's one of those crazy ideas that you just do if you absolutely need to. I think gmail might do the same thing for gchat; if you close a gmail window you will notice a slight delay. I haven't looked at their code though so I don't know for sure. --- In flexcoders@yahoogroups.com, "wkolcz" <wko...@...> wrote: > > Pretty much what I asked in the subject line. I need Flash to submit to a database before the window closes and the flash instance dies. > > Don't think that a pop up (alert) is an option for our sites. > > Using JS and ExternalInterface to communicate with flash (AS) to push to a HTTPRequest data to insert. > > ANY ideas? Any? >