Question:

Actionscript help...making flash email form!!

by  |  earlier

0 LIKES UnLike

Prefer an expert in Flash actionscript!!!

-ITS LENGTHY BUT ONLY CUZ I POSTED SCRIPTS!!

I am working on an email form on Flash and I got most of it done. However theres a small mistake that I cant seem to find.

*Heres my actionscript (please check the "if" part since the problem is there):

stop();

var senderLoad:LoadVars = new LoadVars();

var receiveLoad:LoadVars = new LoadVars();

sender.onRelease = function() {

senderLoad.Name = Name.text;

senderLoad.Email = Email.text;

senderLoad.Phone = Phone.text;

senderLoad.Message = Message.text;

senderLoad.sendAndLoad

("http://mainlinejerky.com/index/

mainlinemail.php",receiveLoad);

}

receiveLoad.onLoad = function() {

if(this.sentOk) {

_root.gotoAndStop("success");

}

else {

_root.gotoAndStop("failed");

}

}

*heres my PHP:

<?php

$to = "mm_slider2001@yahoo.com";

$subject = "Mainline Jerky Order";

$headers = "From: $Email";

$headers .= "\nReply-To: $Email";

$message = "Name: " . $Name;

$message .= "\nEmail: " . $Email;

$message .= "\n\nPhone: " . $Phone;

$message .= "\n\n\nMessage: " . $Message;

$sentOk = mail($to, $subject, $message, $headers);

echo "sentOk=" . $sentOk;

?>

MY problem is that even when the fields are empty, one can still submit the form without playing my "failed" message.

What do I need to do? What can I add to play my "failed" message when a field is empty?

Thanks in advanced! Hope the info provided is helpful!

 Tags:

   Report

1 ANSWERS


  1. gotoandlearn.com - Free video tutorials by Lee Brimelow on the Flash Platform

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.