Hi! I really don't know anything about the .NET framework, I use php, but POST and GET are standard methods for sending variables to any server-side script.
Also if you are waiting any kind of response from the server when sending the request, it's just in vain, since you didn't added any event listener for the Complete event of the URLLoader object. Unless you add it and at least make the listener function trance something the flash movie won't do anything, but that doesn't mean it's not working.
You also missed the dataFormat for the URLLoader:
varLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
If you want you can check this link
http://livedocs.adobe.com/flex/201/h...ons_173_2.html
It's very helpfull, but it's for flex, anyway it's the same thing, just ommit the scope part (private, public and stuff)
Best regards
The_Nephilim
Quote:
Originally Posted by rrocket
I am trying to create a flash email form with Actionscript 3.0 and have gotten this far with it:
- var variables:URLVariables = new URLVariables();
-
var varSend:URLRequest = new URLRequest("http://thefreightrateco.com/dev/Contactus.aspx");
-
var varLoader:URLLoader = new URLLoader;
-
varSend.method = URLRequestMethod.POST;
-
varSend.data = variables;
-
-
stop();
-
-
stage.focus = tbName;
-
-
-
send_btn.addEventListener(MouseEvent.CLICK, sendEmail);
-
-
function sendEmail(event:MouseEvent):void
-
{
-
variables.tbName = tbName.text;
-
variables.tbEmail = tbEmail.text;
-
variables.tbBody = tbBody.text;
-
varLoader.load(varSend);
-
}
I have the same issue with the button not doing anything... I would prefer to use C# for the backend and am using .NET 2.0... Anyone have any ideas on what the problem is?