PDA

View Full Version : email form help


nikmark
03-28-2005, 05:55 PM
I'm so close. Everything works but the text fields. They don't return user info. This is what I have so far:

on (rollOver) {

gotoAndPlay(2);

}

on (rollOut) {

gotoAndPlay(10);

}

on (release)
{
rsvp_lv = new LoadVars();
rsvp_lv.content3 = "t3";
rsvp_lv.content2 = "t2";
rsvp_lv.content1 = "t1";
rsvp_lv.recipient = "info@nikmarkmedia.com";
rsvp_lv.subject = "requested information";
rsvp_lv.redirect = "http://www.nikmarkmedia.com/thank-you.html";
rsvp_lv.send("http://nikmarkmedia.com/cgi-sys/FormMail.cgi", "_blank", "POST");
}

Gibberish
03-28-2005, 06:14 PM
is having the content variables hardcoded as strings a test?
rsvp_lv.content3 = "t3";
rsvp_lv.content2 = "t2";
rsvp_lv.content1 = "t1";
This would return content3 as t3, content2 as t2, content1 as t1. if you are trying to grab the values of input boxes with the instance names of t3 - t1 then do this and make sure the target to the t3- t1 is correct:
rsvp_lv.content3 = t3;
rsvp_lv.content2 = t2;
rsvp_lv.content1 = t1;

nikmark
03-28-2005, 07:21 PM
I'm still getting nothing. Any ideas? Thanks for the help

Gibberish
03-28-2005, 07:29 PM
are you just copyin and pasting my code or are you trying to point to the right target?

Copying and pasting will result in nothing because I doubt the t3-t1 values reside in your button. You need to point them to the mc where the input values reside.

here is an example if your input fields were in a mc instance named 'myForm' on the root timeline.

rsvp_lv.content3 = _root.myForm.t3;
rsvp_lv.content2 = _root.myForm.t2;
rsvp_lv.content1 = _root.myForm.t1;
If you still can't get it to work post your fla.

