Hello,
I recently made a chat room using Flash/AS3 as the interface and client, XML as the database and PHP to edit the XML file. While searching for similar chat clients over the internet I noticed that most of them had a list of the users currently online. They even notified you when a user logged off or exited their browser / chat client in anyway.
To make a list of the users currently online I would think to add their names to an XML file. Easy enough. So when users enter the chat room they get added to the list of users online.
What if a user goes offline? I would want to pass arguments to my PHP file to remove them from the XML file.
In AS3, how do I handle the event of a user going offline? (ie. exiting their browser, exiting flash, losing their internet connection, etc…)
I know I am able to add an event listener to a Javascript window.unload() but what if the user just loses their internet connection? My program won’t be able to send arguments to my PHP file.
**What is an alternative way to monitor which users are currently online? **
Thanks in advance,
Noah