1 Reply Latest reply on Oct 2, 2006 8:49 PM by abeall

    Local Shared Object for Tracking?

    jeffpelletier
      I was looking into a way of tracking some SWF's that I am going to distribute, and was directed to the Local Shared Object tutorials, but after reading into them a bit, I'm not sure they will apply here. I need to distribute a SWF, and send some sort of message to my server, not the server of the user who is grabbing the SWF file. The tech doc 16194 states that you can only store information within the domain where the SWF is hosted, but my SWF is going to be hosted on 100+ different servers (actually all different SWF's also) that all need to point to my one server for tracking purposes. Can this be achieved with a Local Shared Object, or should I look into something else? Thanks!
        • 1. Re: Local Shared Object for Tracking?
          abeall Level 3
          The SharedObject is more like a cookie, it will actually be stored on the users computer, locally. That's probably not what you want.

          What I think the tech doc was referring to is that a SharedObject can only be accessed by SWFs that are on the same domain as the SWF that created the SO. But, the SO is physically located on the users computer.

          In order to do the tracking, you'll need to use a serverside script(like PHP or ASP) that you POST data to, probably with LoadVars. Ex:

          var lv = new LoadVars();
          lv.aVariable = 'some value';
          lv.anotherThingToTrack = 55;
          lv.sendAndLoad(' http://yourdomain/tracker.php',lv,'POST');

          The thing is, since you are dealing with cross domain access, you'll need to create a cross-domain policy file on your server that allows any SWF to access(or the 100+ servers by name). Example:

          <?xml version="1.0"?>
          <!-- http://www.foo.com/crossdomain.xml -->
          <cross-domain-policy>
          <allow-access-from domain="*" />
          </cross-domain-policy>

          HTH