A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: [Resolved] [Resolved] Shared Objects

  1. #1
    Hi there,

    Question:

    Is it possible to use SharedObjects to examine, if a user is online?

    If so, I maybe could use this function.

    Please help!

    Manuel

  2. #2
    Senior Member
    Join Date
    Jul 2000
    Posts
    419
    yes it's quite easy, establish a server side sharedObject and when people enter pages of your site have a swf that connects to that shared object. I have done this and it works very well, you can even see exactly what page they are on, and many other uses. best thing is that when they close the web site it will reflect the change with out refreshing the browser

  3. #3
    zaxis,

    could you give me the fla-file for that Shared Object???

    Thanx a bunch,


    Manuel

  4. #4
    Senior Member
    Join Date
    Aug 2002
    Location
    Dublin, Ireland
    Posts
    1,749

    Related, but not the same!

    Do either of you know if you can do something similar to check whether the user's browser is set to work offline?

    I have had a couple of people complain of never ending downloads that turned out to be because they had set their browsers to work offline, so Flash didn't detect a failure in getting the data and kept on dutifully searching for ever.

  5. #5
    Senile member! :)
    Join Date
    Dec 2001
    Location
    Saunaswamp (transl)
    Posts
    2,296
    To be able to create serverside Sharedobjects you must have access to the comm server as it's currently the only serverside technology that suports it AFAIK. To check if other users are online serverside scripting or the comm server is the only way.

    A simple method to check for internet connection would be to call for a serverside script page, having a "antichache" variable with a unique value at the end of the URL, with loadVars or something. With a unique value I mean Date.getTime() (this returns the milliseconds since midnight 1:st jan 1970 and thus almost always unique!). This sever script returns just a simple variable with some "dummy" data.

    If you then check for this "dummy" data And have a timeout span. If this timespan is set properly and runs out you can be sure that there is no connection to the internet. Since the"antichache" variable will certify that the page isn't loaded from the browser's chache. If you are using ASP as serverside you can from the ASP script set thet this page is not to be stored in the bowser chache. How it is with other serverside scripts I dont know.

    -- Mirandir

  6. #6
    Senior Member
    Join Date
    Aug 2002
    Location
    Dublin, Ireland
    Posts
    1,749
    Hmmm. I remember having to include the timer milliseconds before on a Flash 4 loadvars type project because of caching problems. It only sort of worked and even then only when combined with a dummy flash variable in my output that contained a rake of different "nocache" tags to cover all the different browser caching schemes.

    I had hoped that the XML sendAndLoad had got past that - it all looked a bit rough and ready.

    I'll have a bit of a play, but surely there is some kind of browser variable "is_offline" or something that I can query somehow? Even if I have to build a function in the HTML, it could be invaluable for deployment.

  7. #7
    Junior Member
    Join Date
    Nov 2004
    Posts
    1

    fla file for Shared Object

    zaxis, trooper

    could you also give me the fla-file for that Shared Object???

    Thanks!

    -jun

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