code:
on (release) {
problem="";
lf="\n";
if (name.length<3){
problem+="Name to Short"+lf;
}
if (the_message==""){
problem+="Please enter a message"+lf;
}
if (email.length<7){
problem +="email too short"+lf;
}
if (email.indexOf("@")==-1){
problem+="Email missing @"+lf;
}
if (email.indexOf(".")==-1){
problem+="Email Missing dot"+lf;
}
if (email.indexOf("@")>email.indexOf(".")){
problem+="Mal formed email"+lf;
}
if (email.lastIndexOf(".")>email.length-3){
problem+="invalid Domain"+lf;
}
if (name==""){
problem+="You must enter a name"+lf;
}
if (problem.length<1){
action="send";
this.loadVariables("mailform.php","POST");
this.gotoAndStop("wait");
}
if (problem.length>1){
this.gotoAndPlay("form_error");
}
}