-
1. Re: actionscript for contact form correct?
Damon Edwards Dec 13, 2007 11:41 AM (in response to raggaewoman)You should be using LoadVars. Check out This Forum, there is a commonly asked questions area, click the "Email Form AS2/PHP". It will give a detailed description including the PHP and AS you need. -
2. Re: actionscript for contact form correct?
flukerest Sep 5, 2010 3:14 PM (in response to Damon Edwards)sorry am having similar problem. wondering if you could help.
i have been working on a website for my client using flash, and i had to create a form
on my contact page that user can use to submit their queries.
i managed to download a step by step code using php. It guided me through everything
but my problem is once i uploaded the website on the server the button submit and reset it not doing it job.
here is the website. www.kulaevent.com
it takes couple second for the contact form to appear.
Please help, please
-
3. Re: actionscript for contact form correct?
Ron Colmen Sep 6, 2010 1:14 AM (in response to flukerest)It would have been easier if you had post your code.
Your code should be something like this.
as
var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars()
your_btn.onRelease = function () {
senderLoad.thename = thename.text;
senderLoad.themail = themail.text;
senderLoad.coment = coment.text;
senderLoad.sendAndLoad("http://www.yourweb.com/your.php",receiveLoad);
}
receiveLoad.onLoad = function () {
if(this.sentOk) {
_root.gotoAndStop("success");
}
else {
_root.gotoAndStop("failed");
}
};
your.php
<?PHP
$to = "you@office.com";
$subject = "YourSubject";
$headers = "From:" .$themail."\r\n";
$message = "Name: " . $thename;
$message .= "\nSender: " . $themail;
$message .= "\nMessage: " . $coment;
$sentOk = mail("$to",$subject,$message,$headers);
echo "sentOk=" . $sentOk;
?>
If you want to send a blind copy use another mail() function there.