Can anyone help me create an “mail.ASP” file for my flash actionscript?
My** Frame 1** code is:
function person(Name, Mail, Desc)
{
this.Name = Name;
this.Mail = Mail;
this.Desc = Desc;
} // End of the function
var mailerPage = "mail.asp";
var maxTries = 10;
var numTries = 0;
var arrayCount = 0;
var personArray = new Array();
personArray.push(new person("Paul", "[email="pauld@designstudious.com.au"]pauld@designstudious.com.au[/email]", "All the fields with a (!) are needed."));
nombre = "";
apellido = "";
email = "";
tel = "";
ciudad = "";
pais = "";
empresa = "";
web = "";
disenoweb = "";
html = "";
flash = "";
ecommerce = "";
backoffice = "";
banner = "";
brochure = "";
logotipo = "";
fotografia = "";
subject = "Request A Quote";
presup = "";
url1 = "";
url2 = "";
message = "";
mailSent = "";
recipient = personArray[0].Mail;
mailerStatus = personArray[0].Desc;
contactPerson = personArray[0].Name;
arrayCount = 0;
stop ();
function Send()
{
if (nombre == "")
{
mailerStatus = "<font color=\"#FF0000\">Please, fill in the NAME field.</font>";
stop ();
}
else if (email == "" || email.indexOf(".", 0) == -1 || _root.email.indexOf("@", 0) == -1)
{
mailerStatus = "<font color=\"#FF0000\">Please, fill in the E-MAIL field with a valid address.</font>";
stop ();
}
else if (apellido == "")
{
mailerStatus = "<font color=\"#FF0000\">Please, fill in the SURNAME field.</font>";
stop ();
}
else if (message == "")
{
mailerStatus = "<font color=\"#FF0000\">Please, provide me with a short PROJECT DESCRIPTION.</font>";
stop ();
}
else
{
loadVariablesNum(mailerPage, 0, "POST");
mailerStatus = "Sending order.";
gotoAndPlay("SendMail");
} // end if
} // End of the function
function incArray()
{
++arrayCount;
if (arrayCount == personArray.length)
{
arrayCount = 0;
} // end if
recipient = personArray[arrayCount].Mail;
mailerStatus = personArray[arrayCount].Desc;
contactPerson = personArray[arrayCount].Name;
} // End of the function
function decArray()
{
--arrayCount;
if (arrayCount < 0)
{
arrayCount = personArray.length - 1;
} // end if
recipient = personArray[arrayCount].Mail;
mailerStatus = personArray[arrayCount].Desc;
contactPerson = personArray[arrayCount].Name;
} // End of the function
Then when you click **SEND **the following Actionscript is displayed:
if (mailSent != "")
{
gotoAndPlay("Finished");
}
else
{
++numTires;
if (numTries >= maxTries)
{
gotoAndPlay("Error");
}
else
{
gotoAndPlay("Finished");
} // end if
} // end if
The ASP should return the following result once processed
mailSent=true
I’m thinking that maybe all I have to do is write the following
<html>
<body>
[color=#ff0000]<%
response.write("mailSent =true")
%>[/color]
</body>
</html>
what do you guys think, have I totally confused you?
I have attached the FLA so you can see what Im on about