Lunarpages Web Hosting Forum

Author Topic: Need code revision for flash 6 to flash 8, perhaps a php error instead of flash  (Read 2897 times)

Offline cleverwind

  • Newbie
  • *
  • Posts: 1
Please let me know if I should repost in the PHP area...

I have a simple contact form that seems to work only if publish settings are set to Flash 6, and I need to use Flash 8 for purposes of the rest of the site.  I really like the simplicity of this form, or I'd have come up with another solution...

Can someone just glance at the code and tell me what I need to change so it will work properly set as Flash 8?

The biggest frustration is that set to Flash 6 (AS2.0), the php doesn't work correctly.  The resulting email is below the php posted below.

Second frustration, tab index value works properly for the first two fields (name, email) but then skips out of the form on the third tab and highlights a text object within the scene, but not a part of the form.  I can't figure out why tabs work for the first two fields properly and not the "message" and then submit.  HOWEVER, they work in the stand alone movie (before bringing the form into this scene, .fla file).

Third frustration, if I set to Flash 8, when submit is hit, it returns the first error response, as if there was no name entered into the field.

on (release) {
   if (!Name.length) {
      message = "Please enter your name.";
   else if (!Email.length || Email.indexOf("@") == -1 || Email.indexOf(".") == -1) {
      message = "Please enter a valid email address";

   else if (!Comments.length) {
      message = "Please enter your message";
   else {
      loadVariablesNum ("MailPHP.php", "0", "Post");


$ToEmail = "";
$ToName = "Julie";
$ToSubject = "Contact Form from";

$name = $_POST['name'];
$Email = $_POST['Email'];
$comments = $_POST['comments'];

$EmailBody = "Sent By: $name\nVisitor Email: $Email\n\nMessage Sent:\n$comments\n";

mail($ToName." <".$ToEmail.">",$ToSubject, $EmailBody, "From: ".$name." <".$Email.">");



First, the sender is "(unknown sender)

Then, the body of the message is:
Sent By: Angie
Visitor Email:

Message Sent:
this is a message test

The catch is, I entered an email address.... on the front side.  It just didn't send the data.
BUT if I set the publish settings to Flash 8, the form sends the email address... it just doesn't function properly otherwise, as stated above, it gets stuck on the "enter name" response, but will still send when Submit is hit.
Note: the send to email address in the php code is altered properly in the real file.
« Last Edit: February 01, 2010, 08:56:55 AM by cleverwind »