A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Writing Variables using a CGI Script,,,,

  1. #1
    Senior Member
    Join Date
    Jul 2000
    Posts
    252
    I am trying to send all variables that are inside the Flash file out to a text file, have had little success. Actually able to read the variables in from the file, but once I want to send them out after changing the values I have no luck.... Here is the 'loadvariable' Code that I am using:

    loadVariables ("http://www.webryder.com/cgi-bin/data/write.pl", "");

    Perhaps there is something with the script itself, but don't think that there is. Should I define the variables again before I send them out? Use get or post?

    Any help would be great.... been a long day.

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Posts
    266
    If you want to send all movie variables to the script, you should use POST method.

  3. #3
    Junior Member
    Join Date
    Aug 2000
    Posts
    27
    What I tend to do unless I expect to be sending a lot of text is to to send stuff through the URL string, so it would look like this:

    urlString = "write.pl?name1=" add value1 add "&name2=" add value2;

    (and so on until you have all the information you need built into the url string, which may include doing loops and stuff)

    Then:

    loadVariables ( urlString, "0");

    With the returned variables being the response from the server...

    The advantage to doing this is that it doesn't send every single variable in the movie to the page, which reduces the traffic over the clients connection to the internet. I just find it's a bit cleaner.

    The drawback to doing this is that there is a limit to how many characters can be transmitted through a URL string. Oh well.

    John

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Posts
    266
    To reduce network traffic and avoid limit of characters,
    I can suggest you to make a movie clip which instance you can duplicate, copy necessary variables to its copy, and then load valiables into its target using post method. And then you will need to copy received variables back to the movie and remove duplicate instance.

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