View Full Version : Disconnect

12-10-2002, 10:08 PM

I am using Flach Communication Server MX to create a video chat application in flash. THe problem is, I need to call a php script that updates a database saying that the user logged out of the room. Is there any way in my client-side application that I can make a call to a php script when the user 1) leaves the page or 2) closes the browser. I guess my real question would be is there any way to automatically detect that the flash application has been closed inside my client-side script?



04-09-2003, 12:08 AM
Yooh dude...

I think this thing you wanna do won't use any
flash comm server feature.

If you want to use php to send messages through
a flash, you can do it by loadVariables command.

I don't have any tutorial to point you in that way,
but this command would solve your problem by
openning your php as your client connects to the server.

I think this might work:

nc = new NetConnection();

nc.onStatus = function(info){
if(info.code == "NetConnection.Connect.Success")

use this code inside your flash and it will open a
php whenever it connects to the server.
well... I never used php, but loadvariables
works fine with asp codes.

I hope that helps.