• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint


Q1:When should I use LoadVariables and when should I use the LoadVars object?
A1: Use LoadVariables in simple situations where you just need to get some quick external data into your movie. The LoadVars object should be used in more complex movies where you need to call out to the server many times and send data as well as receive. LoadVars is also more useful if you need to track the incoming data.
Q2:I've made a CGI program to send data to a movie, but that movie doesn't always get the data. Why?
A2: Make sure that you are using the right MIME type when returning the data. This corresponds to the Content-type: at the top of the Perl scripts in this hour. If you are generating a text or HTML page, then text/html is the right MIME type. However, if you are sending data directly to a Flash movie, use application/x-www-urlform-encoded.
Q3:In a program like the survey, how do I prevent the user from clicking the Submit button more than once?
A3: There are many ways. You could let the user click the button more than once, but just not send the data if it has already been done—set a variable to true the first time. Or, you could send the user immediately to another frame that says “please wait” when the user clicks the button.
Q4:How can I quickly determine whether my Web server supports Perl?
A4: The only way is to test it. Servers vary greatly in the software that runs them and the way they are configured. There is no surefire way to determine whether the server will run CGI programs unless you are an expert.
Q5:Do CGI programs see a difference between HTML post forms and Flash movies that use the LoadVars object?
A5: No. They look the same to CGI programs. This means that creating quick and simple HTML forms is a great way to test your CGI programs before trying to use them from a Flash movie.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint