Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 12-10-2002, 10:08 PM   #1
BlueWave
Registered User
 
Join Date: Dec 2002
Posts: 6
Unhappy Disconnect

Hello,

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?

Thanks,

BlueWave
BlueWave is offline   Reply With Quote
Old 04-09-2003, 12:08 AM   #2
zerooito
Registered User
 
zerooito's Avatar
 
Join Date: Nov 2002
Location: BRASIL
Posts: 126
Send a message via ICQ to zerooito
Default

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:
ActionScript Code:
nc = new NetConnection(); nc.connect("rtmp:/myApp"); nc.onStatus = function(info){       if(info.code == "NetConnection.Connect.Success")              loadVariablesNum("myScript.php",0); }
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.

Zerooito
zerooito is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:11 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.