Use PHP code to send email directly from Flash
Create the form:
- Create a new document and set the size to 400 x 300 (“Frame” > “Frame Size”) or other
- Set “Frame 1″ to “Stop” (“Frame” > “Frame Delay” and check “Stop”, click OK)
- Create edit fields and labels

- Double click each edit field to set its “Variable Name” and uncheck “HTML” for all fields

- Create a button, double click it and enter “Send” as the label.
- Choose “Action” > “OnClick”. Enter the following ActionScript code:
url = "mail.php?"; url = url + "f_name=" + f_name; url = url + "&f_phone=" + f_phone; url = url + "&f_email=" + f_email; url = url + "&f_text=" + f_text; getURL(url,"_blank");
- Export Flash file with ‘File’ > ‘Export Flash SWF File’ command to the same folder where your HTML page is located.
- Choose “File” > “View HTML Code” and paste the code in your HTML page to embed Flash file
Create PHP file and name it mail.php. This file will send the form using your web server.
Paste the PHP code into your mail.php file. Replace youremail@yourdomain.com with your email address. You can customize the mail.php file to have your look and feel.
<HTML> <BODY> <!-- START EMAIL CODE --> <? // the following code will send the email // consult your web hosting provider in case of any problems // you can copy & paste the code into your HTML page // copy all code between <!-- START EMAIL CODE --> and <!-- END EMAIL CODE --> // the form will work if published online // it will not work from your local disk // put your email address here // the form will be sent to this email $to = "youremail@yourdomain.com"; // use echo to display information after the user has submitted the form echo"Thank you for your message"; //list all fields echo"<br>Name: $_GET[f_name]\n"; echo"<br>Phone: $_GET[f_phone]\n"; echo"<br>Email: $_GET[f_email]\n"; echo"<br>Message: $_GET[f_text]\n"; echo"<br>\n"; //send the email: $mailtxt is the content of the email $mailtxt ="This text will appear at the top of the email"; // use "\n" to add line breaks $mailtxt .="\n"; $mailtxt .=" Name: $_GET[f_name]\n"; $mailtxt .=" Phone: $_GET[f_phone]\n"; $mailtxt .=" Email: $_GET[f_email]\n"; $mailtxt .=" Message: \n$_GET[f_text]\n"; $mailtxt .="\nThis text will appear at the bottom of the email\n"; $subject = "Put your subject here"; $headers="From: Your name <" + $to + ">\r\n"; mail($to, $subject, $mailtxt, $headers); ?> <!-- END EMAIL CODE --> </BODY> </HTML>
Upload all files on your web server: 1 Flash file (SWF), 2 Your web page, 3 mail.php file. Test the form if it works. Consult your web hosting provider if sendmail if allowed for your account
Download source here




February 2, 2010 at 12:32 am
The writer of http://www.flashconf.com has written a superior article. I got your point and there is nothing to argue about. It is like the following universal truth that you can not disagree with: When working a support phone the phone will always ring when you close Netscape and try to get some real work done. I will be back.
April 7, 2010 at 4:35 pm
I studied the html tutorial and I really learned a lot. I think my next homepage will be a lot better than my first one.
April 11, 2010 at 6:49 pm
great help. Thanks
April 24, 2010 at 8:38 pm
Very well I could hardly agree more with what you just have said
April 25, 2010 at 8:54 pm
Awesome lookingsite who did the design?
April 26, 2010 at 9:50 pm
Is it possible that a user can draw in a field, and then have the drawing sent along?
April 28, 2010 at 10:33 am
Immer wieder taucht die Frage auf, wie sich SSI in WordPress einbinden läßt ohne sich großartig z.B. in die PHP-Programmierung einarbeiten zu müssen
May 7, 2010 at 6:18 pm
nice one, thnks
August 2, 2010 at 4:53 am
Hm ,.. Yes the best way is to just play like my friend Sol Dasso he just play games and enjoy his life.
August 13, 2010 at 1:30 pm
Put your deliver the results in an over the internet portfolio. I am confident there can be a CPU there. Net layout is about far more than very good design and style. It is actually about user friendliness and functionality. If someone is going to hire you, they will want to work with the internet web site, not see it.
December 23, 2010 at 6:47 pm
Nice one, cheers for the tip
December 26, 2010 at 8:29 pm
Reader’s next year will be better knowing this!
December 27, 2010 at 9:17 am
Hello,
I have a problem with this…. I did everything like it says but when I receive email it says Name:undefined.
Thank you for your message
Name: undefined
Email: undefined
Phone: undefined
Address: undefined
City: undefined
Zip: undefined
Type of service needed:
Frequency:
Approx square footage:
Type of room:
Number of bedroom:
Number of Baths:
People living in your house:
Number of pets:
Preferred Quote Method:
Message: undefined
Would you please tell me what I’m doing wrong. Thanks.
April 6, 2011 at 5:37 am
First off good site. Im not sure if it has been addressed, nevertheless when utilizing Chrome I can never get the entire weblog to load with out refreshing alot of occasions. Could just be my laptop computer. Enjoy!
May 28, 2011 at 12:16 am
Write this up into an ebook or something… this stuff is Gold!