|Pathologically Eclectic Rubbish Lister|
Outputting Text To Flashby mt2k (Hermit)
|on May 27, 2002 at 22:44 UTC||Need Help??|
mt2k has asked for the
wisdom of the Perl Monks concerning the following question:
I have recently installed Flash 5 on my computer. Working with it is a fun challenge (Though I wish I could at least draw stick people!). Now, how is this relevant to perl?
Well, as anyone who has seriously used Flash before knows about the loadVariables() and/or loadVariablesNum() functions. These functions allow you to load text/variables and save them back from an external file. Now, one can use simple text files but bleh! For dynamic data, you have to use some language! Now, I have seen all the articles about using PHP or ASP to do so, etc. etc. but of course I thought about perl! ;)
Here is the one-liner that would load in variables for me:
loadVariablesNum ("script.pl", 0);
The input received by the flash file from the script must be formatted as follows:
name1=value1&name2=value2&name3=value3 and so on. This is the same format that is used for query strings attached to URLs. So I have one question... What module should I be looking at to escape characters like the following:
Character '&' to '%26'
P.S.: Now to go off and do the thing I should have done first: making sure that the script is exectued when called by flash, and not just the script code being read in ;)