|[ LiB ]|
Once information from a form is on the server side, the CGI script can pretty much do anything it wants with it, including leaving the information just as it was sent and saving into a text file on the server. Let's check out an example of information stored in this manner:
What in the world is that ? It's encrypted, but once I let you in on the secret it's not so bad. Allow me to break it downthere are two key-value pairs here, which are pairings of a key (the name of a value) and a value (the value itself). Our two variables (keys) are name and score; let's see what their values are.
But before we do that, let me quickly explain that when sending data over the Internet, spaces and commas and a few other characters are not allowed; special codes have been invented to represent these characters . The character combination %2C represents a comma. Don't worry though; you won't have to memorize all these codes because there's an object in ActionScript that converts them for you. Take a look at the line againthis time with no %2Cs, only commas.
Ah, seems clearer. Now let's divide the valued pairs. This is what I ended up with:
Let's say you had some information, such as a high score list, stored away on the server; you can have Flash load this information into the program and access these pairs. If Flash loads pairs like these in, they will be in string form. In order to access the individual values within these properties, you could use the split command to store them in an array. This will give you full access to Lewis, Judy, and Julie and also to their scores. How cool is that?
|[ LiB ]|