Coverting as2 to as3
Hi all,
I have an as2 emailer form on my site and i would like to convert it to as3. (ive blanked out the web address and email as its a private thing for clients).
Please can I have some help!? (novice at as3)
Thank you!
Dan
This is the code from the fla;
var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();
sender.onRelease = function() {
senderLoad.theName = theName.text;
senderLoad.theEmail = theEmail.text;
senderLoad.theMessage1 = theMessage1.text;
senderLoad.theMessage2 = theMessage2.text;
senderLoad.theMessage3 = theMessage3.text;
senderLoad.theMessage4 = theMessage4.text;
senderLoad.theMessage5 = theMessage5.text;
senderLoad.theMessage6 = theMessage6.text;
senderLoad.sendAndLoad("http://www....../sendLL.php",receiveLoad);
}
receiveLoad.onLoad = function() {
if(this.sentOk) {
getURL("http://www....../LL-sent.html", "_self");
}
else {
getURL("http://www......./LL-failed.html", "_self");
}
}
This is the code from the php;
<?PHP
$to = "email@notelling.com";
$subject = "Lyric Lounge Viewing Panel Comments";
$message = "Name: " . $theName;
$message .= "\nEmail: " . $theEmail;
$message .= "\n\nWhat do you like the least? \n" . $theMessage1 . "\n";
$message .= "\n\nWhat do you like the most? \n" . $theMessage2 . "\n";
$message .= "\n\nWhat element would you expand? \n" . $theMessage3 . "\n";
$message .= "\n\nHow could it be improved? \n" . $theMessage4 . "\n";
$message .= "\n\nOther Comments \n" . $theMessage5 . "\n";
$message .= "\n\nRating \n" . $theMessage6 . "/10";
$headers = "From: $theEmail";
$headers .= "\nReply-To: $theEmail";
$sentOk = mail($to,$subject,$message,$headers);
echo "sentOk=" . $sentOk;
?>