Hello people,

i made a flash chat with PHP, it's working perfectly. Now i'm wondering how to detect if user has left the chat to decrease the online users count. I've read that as3 doesn't have the ability of detecting if the user has closed the page, so it point out to use javascript, because javascript has a way of detecting browser window close. But then i came up with this idea that if the users just loses internet connectivity, how will it detects that an users has left? I was thinking about making a timer like 1 or 5 minutes, if the user has not typed anything, then mark it has idle or inactive, so rest its count. But i want to know if there's a best aproach for this. I make the thread here in the AS3 forum to see if it can be done. Otherwise i can move it (or a moderator can move it) to the respective forum (html, javascript, etc)

Thanks