Go Back   kirupaForum > Flash > Flash CS4

Reply
 
Thread Tools Display Modes
Old 11-27-2009, 10:21 PM   #1
DBA
Registered User
How can I detect that the Flash Player is exiting?

I have written a basic chat client that talks to an XML Socket server. When it starts it connects to the socket and works fine. However, when I close the Flash Player it is still occupying a connection to the server.

I am trying to determine how I can trap the close of the Flash Player and programmatically close the connection to the server before the program exits.

Thanks in advance.
DBA is offline   Reply With Quote

Sponsored Links (Guests Only) - Register | Need Help?
 

Old 11-29-2009, 01:51 PM   #2
Torq
Registered User
Quote:
Originally Posted by DBA View Post
I have written a basic chat client that talks to an XML Socket server. When it starts it connects to the socket and works fine. However, when I close the Flash Player it is still occupying a connection to the server.

I am trying to determine how I can trap the close of the Flash Player and programmatically close the connection to the server before the program exits.

Thanks in advance.
You should be handling this server-side, since you can't rely on the client posting a quit message. Lots of things could happen besides closing, leaving, like termination, rebooting, losing power, etc.

On the server just figure out how to detect if the client is disconnected or not, then remove them from any sort of list. This can be done in almost all coding languages.

__________________
MMO Game Masters - If they make it, we will come...
Torq is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:12 PM.

SUPPORTERS:

kirupa.com's fast and reliable hosting provided by Media Temple. flash components
Creative web apps. Make your own free flash banners and photo slideshows.
Check out the great, high-quality flash extensions. Buy or sell stock flash, video, audio and fonts for as little as 50 cents at FlashDen.

Flash Transition Effects

Flash Effect Tutorials

Digicrafts Components
Flash effects. Art without coding. Upload, publish, deliver. Secure hosting for your professional or academic video, presentations & more. Screencast.com
Streamsolutions Content Delivery Networks Flipping Book - page flip flash component.
Flash-Gallery.com - Get your flash photo gallery (flash component or swf gallery Learn how to advertise on kirupa.com
 

cdn
content delivery network (cdn)

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Copyright 2010 - kirupa.com Copyright 2010 - kirupa.com