FORUMS: list search recent posts

Help:ActionScript 2.0 in Flash 8 Contact Form Problems

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jonathon Nelson
Help:ActionScript 2.0 in Flash 8 Contact Form Problems
on Apr 9, 2009 at 2:35:25 am

Hey, I am a Graphic Design Student at Oregon State University and I am working on a web site for a client/friend. For a couple of reasons I ended up buying a template then using that as a starting point to then build her a site. The site building went fine but the code that was with the template for a contact form is not working. It will send an email to me just fine but none of the information that is entered into the form is sent with it. I have a feeling the variables in my php is not set to the same variables that flash is sending. Yet this goes out side of my knowledge of action script coding and so any help would be wonderful. Thank you!

Flash Code:

label1 = "Name";
label2 = "Company";
label3 = "E-mail";
label4 = "Phone";
label5 = "Message";
//
countField = 5;
clearField();
//
var arrayLabel:Array = new Array();
for (i=1; i txtField = _root.pages.page4.contactform["f"+i]["txtField"+i];
txtField.index = i;
arrayLabel[i] = this["label"+i];
txtField.tabIndex = i;
txtField.onSetFocus = function() {
if (this.text == arrayLabel[this.index]) {
this.text = "";
}
};
txtField.onKillFocus = function() {
if (this.text == "") {
this.text = arrayLabel[this.index];
}
};
}
//
function clearField() {
f1.txtField1.text = label1;
f2.txtField2.text = label2;
f3.txtField3.text = label3;
f4.txtField4.text = label4;
f5.txtField5.text = label5;
}
//
// button CLEAR
btnClear.onRollOver = function() {
this.gotoAndPlay("over");
};
btnClear.onRollOut = btnClear.onReleaseOutside=function () {
this.gotoAndPlay("out");
};
btnClear.onRelease = function() {
clearField();
};
//
// button SEND
btnSubmit.onRollOver = function() {
this.gotoAndPlay("over");
};
btnSubmit.onRollOut = btnSubmit.onReleaseOutside=function () {
this.gotoAndPlay("out");
};
btnSubmit.onRelease = function() {
if (_root.pages.page4.contactform.f1.txtField1.text == label1 ||
_root.pages.page4.contactform.f2.txtField2.text == label2 ||
_root.pages.page4.contactform.f3.txtField3.text == label3 ||
_root.pages.page4.contactform.f4.txtField4.text == label4 ||
_root.pages.page4.contactform.f5.txtField5.text == label5 ) {
gotoAndStop(3);
} else {
_root.pages.page4.contactform.loadVariables("email.php", "POST");
gotoAndStop(2);
}
};
stop();


Php Code:

$destination="(This works)";
$name=$_POST['name1'];
$company=$_POST['company'];
$email=$_POST['email'];
$from = '(this works too)';
$phone=$_POST['number1'];
$mes=$_POST['message1'];
$subject=$_POST['subject'];
$header="From: $fromn";
$mes="Name: $namen
Company: $companyn
Email: $emailn
Phone: $phonen
Message: $mesn";
mail($destination,$subject,$mes,$header);





Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]