Welcome, Guest
  • Author Topic: hi jorge  (Read 3958 times)

    abrar

    • Seasoned Programmer
    • ***
    • Posts: 124
      • View Profile
      • Email
    hi jorge
    « on: 06/30/05, 01:19 »
    Thanks for the reply,

    Re: hi need help for flash remoting in main.asc(urgent)
    « Reply #1 on: 06/29/05, 14:58 » 

    --------------------------------------------------------------------------------
    The setInterval have not scope, so you can access elements in a static way, like this:

    application.userlist.length

    but not like this:

    userlist_name.length  //in your for loop

    If your function executes, then the problem should be arond there. Also 2 seconds is too short, and probably you finish with your server down.

    Jorge
    [/color]


    /////////////////////


    My main objective is to send/receive the the info ( userlist_name array) to aspx service on every 1 seconds. So how i could achieve this.

    Also we have noticed that this get the data(responce)  from the aspx sevice first at same time and second data(responce ) after 5 mins .

    Please can u tell why this happening. Is there any settings at FCS server.xml  .


    Regards,
    Abrar.


    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: hi jorge
    « Reply #1 on: 06/30/05, 03:31 »
    I don't use aspx, but I guess that one second is not enough time to proccess the data, and at some point it request will be discarded (based on the library, new request discard old ones, because classes are not persistant) Test first with longer intervals (10 seconds) to see what happens. And check that you're passing correct data (you can use a log in aspx)

    Jorge

    abrar

    • Seasoned Programmer
    • ***
    • Posts: 124
      • View Profile
      • Email
    Re: hi jorge
    « Reply #2 on: 06/30/05, 12:48 »
    yes jorge we have tried with the long intervals like 10 seconds but the same issue we are facing. Also we are mainting the log for the aspx . The data itself reaching there after exact five minutes.

    Please help me to come out from this issue or tell me the alternative way to pass the current connected users from  FCS to database.

    Regards,
    Abrar.

    ..:: Mazhar Hasan ::..

    • Mods
    • Systems Administrator
    • *****
    • Posts: 828
    • Cheers
      • View Profile
      • SyedMazharHasan.com
    Re: hi jorge
    « Reply #3 on: 06/30/05, 19:39 »
    i have a simple idea( although, i have never tried that one but anyway, here it is)

          Create an admin movie & connect that to your desire flash com app, in your swf, create a clientside function such as


    nc
    .msgFromSrvr = function(totalCon:Number) {
    	

        var 
    updVar:LoadVars = new LoadVars();
        
    updVar.numCon totalCon;
        
    updVar.send("url_to_database_updater_script.aspx","method"); //or sendAndLoad instead of send 
    };


    & call this function from your app after each desired interval as:

    [php]
    this.adminUser.call("msgFromSrvr", null, totalCon);

    Hope you may have got the idea.
    Your wish is my command

    abrar

    • Seasoned Programmer
    • ***
    • Posts: 124
      • View Profile
      • Email
    Re: hi jorge
    « Reply #4 on: 07/01/05, 08:32 »
    can u pls tell me in detail.

    im using AVpresence component in my application and


    for amin.fla im using server side script in admin script as below,

    //admin.fla

    nc = new NetConnection();
    nc.connect('rtmp://localhost:1111/abrar', 'abrar', 'abrar');
    function doGetLiveStreamStats()
    {
       function onGetLiveStreamStats()
       {
          this.onResult = function(info)
          {
             if (info.code != 'NetConnection.Call.Success')
             {
                outputBox.text = 'Call failed: ' + info.description;
             } else
             {
                outputBox.text = 'Info for ' + demo.text + ' returned:' + newline;
                printObj(info,outputBox);
          //      PPMService(myname);
                
             }
          };
       }
       nc.call('getLiveStreamStats', new onGetLiveStreamStats(), demo.text, demo1.text);
    }

    function printObj(obj, destination, tabLevel)
    {
       
       tabLevel =0;
       trace("destination = "+destination+"tab level = "+tabLevel+"obj ="+obj);
       if (arguments.length < 2)
       {
          trace('ERROR! you need to supply a text object to output to');
          return;
       }
       if (arguments.length < 3)
       {
          tabLevel = 0;
       }
       for (var prop in obj)
       {
          for (var i = 0; i < tabLevel; i++)
          {
             // insert requested # of tab characters
             destination.text += '\t';
          }
          destination.text += prop + ' = ' + obj[prop] + newline;
          if (typeof (obj[prop]) == 'object')
          {
             // recursively call printObj
             printObj(obj[prop], destination, tabLevel + 1);
          }
       }
    }


    so in the above code im getting the output as

    //       parameters(                     application name : demo                   stream name = FCAVPresence.sam.av )

    //output

    Info for demo returned:
    data = [object Object]
    subscribers =
    publisher = [object Object]
    subscribers =
    publisher = [object Object]
    publish_time = Fri Jul 1 18:53:07 GMT+0530 2005
    client = 56009760
    timestamp = Fri Jul 1 18:53:39 GMT+0530 2005
    code = NetConnection.Call.Success
    level = status


    how i will get the list of subsribers and publishers.

    Thanks,
    Regards,
    Abrar.


    ..:: Mazhar Hasan ::..

    • Mods
    • Systems Administrator
    • *****
    • Posts: 828
    • Cheers
      • View Profile
      • SyedMazharHasan.com
    Re: hi jorge
    « Reply #5 on: 07/01/05, 10:12 »
    Unfotunately, i dont use flashcom components in my applictaions, so i dont have any good idea how to do this, but after today's work, i will try to write the code that you may apply to your application to do what you want.
    Your wish is my command

    abrar

    • Seasoned Programmer
    • ***
    • Posts: 124
      • View Profile
      • Email
    Re: hi jorge
    « Reply #6 on: 07/04/05, 02:15 »

    have u get the solution mazhar bhai..... I just want the list of viewers(subscribers) and publisher(broadcaster) fron FCS.

    Thanx,
    Regards,
    Abrar.


    abrar

    • Seasoned Programmer
    • ***
    • Posts: 124
      • View Profile
      • Email
    Re: hi jorge
    « Reply #7 on: 07/04/05, 02:58 »
    have u get the solution mazhar bhai..... I just want the list of viewers(subscribers) and publisher(broadcaster) fron FCS.

    Thanx,
    Regards,
    Abrar.


    ..:: Mazhar Hasan ::..

    • Mods
    • Systems Administrator
    • *****
    • Posts: 828
    • Cheers
      • View Profile
      • SyedMazharHasan.com
    Re: hi jorge
    « Reply #8 on: 07/07/05, 10:55 »
    Hi Abrar! sorry i am dead busy in some of my projects & articles, however, the numbers of clients connected to your particular application can be counted using this SSAS statement:

    add this code to your main.asc file some where, it will trace out the no. of connected clients in the live log of your application.

    var numClients application.clients.length;
    trace(numClients);


     All you need to do is to retrieve this value of numClients from your admin movie.

    Sorry i couldnt send you the whole code because of my tough schedule.

    Keep Flashing my Dear
    Your wish is my command

    abrar

    • Seasoned Programmer
    • ***
    • Posts: 124
      • View Profile
      • Email
    Re: hi jorge
    « Reply #9 on: 07/07/05, 23:47 »
    Thanx mazhar bhai,
            Actually i want the names of the client connected to the paritcular application from FCS.I m using the following pdf for refrence from macromedia docs,

    http://download.macromedia.com/pub/flashcom/documentation/FlashCom_SS_ASD.pdf

    this Help will always appreciated.

    Jazak,

    Regards,
    Abrar.

    smart.net

    • Server what's that
    • *
    • Posts: 40
      • View Profile
    Re: hi jorge
    « Reply #10 on: 12/09/06, 02:58 »
    I have also faced some problems while using aspx pages to update / read values , repeatdly using set interval.
    the aspx returns old data to flash file, in load vars

    after some hours of search.. i found the problem and workaround.
    The aspx pages returns old values to flash files, if internet explorer is set to check the newer version of pages to "Automatically" or anything except "Everytime".

    the work around is to add this line in your aspx page on Page_load event:

    Response.Cache.SetCacheability(HttpCacheability.NoCache)

    So this page, will no longer be available in cache, so the flash file will get real and updated values everytime.

    I hope this will save some hours of my unknown friends all over the world.