nikmark
03-28-2005, 07:44 PM
I'm sorry I'm real new (as if you couldn't tell) How do i post my fla?

rippazinc
03-28-2005, 08:29 PM
first go advanced reply mode then click "manage attachments"

make sure ur posting a ZIP with your FLA ...if you dont know how 2 zip then go to www.winzip.com or if you have winxp then right click on your file and click "send to compressed folder" and then just upload your file

a quick question: what will this form accomplish? i'm trying to do an email form too but i had to use PHP which doesnt wokr good on my server....please tell me what this script is up to

thanks

rippazinc
03-28-2005, 08:31 PM
after looking back ay ur code i think ur using CGI...please send me ur CGI script to take a quick look at please? also, what program did u use to write it?

Gibberish
03-28-2005, 09:07 PM
lets do one thing at a time.

Post a sample fla (meaning take out any graphics that arent associated as to lower file size) with the form script and movies.

Or you can test movie in flash(ctrl + enter), the hit ctrl+L and copy/paste the output to here.

nikmark
03-28-2005, 09:25 PM
Here's my output. Again thanks so much for the help. This is an unfinished template I'm working with
Level #0: Frame=10 Label="s1"
Movie Clip: Frame=415 Target="_level0.main" Label="s4"
Movie Clip: Frame=30 Target="_level0.main.comp_name"
Movie Clip: Frame=4 Target="_level0.main.comp_name.des"
Movie Clip: Frame=1 Target="_level0.main.comp_name.des.instance139"
Edit Text: Target="_level0.main.comp_name.des.instance139.instance140" Variable=_level0.comp_name1 Visible=true Text = <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"RIGHT\"><FONT FACE=\"Pragmatica\" SIZE=\"27\" COLOR
=\"#81070B\">Nikmark</FONT></P></TEXTFORMAT>"
Movie Clip: Frame=1 Target="_level0.main.comp_name.instance143"
Edit Text: Target="_level0.main.comp_name.instance143.instance144" Variable=_level0.comp_name2 Visible=true Text = <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Pragmatica\" SIZE=\"27\" COLOR=
\"#353435\">Media</FONT></P></TEXTFORMAT>"
Movie Clip: Frame=27 Target="_level0.main.instance175"
Movie Clip: Frame=25 Target="_level0.main.instance175.item4" Label="s1"
Movie Clip: Frame=1 Target="_level0.main.instance175.item4.instance193"
Shape:
Movie Clip: Frame=1 Target="_level0.main.instance175.item4.instance194"
Movie Clip: Frame=1 Target="_level0.main.instance175.item4.instance194.instanc e195"
Shape:
Movie Clip: Frame=1 Target="_level0.main.instance175.item4.instance194.instanc e196"
Shape:
Movie Clip: Frame=1 Target="_level0.main.instance175.item4.instance194.instanc e197"
Shape:
Movie Clip: Frame=1 Target="_level0.main.instance175.item4.instance194.instanc e198"
Shape:
Movie Clip: Frame=1 Target="_level0.main.instance175.item4.instance189"
Edit Text: Target="_level0.main.instance175.item4.instance189.instanc e190" Variable=_level0.link4_2 Visible=true Text = <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"kroeger 0853\" SIZE=\"8\" COLOR
=\"#858585\">contacts.</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LE
FT\"><FONT FACE=\"kroeger 0853\" SIZE=\"8\" COLOR=\"#858585\"></FONT></P></TEXTFORMAT>"
Button: Target="_level0.main.instance175.item4.instance191"
Movie Clip: Frame=1 Target="_level0.main.instance175.item3"
Movie Clip: Frame=1 Target="_level0.main.instance175.item3.instance186"
Edit Text: Target="_level0.main.instance175.item3.instance186.instanc e187" Variable=_level0.link3_2 Visible=true Text = <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"kroeger 0853\" SIZE=\"8\" COLOR
=\"#858585\">portfolio.</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"L
EFT\"><FONT FACE=\"kroeger 0853\" SIZE=\"8\" COLOR=\"#858585\"></FONT></P></TEXTFORMAT>"
Button: Target="_level0.main.instance175.item3.instance188"
Movie Clip: Frame=1 Target="_level0.main.instance175.item2"
Movie Clip: Frame=1 Target="_level0.main.instance175.item2.instance183"
Edit Text: Target="_level0.main.instance175.item2.instance183.instanc e184" Variable=_level0.link2_2 Visible=true Text = <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"kroeger 0853\" SIZE=\"8\" COLOR
=\"#858585\">services.</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LE
FT\"><FONT FACE=\"kroeger 0853\" SIZE=\"8\" COLOR=\"#858585\"></FONT></P></TEXTFORMAT>"
Button: Target="_level0.main.instance175.item2.instance185"
Movie Clip: Frame=1 Target="_level0.main.instance175.item1"
Movie Clip: Frame=1 Target="_level0.main.instance175.item1.instance180"
Edit Text: Target="_level0.main.instance175.item1.instance180.instanc e181" Variable=_level0.link1_2 Visible=true Text = <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"kroeger 0853\" SIZE=\"8\" COLOR
=\"#858585\">about.</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"
><FONT FACE=\"kroeger 0853\" SIZE=\"8\" COLOR=\"#858585\"></FONT></P></TEXTFORMAT>"
Button: Target="_level0.main.instance175.item1.instance182"
Movie Clip: Frame=1 Target="_level0.main.instance175.instance179"
Shape:
Movie Clip: Frame=1 Target="_level0.main.instance175.instance178"
Shape:
Movie Clip: Frame=1 Target="_level0.main.instance175.instance177"
Shape:
Movie Clip: Frame=1 Target="_level0.main.instance175.instance176"
Shape:
Movie Clip: Frame=1 Target="_level0.main.instance160"
Edit Text: Target="_level0.main.instance160.instance161" Variable=_level0.copyright Visible=true Text = <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"RIGHT\"><FONT FACE=\"tahoma\" SIZE=\"10\" COLOR=\"#B
4B4B4\"><B>Nikmark Media </B> © 2004 - <U>Privacy Policy</U></FONT></P></TEXTFOR
MAT>"
Movie Clip: Frame=1 Target="_level0.main.instance154"
Shape:
Movie Clip: Frame=32 Target="_level0.main.instance155"
Movie Clip: Frame=1 Target="_level0.main.instance155.instance157"
Shape:
Movie Clip: Frame=1 Target="_level0.main.instance155.instance158"
Edit Text: Target="_level0.main.instance155.instance158.instance159" Variable=_level0.title Visible=true Text = <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Pragmatica\" SIZE=\"28\" COLOR=
\"#FFFFFF\">contacts.</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEF
T\"><FONT FACE=\"Pragmatica\" SIZE=\"28\" COLOR=\"#FFFFFF\"></FONT></P></TEXTFORMAT>"
Shape:
Edit Text: Target="_level0.main.instance155.instance162" Variable=_level0.title1 Visible=true Text = <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Pragmatica\" SIZE=\"18\" COLOR=
\"#FFFFFF\">contacts</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT
\"><FONT FACE=\"Pragmatica\" SIZE=\"18\" COLOR=\"#FFFFFF\"></FONT></P></TEXTFORMAT>"
Edit Text: Target="_level0.main.instance155.instance163" Variable=_level0.txt1 Visible=true Text = <P ALIGN=\"LEFT\"><FONT FACE=\"tahoma\" SIZE=\"11\" COLOR=\"#FFFFFF\"><B>USA - PHILADELP
HIA</B></FONT></P><P ALIGN=\"LEFT\"><FONT FACE=\"tahoma\" SIZE=\"11\" COLOR=\"#FFFFFF\">
<B></B></FONT></P><P ALIGN=\"LEFT\"><FONT FACE=\"tahoma\" SIZE=\"11\" COLOR=\"#FFFFFF\">
<B>701 North Broadway Avenue</B></FONT></P><P ALIGN=\"LEFT\"><FONT FACE=\"tahoma\" S
IZE=\"11\" COLOR=\"#FFFFFF\"><B>Gloucester City 08030 NJ</B></FONT></P><P ALIGN=\"LEF
T\"><FONT FACE=\"tahoma\" SIZE=\"11\" COLOR=\"#FFFFFF\"><B>E -mail: mail@company.com</B
></FONT></P><P ALIGN=\"LEFT\"><FONT FACE=\"tahoma\" SIZE=\"11\" COLOR=\"#FFFFFF\"><B></B
></FONT></P><P ALIGN=\"LEFT\"><FONT FACE=\"tahoma\" SIZE=\"11\" COLOR=\"#FFFFFF\"><B>Pho
ne: 1-800-1234567</B></FONT></P><P ALIGN=\"LEFT\"><FONT FACE=\"tahoma\" SIZE=\"11\" C
OLOR=\"#FFFFFF\"><B>Fax: 1-800-1234567 </B></FONT></P><P ALIGN=\"LEFT\"><FONT FACE=
\"tahoma\" SIZE=\"11\" COLOR=\"#FFFFFF\"><B></B></FONT></P><P ALIGN=\"LEFT\"><FONT FACE=
\"tahoma\" SIZE=\"11\" COLOR=\"#FFFFFF\"><B>Praesent justo dolor, lobortis quis, lobor
tis dignissim, pulvinar ac, lorem. Vestibulum sed ante. Donec sagittis euismod p
urus.</B></FONT></P><P ALIGN=\"LEFT\"><FONT FACE=\"tahoma\" SIZE=\"11\" COLOR=\"#FFFFFF
\"><B></B></FONT></P>"
Edit Text: Target="_level0.main.instance155.instance164" Variable=_level0.title2 Visible=true Text = <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Pragmatica\" SIZE=\"18\" COLOR=
\"#FFFFFF\">contact form</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"
LEFT\"><FONT FACE=\"Pragmatica\" SIZE=\"18\" COLOR=\"#FFFFFF\"></FONT></P></TEXTFORMAT>"
Edit Text: Target="_level0.main.instance155.instance165" Variable=_level0.txt2 Visible=true Text = <P ALIGN=\"LEFT\"><FONT FACE=\"tahoma\" SIZE=\"11\" COLOR=\"#FFFFFF\"><B>Etiam cursus le
o vel metus. Nulla facilisi.</B> Aenean nec eros. Vestibulum ante ipsum primis i
n faucibus orci luctus et ultrices.</FONT></P><P ALIGN=\"LEFT\"><FONT FACE=\"tahoma
\" SIZE=\"11\" COLOR=\"#FFFFFF\"></FONT></P>"
Movie Clip: Frame=1 Target="_level0.main.instance155.instance166"
Movie Clip: Frame=1 Target="_level0.main.instance155.instance166.instance167"
Shape:
Movie Clip: Frame=1 Target="_level0.main.instance155.instance166.instance168"
Text:
Text:
Button: Target="_level0.main.instance155.instance166.instance169"
Edit Text: Target="_level0.main.instance155.instance170" Variable=_level0.label1 Visible=true Text = <P ALIGN=\"LEFT\"><FONT FACE=\"tahoma\" SIZE=\"11\" COLOR=\"#FFFFFF\">Your name:</FONT><
/P><P ALIGN=\"LEFT\"><FONT FACE=\"tahoma\" SIZE=\"11\" COLOR=\"#FFFFFF\"></FONT></P>"
Edit Text: Target="_level0.main.instance155.instance171" Variable=_level0.label2 Visible=true Text = <P ALIGN=\"LEFT\"><FONT FACE=\"tahoma\" SIZE=\"11\" COLOR=\"#FFFFFF\">E-mail address:</F
ONT></P><P ALIGN=\"LEFT\"><FONT FACE=\"tahoma\" SIZE=\"11\" COLOR=\"#FFFFFF\"></FONT></P
>"
Edit Text: Target="_level0.main.instance155.instance172" Variable=_level0.label3 Visible=true Text = <P ALIGN=\"LEFT\"><FONT FACE=\"tahoma\" SIZE=\"11\" COLOR=\"#FFFFFF\">Message:</FONT></P
>"
Edit Text: Target="_level0.main.instance155.t1" Variable=_level0.main.instance155.t1_2 Visible=true Text = type your name"
Edit Text: Target="_level0.main.instance155.t2" Variable=_level0.main.instance155.t2_2 Visible=true Text = type your address"
Edit Text: Target="_level0.main.instance155.t3" Variable=_level0.main.instance155.t3_2 Visible=true Text = "
Movie Clip: Frame=1 Target="_level0.main.instance155.instance173"
Button: Target="_level0.main.instance155.instance173.instance174"
Movie Clip: Frame=1 Target="_level0.main.instance155.instance173.cont"
Shape:
Button: Target="_level0.main.instance192"
Level #7: Frame=0
Level #5: Frame=0
Level #4: Frame=0
Level #3: Frame=0

Gibberish
03-28-2005, 11:24 PM
ok try this out:

on (release)
{
rsvp_lv = new LoadVars();
rsvp_lv.content3 = _level0.main.instance155.t3_2;
rsvp_lv.content2 = _level0.main.instance155.t2_2;
rsvp_lv.content1 = _level0.main.instance155.t1_2;
rsvp_lv.recipient = "info@nikmarkmedia.com";
rsvp_lv.subject = "requested information";
rsvp_lv.redirect = "http://www.nikmarkmedia.com/thank-you.html";
rsvp_lv.send("http://nikmarkmedia.com/cgi-sys/FormMail.cgi", "_blank", "POST");
}

also please try to start using the code tags to wrap your code. puch the lil flash icon near the new message text box to have it create the code for you and then just put your code inbetween the tags.

rippazinc
03-29-2005, 03:09 AM
are u using CGI? if so, can u please send me the code and what program did u use to write it? thanks

nikmark
03-29-2005, 03:34 AM
I belive FormMail or neomail was used, anyway, here's the code from the html

<form action="http://nikmarkmedia.com/cgi-sys/FormMail.cgi" method="post" name="Contact" target="_blank" id="Contact">

<input name="recipient" type="hidden" id="recipient4" value="info@nikmarkmedia.com">
<input name="redirect" type="hidden" id="redirect" value="http://www.nikmarkmedia.com/thank-you.html">
<td width="200" valign="top"><div style="margin-left:18px; width:167px ">
<div style="line-height:11px; margin-top:10px "></div>
<div style="margin-top:10px ">Your name:</div>
<div style="margin-left:0px; margin-top:2px "><input type="text" name="name" value="" style="width:158px; height:14px; border-style:solid; border-width:1px; background-color:#DA9B17; border-color:#976909; font-family:tahoma; font-size:10px; color:#FFFFFF " onFocus="if(this.value=='Your message')this.value='';"></div>

<div style="margin-top:6px ">E-mail address:</div>
<div style="margin-left:0px; margin-top:2px "><input type="text" name="email" value="" style="width:158px; height:14px; border-style:solid; border-width:1px; background-color:#DA9B17; border-color:#976909; font-family:tahoma; font-size:10px; color:#FFFFFF " onFocus="if(this.value=='Your message')this.value='';"></div>

<div style="margin-top:6px ">Message:</div>
<div style="margin-left:0px; margin-top:2px "><textarea type="text" name="message" value="" style="width:158px; height:57px; border-style:solid; border-width:1px; background-color:#DA9B17; border-color:#976909; font-family:tahoma; font-size:10px; color:#FFFFFF; overflow:auto "></textarea></div>
<div style="margin-top:5px " align="right">
<input name="" type="image" style="margin-left:12px; margin-right:10px " src="images/04-contacts_61.jpg" width="43" height="9">
</a></div>
</div>
</td></form>

nikmark
03-29-2005, 05:38 AM
So far Nothing. Is there an easier way (approach) I should maybe consider?

Gibberish
03-30-2005, 07:25 PM
have you tried using this?

http://www.actionscript.org/tutorials/intermediate/php_send_mail/index.shtml

Thats what I would use. Flash and PHP.

rippazinc
03-31-2005, 12:56 AM
ty!!

nikmark
03-31-2005, 01:07 PM
have you tried using this?

http://www.actionscript.org/tutorials/intermediate/php_send_mail/index.shtml

Thats what I would use. Flash and PHP.

Will this work with flash MX 2004, & I'm running PHP 4.3.10 on my server.... anything else I need to do on my server?

CyanBlue
03-31-2005, 03:38 PM
That'll work, but I'd rather use this one instead, no offense to Jesse... :)

http://www.kirupa.com/developer/actionscript/flash_php_email.htm

pilot90
06-14-2006, 01:01 AM
Hey,
I definatly agree with everyone else about using php insted of cgi but i also wanted to say that it would be easier probably if you put the "recipent" variable directly in the php, Ex. $recipent = "xxx@gmail.com"; put that in the php file it makes stuff less confusing.. les variables to send.. and also in my form i created used the function sendAndLoad ("www.www.com/www.php",_blank, "POST") and by the way, same goes for all of the information that is the same in every entry of the form... ex the subject of the email, or anything else.. i would put that in php..

Hope this helps,
Josh
Pilot90@gmail.com