|
-
Challenging Convention
the way i do it is to send vars to my php mailer form and set up timeout period:
loadVariables(_root irURL+"/scripts/enquiry_processor.php", this, "POST");
TimeOutMax = 80;
TimeOutLoop = 0;
and then go to a loop on the timeline (frame label = "ServerCheck") with:
if (result == "Okay") {
gotoAndPlay("Success");
} else if (result == "Fail") {
gotoAndPlay("Error");
}
(then a couple of frames later)
TimeOutLoop++;
if (TimeOutLoop>TimeOutMax) {
trace("Sending Form Data Has Timed Out");
status = "Sorry "+_root:firstname+", The server seems to be taking longer than normal to confirm receipt of your details. Please check your internet connection and try submitting the form again. <br><br>If this problem continues and your internet connection appears to be fine, our servers may be experiencing a temporary difficulty.";
gotoAndPlay("Error");
} else {
gotoAndPlay("ServerCheck");
}
and then last line on the php script (enquiry_processor.php):
// Confirm Success Back To Flash
$output = "&result=Okay";
echo $output ;
Job done...
Hope that helps...
Cheers
Andy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|