[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.0

Need help getting contacts page to work on flash template for website

Asked by RupertM1975 in ActionScript

Tags: Adobe, CS3, Flash website

Hi there,

Im new to flash programming, so please bear with me.

I bought a flash template to customise to use for our wedding website. Ive got pretty much most of it done, all except the contacts page, which I cant get to work.

I think Ive narrowed the problem down to the feed into send_mail.php script, but any suggestions would be greatly appreciated (before my future wife kills me for wasting so much time on this when we could have got a simple html website  but where would be the fun in that?!)

I've attached the Action script behind the contacts page (please excuse the Spanish  for some reason the scripts are littered with it  for those who need to know, boton = button, listo = ready, nombre = name, cuadro = picture).



From what I can gather, the first bit deals with what happens when you click on the buttons (name and email), the second bit is for error checking whats entered, such as whether the email address has a @ or .com. The last bit is to feed the results into a php file, which should forward the contents of the contacts page to me.

Heres my send_mail.php file

<?php
$nombre=$_POST['name'];
$email=$_POST['email'];
$phone=$_POST['company'];
$comentarios=$_POST['msg'];

$to="mail@mail.com";
$subject="From flash form";
$headers="From: \"$name\" <$email>";
$message = "Company: $company\n\n";
$message .= $msg;

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

?>


And I've put this php file in the same directory of my website as all the other swf and fla files  is that correct?



Should this work? Or have I made a mistake anywhere?

Many thanks
RM
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
boton.onRollOver = function() {
	this.gotoAndPlay("inicio");
};
boton.onRollOut = function() {
	this.gotoAndPlay("final");
};
boton.onRelease = function() {
	if (nombre.text == "") {
		listo = 0;
		cuadronombre.gotoAndPlay("inicio");
	}
	if (nombre.text != "") {
		listo = 1;
		if (cuadronombre._currentframe != 1) {
			cuadronombre.gotoAndPlay("final");
		}
	}
	//-----------------------------------------------
	if (email.text == "") {
		errores.pos = -7;
		cuadroemail.gotoAndPlay("inicio");
	}
	//-----------------------------------------------
	lafuncion();
};
function lafuncion() {
	a = 0;
	b = 0;
	c = 0;
	esto = email.length;
	for (i=0; i<esto; i++) {
		elString = new String(email.text);
		iStr = elString.charAt(i);
		//para el @
		if (iStr == "@") {
			a = 1;
		}
		//para el .com
		if (iStr == ".") {
			b = 1;
		}
		c = a+b;
	}
	if (c !== "2") {
		if (cuadroemail._currentframe == 1){
			cuadroemail.gotoAndPlay ("inicio")
			}
		if (a != 1) {
			if (b != 1) {
				errores.pos = -7;
			}
		}
		if (a != 1) {
			if (b == 1) {
				errores.pos = -27;
			}
		}
		if (b != 1) {
			if (a == 1) {
				errores.pos = -47;
			}
		}
	}
	if (listo == 1) {
		if (listo2 == 1) {
			if (c == "2") {
				if (cuadroemail._currentframe != 1) {
					cuadroemail.gotoAndPlay("final");
				}
				errores.pos = 20;
				var mail = new LoadVars();
				mail.nombre = nombre.text;
				mail.email = email.text;
				mail.phone = phone.text;
				mail.comentarios = comentarios.text;
				mail.Submit = true;
				mail.sendAndLoad("http://www.website.com/send_mail.php", mail, "POST");
				nextFrame()
			}
		}
	}
}
[+][-]09/17/08 09:09 AM, ID: 22500391Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/17/08 09:16 AM, ID: 22500475Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/17/08 09:20 AM, ID: 22500523Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/18/08 03:37 AM, ID: 22509394Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/18/08 03:57 AM, ID: 22509482Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/18/08 09:02 AM, ID: 22512431Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09/18/08 09:57 AM, ID: 22512929Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: ActionScript
Tags: Adobe, CS3, Flash website
Sign Up Now!
Solution Provided By: RupertM1975
Participating Experts: 1
Solution Grade: A
 
[+][-]09/18/08 02:16 PM, ID: 22515581Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/19/08 01:32 AM, ID: 22518920Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/19/08 08:39 AM, ID: 22522331Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 / EE_QW_2_20070628