Results 1 to 7 of 7

Thread: Need help with remote shared object please

  1. #1

    Default Need help with remote shared object please

    Forgive my ignorance. I'm very new at this.
    I am attempting to update a remote shared object when a client closes his/her browser. The shared object does work well from flash(as long as the client is connected).
    I'm sure this can be done by modifying the server side application onDisconnect() but I am at a total loss. The slots created are using the client id upon connect.
    The disconnect currently looks like this:

    public void onDisconnect(IClient client) {
    Logger.logger.info(4, "Disconnect client: " + client.getClientId());
    if (!isDefaultInstance(client)) {
    return;
    }

    I'm sure that I have to import com.wowza.wms.sharedobject.* but am otherwise completely ignorant. I am however, anxious to learn!
    The documentation will become more clear to me once I devope some understanding.

    Thank you very much for any help!
    Pat

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Pat,

    Take a look at this example:

    http://www.wowza.com/forums/content....a-SharedObject

    Richard

  3. #3

    Default

    Thank you very much Richard.
    What I need to accomplish if far simpler that the example, although it provides much insight.
    When a user logs in, their RSO property is set to yellow "y"
    When a user connects, their RSO property is set to green "g"
    When they logoff (using a log off button, the RSO property is set to red "r"
    This is reflected in the fillColors of other users buttons (allowing other users to see their "status")
    All of this is done on the client side with no server side coding needed. And, it works very well...
    Since the application (flashphoner) already has an onDisconnect, I want to simply set the property of that users slot to "r" when they close the browser.
    We can't count on users "logging off" before they close the window.
    It may be helpful to tell you that thr RSO itself is named using a substring of the user name (passed by flashphoner as the clientID) ant the slot is their entire user name..

    Again, thank you for taking the time with me Richard!
    I greatly appreciate the help!

  4. #4
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    So this is about user's closing their browser and SharedObject not getting updated. You could create javascript window.onunload function in the html container, then call function in Flash using ExternalInterface to update the SharedObject, and perhaps let you know when it is okay to finish closing.

    Richard

  5. #5

    Default

    Brilliant!
    Are there any examples of this readily available Richard?
    Remember, I'm a complete novice....

  6. #6
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    I don't, but the ExternalInterface API is well documented. It's a bridge between Flash AS3 and javascript in player's HTML container.

    Richard

  7. #7

    Default

    Got it working Richard!
    Thank you for all your help....

Similar Threads

  1. Question about having many variables in a Remote Shared Object
    By olarsson in forum Server-side Modules and Code Samples Discussion
    Replies: 1
    Last Post: 12-16-2013, 10:19 AM
  2. Remote shared object changes not getting sent to peers
    By swicker in forum Performance Tuning Discussion
    Replies: 2
    Last Post: 07-20-2012, 09:00 AM

Posting Permissions

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