Flash Contact Form in ActionScript 3
Posted by admin in ActionScript 3, Flash, Tutorials
This flash contact form is simply made in Adobe Flash CS3 ActionScript 3. Email validation is better than previous version in ActionScript 2. It sends the form field variables to PHP and loads the response variables back to Flash using URLVariables, URLLoader, and URLRequest classes. It will be very useful for you to use or adapt it for your Flash projects.





Scott, if you wish to use auto response, remove “send_email.php” first and then just rename auto response file to “send_email.php” file. That’s it.
I’ve tried to send out the email by using this form, it gone sucessfully, but when I check my inbox, it’s not in there. Does anyone knows why? Thank you
The download source files link goes to a template website!! i’d reeeeally like to be able to download this!
I was having trouble getting this to work on a WordPress site – all I had to do was to use the absolute path for the .php file, instead of just “send_email.php”. Works great, thank you very much for sharing!
Mauricio – there’s a link to download the .fla source file at the bottom right corner of the page.
how do i adjust the send_email.php file so that it can word with my Gmail account?
and how do i config. my xampp server running on mijn pc to work with this?
hi ok forget het xampp server thing… i just got a free real host…
what do you mean by absolute path Teresa coulde you please help me with this ?
This looks very cool and handy. by the way I found another as3 contact us form which also seems easy to use. We just need to create an Object of this class and it doest rest of things. If anyone wants to have look on it.
http://www.msinghinteractive.com/blog/tag/as3-contact-us-form-flash-tutorial/
Cheers
R
I can’t get it to work at all anymore. I had originally used it on one project and it was fine. Now the code wont work on a different and the examples I download don’t work. They both just said failed sending.
Now it just displays sending but that’s it. I haven’t altered the code except for the name of the button that sends the file and I fixed it in the AS. The server has PHP and all the files are in the same directory.
Hello, I need your help with the script, it gives me errors like this:
1120: Access of undefined property timer.
Where is the timer. I imagine it is an object created somewhere on the stage.
hi
the link does not take me to the source code
I’m an idiot at this kind of stuff, but I have to ask to make sure.
I’m having the same ’stuck on Sending’ issue as well. Is there anything else I have to change in the ’send_email.php’ besides where it says:
$receiver = “admin@survivethegame.com”;
I also don’t know if I need to add any information to the ActionScript, I just left it alone since I really don’t know what I’m doing. The rest of the site template I’ve been able to figure out on my own.
If you need to know, I’m using Flash Template #188 for my site (AS3).
UPDATE – Just tested it again, it actually DOESN’T
stick on ’sending,’ it just straight-up fails.
I have Yahoo as a web host, and it is supposed to be PHP-enabled, if that makes any difference.
Hello my contact form don’t work, I used this template… can help me?
Hello, i been using the latest templates but the email from send_email.php or something doesnt works I’ve tried to send out the email says it gone sucessfully, but when I check my inbox, it’s not in there. Do you know why? Thank you
Me again, i guess i know whats the problem that im not recieving the messages on my inbox, in the server where is my page doesnt work the contact form in Action Script 3, in the same server theres another page with contact form in Action Script 2 and it works perfectly.
Any suggestions ?
Hi,
I am trying to get the contact form to work with a server side aspx mail script but after many weeks still have not succeeded. It is a free of charge job for a non profit ballet society and I would very much appreciate some help as they launch this weekend at their agm.
The AS3 contact form is so cool I really want to keep it but our server only has asp.net.
Cheers,
Brett
Hello, I’m trying flshmo 188. everything works perfect, except for flash contact form. Actualy it works fine also, but special characters do not show up correctly. I guess I need them in UTF-8 or iso-8859-2. I have tried to add “header(‘Content-Type: text/html; charset=utf-8′);” to contact form action script, tried even in php file but it just dont work. Contact form itself shows all characters fine while writing on web page, but after I press send and receive email, all special characters are gone. Is there any way to fix that?
Thank you in advance.
BTW i embeded all in input fields but does not help. So I think it must be somehow specified in script itself.
Thank you very much that’s work perfectly. You are Star.
I am working on a website and am soooo grateful for this tutorial, everything seems to work great but when I hit send I also get the “Failed! Your message cannot be sent” message and its really frustrating! Please help me. I’m not sure what the problem is, but I have seriously tried all that my mind can think about! Any help would be so appreciated!
Okay, I have published my site now and everything seems to work great, but I am having the same problem Josh said where it says it sends but there is nothing in my inbox. Please help!
I used the code b4 and it worked but now im using it and it simply stopped sending the mails,the program tells me the mails are sent anyways they never reach the mailbox is there something i did wrong?
this thing is getting me fired if i dont find an answer soon!
I cant get it to work. What is my REMOTE_ADDR?? My host says its just localhost but i cant get it to work.
if( $contact_name == true )
{
$sender = $contact_email;
$receiver = “gc_extreme@hotmail.com”;
$client_ip = localhost;
What am i doing wrong?
I fixed the problem!
A lot of people are hosted at GoDaddy, but these scripts don’t work there.
I’m hosted at http://www.deleonhosting.com and they work perfectly!
I am recieving all the e-mails people send to me. To see what it looks like, click on the following link.
http://img94.imageshack.us/img94/1632/screenshotml.jpg
Best regards,
Ivar
Hi.First let me say THANK YOU for great free templates
.I’ve changed reciever in send_email.php to tvjeceslav@yahoo.com and i get every msg. But in template’s form it always says “Failed! Your message cannot sent.” How can i fix that?
hi i get this error
Error opening URL ‘http://www…….com/blah@blah.ca.php’
Error #2044: ioError no controlled: text=Error #2032: sequence error. URL: http://www……..com/blah@blah.ca.php
at blah41_fla::contactform_13/blah41_fla::frame1()
and i also don´t know where to put the send_mail.php file or where shall i paste that code should i copy in to flash code? or dreamweaver or put the send_mail file on server? where to?
i cannot find answer please i must finish a site sooner.
Contact form in 127 Curtain template doesn’t work properly.
I’m having difficulties with e-mail field, can not use “@” character! In subject line I couldn’t use some letters as well?! Same with message field?
How to fix this? Or, can I replace this form with AS2, which works much better?
Thanks
Ciao
i’m starting to use your flash templates..
they are very useful.. but i have a little problem with the flashmo_213_mini_red template.
How is possible delete the text on the right the contact form?? I cannot find the .xml for this page
How is possible modify the string “Contact Us” in “Contact me”??
Ciao e tnx
Stefano
I am bulding a site for my church using flashmo_184_business template and testing it on my current Yahoo! account before rebuilding it to the church’s specifications. Everything is in working order so far except the contact form. I just want to figure out the main form on the Contact Us screen. After that I can wing my way through the others.
I can currently using Yahoo! Small Business for my hosting and in the past I have never had a problem with my contact forms because Yahoo! uses PHP. However, I think there has been a change in the last couple of years that is killing my forms.
According to Yahoo! I must add the following:
/usr/sbin/sendmail
but I don’t know where to add it.
The PHP code that I am using is:
Until I get this right all I get when I test the form is “Failed: Your message has not been sent.” And thus…it truly isn’t sent to my inbox at all.
Any help would be greatly appreciated!
Hey this is a great contact form…here is the problem, when the person sends me an email it says it has failed in sending…..but I still receive the message!
I dont know how to fix it so they will not wind up sending an excess amount of emails only to be irritated, not knowing I have gotten it…
help!
Does anyone know how to convert the send-email.php to UTF 8?
I am based in Sweden, and the mail form messages look fine when typed in the browser, but the message that arrives looks like jibberish wherever there are Swedish letters.
I have been told the php script needs to be converted to UTF 8, but i dont know where and how!
Grateful for all help!
Can you please show me how to configure the contact form to work so i can start using it? Thanks Again. Amber ruiz
Hi
i tried it and keep getting “Failed! Your message cannot sent.”
i use Yahoo! Small Business for my hosting; yahoo staff told me to add “/usr/sbin/sendmail” in the code, but i dont have any idea of where or how should i fix this.
Any help would be greatly appreciated!
hey Igor
i hv exactly same problem, pls help me if you fixed it, my email — charudeepi@yahoo.com
thanks in advance
I was having a problem that when I sent a email from my contact page I would not get it. I found out that the code was written a bit wrong. It had some extra stuff it did not need. Here is the correct code.
Message Status text drops letters.
Displays “aie ou message cannot sent” instead of “Failed! Your message cannot sent.”
Displays “success ou message as sent” instead of “Success! Your message was sent.”
Displays “ease ente te ai emai aess” instead of “Please enter the valid email address.”
etc. This occurs within Flash CS5 as well as on my web host.
Otherwise the form works fine. I haven’t altered the form.
Ideas?
I have found the same difficulties of David:
Message Status text drops letters.
Displays “aie ou message cannot sent” instead of “Failed! Your message cannot sent.”
Displays “success ou message as sent” instead of “Success! Your message was sent.”
Displays “ease ente te ai emai aess” instead of “Please enter the valid email address.”
Can you help me? Thanks
Hi David and Veronica,
It is probably because of Adobe Flash CS5.
You will need to do “Character Embedding” for those text fields.
Thanks, great! I solved it
Here’s what was happening.
The contact form labels and text fields use Arial Regular, which is embedded (flashmo 200).
The message status is set to use Arial Bold, which is not embedded.
Rather than embed Arial Bold, I just set Anti-Alias to Use Device Fonts. Message status displays properly now, thanks.
Just curious, why embed Arial Regular. Doesn’t everyone already have it locally?
Hi,
First of all thanks for the help provided by this tutorial.
When the person sends me an email it says it has failed in sending…..but I still receive the message!
Any idea why this is happening and any idea how to resolve it?
I saw a relevant post but doesn’t mention the actual solution
Hi,
thank you for the tutorial. My form works just fine except for special characters. I cannot enter “@” in the e-mail field.
I know somebody else already mentioned it, however, I was not able to find the solution in the text above.
Could you please help?
hello all!
if you are using flash ready made templates and you want to send email using your pages.then do the following changes:
1.open both php pages.
2.find the function with this line :
$receiver = “yourname@yourdomain.com”;
3.change “yourname@yourdomain.com” with your email address.
Now free host your website by visiting noads.biz or any other site.
Thanx!!
I have some problem of Monika, in the e-mail field I cant write “@”. I use flashmo 119 template. Can help me please?
Tanks
Hey admin, brilliant template. I’ve extracted the contact form to stand alone in a subdirectory and everything works fine except… I’ve added fields but the data won’t come through to the email. I get the original fields but not the newbies. Just wondering if you knew if this was a problem local to the As3 or the PHP?
I’m a complete noob so please be gentle!
very very nice tutorial, but I have a question.
How is possible create a field for the “re-confirm” of the mail?
very often happens to many people wrong to write their own mail, then i think is a good choice insert also a second field, to be sure of the correct information. can you help me to create it? i hope is a bit of code…
thank you!
How do I download the source? The link just goes to your website home. Also don’t you need a .php file to accompany this?
I just transcribed the code manually. It always shows the failed to send message even though it actually does send the message and I receive it. I see others have had this problem, do you know the answer? Do I need to enable some kind of confirmation through the PHP script or something?
Please respond, even if you don’t know the answer, so I can find alternate solutions. Thanks!
1st, let me say thank you! for the template and for all of your help thus far. And to everyones else posting, Thank you as well.
Now my question:
This has been asked, but i havent see an answer that helps me.
In the above Coding from 1 – 84 where do i put my email address?
What i’ve tried:
I remaved [ send_email.php ] as shown in line 9 above and replaced it with my email [ new URLRequest( "pixbyjr@gmail" ); ] the result; when i click send, it says, [ sending...] but never sends.
I have exactly the same problem as Sam, Monica and Igor
I use flashmo 188
help pls