Skip to main content
Inspiring
November 5, 2006
Question

Contact Us Help

  • November 5, 2006
  • 12 replies
  • 1178 views
Hi guys, i was wondering if anyone can tell me how to make a contact us page..
i have never made one with FLASH, and i dont know what i need to do.
I have made the layout already, with text fields, now i just need to know how to set it all up..

how to get the SUBMIT button to sent the text to a email.

heres the layout i made.
http://0x87.org/sketch/contactUs.swf

thanx in advance.
This topic has been closed for replies.

12 replies

Inspiring
November 6, 2006
you're welcome.
SketchstaAuthor
Inspiring
November 6, 2006
Thanx for the code jonnybennett, much appreciated =)
i only just finished the PHP i was working on, and it works fine now..
now i have 2 codes to use thanx to you. =)
Inspiring
November 6, 2006
Your swf:

sendEmail=new LoadVars();
emailSent=new LoadVars();

sendEmail.name=name_txt.text;
sendEmail.email=email_txt.text;
sendEmail.comments=comments_txt.text;
sendEmail.phone=phone_txt.text;
sendEmail.mobile_txt=mobile.text;
sendEmail.sendAndLoad('mySendEmail.php',emailSent,'POST');

emailSent.onLoad=function(){
status_txt.text='thanks mesage sent';}


You 'mySendEmail.php'


<?
$from=$_POST['name'];
$email=$_POST['email'];
$comments=$_POST['comments'];
$phone=$_POST['phone'];
$mobile=$_POST['mobile'];


$headers = "you@you.com"."\r\n";
$headers .= "MIME-Version: 1.0"."\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1"."\r\n";
$headers .= "Reply-To:you@you.com"."\r\n";
$headers .= "X-Priority: 1"."\r\n";
$headers .= "X-MSMail-Priority: High"."\r\n";
$headers .= "X-Mailer: My mailer";

$message="Name: ".$from.".\r\n Email: ".$email.".\r\nMessage: ".$comments.$phone.$mobile;

mail('youemail@gmail.com',$subject,$message,$headers);

?>
SketchstaAuthor
Inspiring
November 6, 2006
hey south beach, i'll gladly help you out when i get this to work.. but as it is now, im still trying to get it to work all the time.
i'll need some time to figure out how PHP script works, but its not easy, cuz evry script i find on the net are different, so its hard to learn it. =)

did you have a peek at ADH folder?? =) thanx dude. once i finish the whole thing, im gonna change the layout, i hate it. =)
Known Participant
November 5, 2006
Sketchsta
I'm also trying to do the same thing. Doing it from the client side is where I've started. I'm very new at all of this. I'm able to send the email, but I'm so new, I can't seem to find the right syntax to store the text the user types in the input fields in my variables. OK, I'm stupid. Please help.

By the way I like your work
SketchstaAuthor
Inspiring
November 5, 2006
kglad, as new as i am to ActionScript, that getURL command you said, makes absolutely no sense to me. I have never seen anything even close to the "URL" you typed in. =)
but i will try it.. its how i learn.

i'm using ( or at least trying to use ) a PHP script to send the mail.. funny enough, it worked the first time, but only sent the email and comments fields..
now, it doesnt send anything anymore.
I have never written PHP before, so im thinking that im doing something wrong.

I got this code from kirupa.com and im trying to edit it to ad extra text fields to be sent, but thats when it started not to work. or just send 1 field and not the rest =)

if you want the code and swf get them at
http://0x87.org/sketch

the fields that need to be added from .swf are:
name
email
comments
phone
mobile
kglad
Community Expert
Community Expert
November 5, 2006
if you want to use the client-side email program use getURL(). if you want to use a server-side email program you can use the LoadVars() class to send the relevent variables to your script. which are you using?
SketchstaAuthor
Inspiring
November 5, 2006
i dont even know where to begin to make the contacts page... i need help from the verry begining. =(
i think i will be using server side email, the lady which im doing the site for hasnt told me yet.

but i need instructions from A to Z because i have never done a contact page in flash, only HTML.
how will i get the text to send on submit, is probably the most confusing to me.

all i have done in the layout is, made dynamic text fields... with graphics in th BG.
kglad
Community Expert
Community Expert
November 5, 2006
server-side email will require you (or someone else) to write an email program. that's usually going to be in perl, or asp or php or possibly some other language.

because you lack experience you should probably just use getURL(). it's simpler to do:

Inspiring
November 5, 2006
ha - cool thanks - one of these days i will get around to redoing my own site! too busy atm...

cheers
SketchstaAuthor
Inspiring
November 5, 2006
I like your work Mandi, =)
I just had a quick peek at weensyweb.com

BIG THUMBS UP!!!! =D

I'll let you know about the contact us page when i find out.
Inspiring
November 5, 2006
definitely... :)
look forward to the answer...
SketchstaAuthor
Inspiring
November 6, 2006
quote:

Originally posted by: fire orchid
definitely... :)
look forward to the answer...



Hey mandi, PM me when you read this post.