Hello all,
I have a Flash form done and I would like to connect it to an email. I’m a little confuse on how to do that.
I’ve read that I have to make a separate php page and uploaded with all my files, but I’m not clear yet.
Following is my code:
import flash.net.URLVariables;
import flash.net.URLRequest;
InteractiveObject(theName.getChildAt(1)).tabIndex = 1;
InteractiveObject(theEmail.getChildAt(1)).tabIndex = 2;
InteractiveObject(theMessage.getChildAt(1)).tabIndex = 3;
/* Mouse Click Event
Clicking on the specified symbol instance executes a function in which you can add your own custom code.
Instructions:
- Add your custom code on a new line after the line that says “// Start your custom code” below.
The code will execute when the symbol instance is clicked.
*/
send_btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
function fl_MouseClickHandler(event:MouseEvent):void
{
if (theName.text == "" || theEmail.text == "" || theMessage.text == "" ){
theFeedback.text = "Please fill out all fields.";
}
else{
// create a variable container
var allVars:URLVariables = new URLVariables();
allVars.name = theName.text;
allVars.email = theEmail.text;
allVars.message = theMessage.text;
//send info to a url
var mailAddress:URLRequest = new URLRequest("I dont know what to put here");
mailAddress.data = allVars;
mailAddress.method = URLRequestMethod.POST;
sendToURL(mailAddress);
theFeedback.text = "Thank you!";
theName.text = "";
theEmail.text = "";
theMessage.text = "";
}
}
On the “I dont know what to put here” is where I have the problem.
Thanks for reading!