AS3 with Coldfusion
Though it was harder to find any documentation on how to send variables from Flash to a Coldfusion page with Flash programming in Actionscript 3, it ended up being a cleaner way than with Actionscript 2. Actionscript 2 made the programmer put all the variables that needed to be sent in a movie clip full of dynamic text fields. So one would have to fill in the data for all these fields with data the text fields the user wrote in. That’s just an extra step and some more clutter put on the stage. Actionscript 3 programming allows you to make a variable that contains all the variables.
var myVars:URLVariables = new URLVariables();
myVars.name = Vincent Stout
Then you can just send over the myVars variable instead of needing to create a movie clips full of text fields to send over.
Since AS3 doesn’t have loadVariables like AS2 did, we use URLRequest methods.
var request:URLRequest = new URLRequest( “email.cfm” );
request.data = myVars;
request.method = URLRequestMethod.POST;
There you have it. Now in your Coldfusion page, in this case “email.cfm”, you can call the variables sent in as form.name and form.phone.