dcsimg
A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: detecting users online?

  1. #1
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338

    detecting users online?

    I've been looking around for a tut or something describing how to keep a record of how many people are on my site.. Anyone see anything like this? I would prefer something with php if backend is required.

    thanks in advance
    Evolve Designs Interactive Media
    the natural selection

  2. #2
    forever depreciated™ aaron.martone's Avatar
    Join Date
    Dec 2002
    Location
    Florida, USA
    Posts
    448
    Well, I can just tell you (since I use ASP and not PHP) that Users online usually calls the programming language's ability to read the current sessions that are active on that site. Each Session is unique throught the Session ID, and you can retrieve multiple information on each user via script you add on your page and what not....

    I'd give you my global.asa file to show you what I mean, but.....ASP....PHP...they're not good friends....
    (am)™ :: aaron.martone ::
    http://www.aaronmartone.com

    "I see in layers; I think in ActionScript; Life is my animation and animation is my life.... oh, and I like corn dogs."

  3. #3
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    thanks aaron for the feedback. anyone else?
    Evolve Designs Interactive Media
    the natural selection

  4. #4
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food ™
    Posts
    3,789
    create an online text file [online.txt]...
    Code:
    online=true&
    create a movieclip in the first frame on _root with this code in it.
    Code:
    #initclip
    _global.isOnline = new LoadVars();
    _global.isOnline.onLoad = function(online) {
    	if (online) {
    		_global.isOnline = true;
    	} else {
    		_global.isOnline = false;
    	}
    };
    isOnline.load("http://www.yourserver.com/online.txt");
    #endinitclip
    if you want to know if they're online do this wherever you need to know if they're online:
    Code:
    if (isOnline) {
    	//do something...
    } else {
    	//do something else
    };

  5. #5
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    thanks alot for the extensive response. This is somewhat new to me.. how can i incorporate this into a field so viewers can see if anyone else is online?

    if (isOnline) {
    //tell a counter.txt to add 1?
    } else {
    //tell a counter.txt to subtract 1?
    };

    then have a dynamic text field on a loop updating from the counter.txt

    something like that?
    Evolve Designs Interactive Media
    the natural selection

  6. #6
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food ™
    Posts
    3,789
    I know how do do that with ColdFusion or FlashCom. But you're going to have to use a server side script for multiple user interaction. (ASP, ColdFusion, FlashCom, PHP, etc...).

  7. #7
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    yeah that's what i figured.. Just can't find any open source php-based userOnline stuff that uses a flash frontend. Man I should really start looking at some php tuts! hahaha.. thanks again
    Evolve Designs Interactive Media
    the natural selection

  8. #8
    AKA [ Paul Bainbridge] webdreamer's Avatar
    Join Date
    Aug 2001
    Location
    Glasgow, Scotland, UK
    Posts
    3,320
    Evolve here is a tutorial i found
    Hope it helps

    http://www.devarticles.com/c/a/Flash...g-Users-Online
    .: To me AS is like LEGO, Only for the big Kids :.
    - Site - Blog - Twitter - Linkedin
    bringmadeleinehome.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center