3 Replies Latest reply on Jun 29, 2011 7:33 AM by sh4nx0r

    How to fire an event when browser is closed unexpectedly ?


      Hi adobians , i am sorry to bother you with a little tricky question , hope some people with good hearts will help me out.


      I am worrking on RTMFP and i dont have prob with the streams and net connections. Thanks to Adobe <3

      My video conferencing example works fine except for this.



      When i connect to Adobe Cirrus and get a nearID ,i immediately write that to my mySQL backend via PHP script. But when i close the browser i want the nearID to be removed from the backend. and i am almost banging my head on my wall for 3 days and i coudnt do it so i came here for help.


      I also have written a PHP script that deletes the nearID from the backend but i dont know where to call that function.

      I tried like this but it didnt work.


      case "NetStream.Connect.Closed":
      case "NetConnection.Connect.AppShutdown":
      case "NetConnection.Connect.Closed":



      None of them seem to be executing and my nearID is still resident in the DB.



      I have googled and came up with window.onbeforeunload and addCallBack() , but i cant find much examples on them and i really dont know if they work 100% .



      Hope someone can help me on this.