First of all, no, this is not the crappy mailto function. I hate it. I will NEVER tell you to use it.
1. Create an AS2 Flash File. I prefer AS2 over AS3 because it's easier to use.
2. Create your form with input text and labels and stuff. Leave out the submit button.
3. Give each input field a variable.
3. Turn the form into a symbol, a movieclip.
4. Give it an instance name of form.
5. Create a submit button. DO NOT use the component button. It will fail you.
6. Now, create a php file. Use whatever editor you want.
7. If html tags are already in the editor, remove them. We want it to be blank.
8. Enter the following into the php file:
9. Change all that to whatever you need. For example, change the email to your email. And add or remove variables dependent on how many fields you have in your Flash file. Change the stuff in $_POST['stuff'] to whatever your variable for your input name is.
10. Save the php file to "contact.php".
11. Now go back to your flash file. In the submit button's code, it should say the following:
12. In form's code, it should say the following:
13. Make a new frame. Add stuff to it so that it tells the user that the message was sent successfully. I recommend creating a back button, too.
14. Add stop(); to both frames.
15. You're done. You just need to save both the Flash file and the Php file to the same directory.
Here's an example from my website:
http://raidation.frih.org/contact.html
1. Create an AS2 Flash File. I prefer AS2 over AS3 because it's easier to use.
2. Create your form with input text and labels and stuff. Leave out the submit button.
3. Give each input field a variable.
3. Turn the form into a symbol, a movieclip.
4. Give it an instance name of form.
5. Create a submit button. DO NOT use the component button. It will fail you.
6. Now, create a php file. Use whatever editor you want.
7. If html tags are already in the editor, remove them. We want it to be blank.
8. Enter the following into the php file:
| Code: |
| <?php
$name = $_POST['name']; $subject = $_POST['subject']; $message = $_POST['message']; mail("ruiqim@gmail.com", $subject . "--" . $name, $message); ?> |
9. Change all that to whatever you need. For example, change the email to your email. And add or remove variables dependent on how many fields you have in your Flash file. Change the stuff in $_POST['stuff'] to whatever your variable for your input name is.
10. Save the php file to "contact.php".
11. Now go back to your flash file. In the submit button's code, it should say the following:
| Code: |
| on(release) {
form.loadvariables("contact.php"); } |
12. In form's code, it should say the following:
| Code: |
|
onClipEvent(data) { _root.nextFrame(); } |
13. Make a new frame. Add stuff to it so that it tells the user that the message was sent successfully. I recommend creating a back button, too.
14. Add stop(); to both frames.
15. You're done. You just need to save both the Flash file and the Php file to the same directory.
Here's an example from my website:
http://raidation.frih.org/contact.html
