Skip to main content
EMelville
Participating Frequently
January 9, 2011
Answered

Call Total Current Connections/Users in Flex

  • January 9, 2011
  • 1 reply
  • 2512 views

Hello,

I realize this can be answered a number of ways and i've tried searching for it.

I'm trying to find out how I can tell how many users are connected to the same FMS application in a flex application:

public function totalConnectedUsers():void{

lblText1.text = "There are a total of " + bindableUserVariable + " Users Connected to the Stream Now";

}

Thanks for the assist.

    This topic has been closed for replies.
    Correct answer Graeme Bull

    That would really help. Thanks.


    Took a little while but here it is:

    http://www.fmsguru.com/showtutorial.cfm?tutorialID=48

    1 reply

    Participating Frequently
    January 10, 2011

    You can basically use getAppStats Admin Command to achieve this: see docs here:

    http://help.adobe.com/en_US/flashmediaserver/adminapi/WSa4cb07693d12388431df580a12a34991ebc-8000.html#WS5b3ccc516d4fbf351e63e3d11a0d3edb98-7ffe - i think you will need to use normal_connects to get total number of connections to your application.

    Graeme Bull
    Community Expert
    Community Expert
    January 13, 2011

    You can get this value from the server side if you write a bit of code in a main.asc file. Just grab the length of the clients object on the application object.

    application.clients.length

    Grab that and pass it to the client side. I've got a tutorial in the works for this specific use case actually, when I get it up I'll post back.

    EMelville
    EMelvilleAuthor
    Participating Frequently
    January 14, 2011

    That would really help. Thanks.