How to make an email form with flash and php
Flash Contact Form, What professional looking website doesn't have a great contact form. I mean lets face it a simple mailto link is second rate. But how does one create an email form in flash? This tutorial will teach you the proper way to create a great email form.
If you use the code provided in this Flash Tutorial you will find that the headers of you email are properly formatted. That means the your email will actual say the name of an email not just some strange ip address. Better yet your headers are properly formatted so you can simply click the reply button.
If you use the code provided in this Flash Tutorial you will find that the headers of you email are properly formatted. That means the your email will actual say the name of an email not just some strange ip address. Better yet your headers are properly formatted so you can simply click the reply button.
How to make a flash contact form
Sample of the full Flash CS3, CS4 Tutorial
Read the full tutorials at FrenchSquared, Flash Tutorials
First create a variable for the visitors email.
var validmail:uint = 0;
Flash cannot send an email on its own so you are going to need some php. Before we go over the php we need to get the flash done. For now, copy the code below into the first actions keyframe. This code creates several variables that are going to be used to pass data to the php emailer.
var variables:URLVariables = new URLVariables();
var varSend:URLRequest = new URLRequest("sendEmail.php");
var varLoader:URLLoader = new URLLoader;
varSend.method = URLRequestMethod.POST;
varSend.data = variables;
Add the event listener to make the submit button actually do something. Then add an event listener that does something when the data is pulled from the php emailer.
submit_btn.addEventListener (MouseEvent.CLICK, sendActions);
varLoader.addEventListener (Event.COMPLETE, loadComplete);
Ok, so lets make the text filed more useful by passing a set of parameters. A parameter is a quantity or value that defines a certain characteristic of the function. It will make scene as we continue. Return to the actions panel and modify the text already in-place. See Example
function textArea(parameter:String){
var myText:TextField = new TextField();
myText.text = parameter;
this.addChild(myText);
};
textArea("this is a parameter");
This next bit of code looks intense so just take you time and work through it. This is the function for the send button. It isn't that intense it just checks to see if the is a correct email before sending the variable to the php emailer.
Read the full tutorials at FrenchSquared, Flash Tutorials
First create a variable for the visitors email.
var validmail:uint = 0;
Flash cannot send an email on its own so you are going to need some php. Before we go over the php we need to get the flash done. For now, copy the code below into the first actions keyframe. This code creates several variables that are going to be used to pass data to the php emailer.
var variables:URLVariables = new URLVariables();
var varSend:URLRequest = new URLRequest("sendEmail.php");
var varLoader:URLLoader = new URLLoader;
varSend.method = URLRequestMethod.POST;
varSend.data = variables;
Add the event listener to make the submit button actually do something. Then add an event listener that does something when the data is pulled from the php emailer.
submit_btn.addEventListener (MouseEvent.CLICK, sendActions);
varLoader.addEventListener (Event.COMPLETE, loadComplete);
Ok, so lets make the text filed more useful by passing a set of parameters. A parameter is a quantity or value that defines a certain characteristic of the function. It will make scene as we continue. Return to the actions panel and modify the text already in-place. See Example
function textArea(parameter:String){
var myText:TextField = new TextField();
myText.text = parameter;
this.addChild(myText);
};
textArea("this is a parameter");
This next bit of code looks intense so just take you time and work through it. This is the function for the send button. It isn't that intense it just checks to see if the is a correct email before sending the variable to the php emailer.
Read the full tutorials at FrenchSquared, Flash Tutorials
List of Great Flash and CSS Tutorials
Flash and CSS Tutorials
- Flash Tutorial, Contact Form
- What good is a website without a contact form? and what professional website doesnt have a professional contact form. In this Flash Tutorial you will learn how to create yoour own email form.
- Flash Tutorial, Loops
- Flash tutorials covering loops, for loop, do loop and the while loop
- Flash Tutorial, Hit Test
- What good is a flash game if you cant detect collisions. In this Flash Tutorial I will show you how to use hitTest to detect when objects collide.
- FrenchSquared, Flash Tutorials
- Flash Tutorials is here to provide you with a great set of How To Guides for Programming with ActionScript.
- CSS, How To
- Great Blog Dedicated to sharing great CSS Tutorials and How To Guides.
- CSS, How to Hide Styles from Older Browsers? | Css, How to
- Some older browsers, such as Netscape Navigator 4 and IE 4, have poor support for CSS. It is possible to hide styles from these browsers using specific media types and @import rules.
- CSS, How to use External Style Sheets! | Css, How to
- The third method of applying styles to document involves linking to external style sheets. External style sheets are the most appropriate method for styling documents. If styles need to be changes, the modifications can take place in one CSS file rather than all HTML pages.
Sample CSS Tutorials and How to Guides
Great CSS Tutorials
Fetching RSS feed... please stand byFlash and CSS Tutorials on Twitter
Check out Gordon's tweets on Flash and CSS

- aka Twitter
- 0 followers
- 0 following
-
- An Open Appeal to Steve Jobs: http://digg.com/d31ARUx?t
-
- The maker of iFart is sending a message to Steve Jobs and Apple: http://digg.com/d31ARUx?t
-
- @aionsupport cant conect to my server? Whats up?
-
- @facebook, My profile has been under site maintenance for over 72hours. Am I ever going to be able to login again?
-
- Mastering CSS: CSS, How to work with content areas. http://bit.ly/ioa6W
powered by Twitter
by FrenchSquared
Gordon French is a Flash Programmer and Flash Designer. Check out My site at
Gordon French
Flash Tutorials
F2-4Kids.com.com
IT Admin
CSS How To (more)
Gordon French
Flash Tutorials
F2-4Kids.com.com
IT Admin
CSS How To (more)





