Flash question: tracking clicks with HTTP-requested URL

Discussion in 'Programming' started by Labcoat88, Mar 20, 2006.

  1. #1
    Hi folks,

    I'd like to embed some code in a Flash app that does an HTTP request for a .txt file on my server. Then, I can look at my logs and know how far people got in the Flash app (it's an e-commerce site.) The hitch is that I don't want to actually show the .txt file, I just want it to be requested so the server can log it.

    The URL I'd like to load (log) needs to look like:

    http://www.mysite.com/track.txt?event=page3&rand=32789372198
    Code (markup):
    The "rand=32789372198" needs to be filled with a random number (like timestamp + random #) so that it avoids getting cached by AOL proxy, etc.

    Can anyone help with a snippet of code?

    thanks!
    LC88
     
    Labcoat88, Mar 20, 2006 IP
  2. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Can you not just request a php/asp page which updates a database?

    Using text files for logging seems an unnatural way to do it.
     
    mad4, Mar 21, 2006 IP
  3. Labcoat88

    Labcoat88 Peon

    Messages:
    192
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Actually yes, that's how I'll do it. But my problem is not server-side, but rather how to initiate the request from within the Flash movie... any ideas?
     
    Labcoat88, Mar 21, 2006 IP