[Red5] appDisconnect does not get triggered

Walter Tak walter at waltertak.com
Thu Jul 24 05:19:46 PDT 2008


IE doesn't close the connection to Red5. If you'd close ALL IE windows you'll notice the appDisconnect event getting triggered right away.

Temporary solution until MS fixes their browser:

Listen in the browser on the [onbeforeunload] event:

.......
<script>
    function closeConnection() {
        my_movie.shutdown_please();
    }
</script>

<body onbeforeunload="closeConnection">
.......

Where [my_movie] is the name of your flashmovie (object) and [shutdown_please] is the function you exposed in Flash to Javascript.

Check Flash help about 'ExternalInterface' and other examples in the archives in this list for more info.

Walter


  ----- Original Message ----- 
  From: mark morreny 
  To: red5 at osflash.org 
  Sent: Thursday, 24 July 2008 07:04
  Subject: [Red5] appDisconnect does not get triggered


  Hi,

  I am using IE7 to connect to Red5.  When the browser is closed, the appDisconnect() is not triggered.  
  Does anyone know why?  


  Thanks,
  Mark


------------------------------------------------------------------------------


  _______________________________________________
  Red5 mailing list
  Red5 at osflash.org
  http://osflash.org/mailman/listinfo/red5_osflash.org



------------------------------------------------------------------------------


  No virus found in this incoming message.
  Checked by AVG. 
  Version: 7.5.524 / Virus Database: 270.5.5/1570 - Release Date: 24-07-08 06:59
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5_osflash.org/attachments/20080724/7f586749/attachment.html 


More information about the Red5 mailing list