
点这里下载演示效果文件
测试: send按钮:
on (release) { if (youremail.indexOf("@")>0) {//这里判断邮件格式是否符合。 if (youremail.indexOf(".")>youremail.indexOf("@")) { y_mail = true; } } if (femail.indexOf("@")>0) { if (femail.indexOf(".")>femail.indexOf("@")) { f_mail = true; } } if (yourname != "" and fname != "" and message != "" and y_mail == 1 and f_mail == 1) { loadVariables("mail.php", this, "POST");//和PHP通信。其实和TXT是一样的! gotoAndStop("send"); } else { gotoAndStop("wrong"); } } -------------------------------
PHP部分:
<?
$mailto=$femail; $mailfrom=$youremail; $subject="hello"; $mailmes=$message; mail($mailto,$subject,$mailmes,$mailfrom);//
?>
|