View Full Version : Flash form to Perl script
uzzi5
08-16-2001, 02:57 AM
I need to pass variables from my flash form to a pearl script. I already have a Pearl script that works fine with an HTML form and would like to use this script with a new flash form. In the script I use the $in('variable_name') to receive the data from the HTML form. How do I get the variable data from the flash form to my existing and Fucntional pearl script.
barkers
08-16-2001, 09:01 AM
not quite sure if im missing the point here, but
you can either use
loadvariables('scriptname.cgi',_root.targetMC,'POS T');
this will call the script and post any variables on the timeline you call it from. the returned data is captured using
onclipevent (data) {
//code
}
which resides on the _root.targetMC movie clip.
or use
getURL('scriptname.cgi','windowname','POST');
this posts all variables on the timeline its called from. in the same way as a form submission, (I.E. the data is returned to the browser rather than the flash movie)
snowdude
08-22-2001, 03:29 AM
This one might help as well:
http://www.actionscripts.org/tutorials/intermediate/load_edit_save_vars/index.shtml
Not exactly what your going for but the basic concepts are the same.
uzzi5
08-22-2001, 05:07 PM
Snowdude,
I tried the link you gave me and setup a test pearl script very much like the one on the link but no go.
the following two lines in the script give me an internal server error:
3) require "subparseform.lib";
4) &Parse_Form;
When I comment out these lines the script runs without any errors but of course I don't receive any data from any of my variables in my Flash form.
I have tried the loadvariables command and getURL but with no luck.
snowdude
08-22-2001, 10:08 PM
Do you have the subparseform.lib file in the same directory as the UpdateVars.cgi script. Both of those files came with the download and they both need to be in the same directory. That's about all I can think of that would be causing that error.
carousel30
06-11-2004, 11:16 AM
I'm having the same problems - same situation -
have a working html form that posts to a perl cgi script (simple e-mail collection), but when I post using a flash movie that has the same variable names, etc. it doesn't seem to be working.
one question - there are 3 hidden fields that I'm working with. I assume that if Flash just posts any variable name/value pairs from the timeline, I could just do something like:
button_mc.onPress = function() {
var cmd:String = "login";
var baseURL:String = "http://www.website.com/";
var baseframe:String = "http://www.website2.com";
getURL('http://www.script.com/cgi-bin/prospector.pl','windowname','POST');
}
and the hidden fields - baseURL, baseframe and cmd are just passed along.... any help?
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.