Posts Tagged ‘Flash and php Contact us form’

Easy to use Flash AS3 Contact Us form class

Thursday, September 3rd, 2009

I have created a new easy to use Flash AS3 Contact Us Class. This clas creates all the required elements of a flash contact us form like Name, Email, Subject, Message Input fields and Submit and Reset buttons. On backend I am using php script to post the flash email form data to server. Here is the sample code how to create an instance of this class and your contact us form is ready with minimum efforts. Below I will show you how to use this code to create the dynamic contact us form.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
package{
import classes.*;
import flash.display.*;

public class main extends Sprite{
public var contactForm:ContactUsForm;

public function main(){
contactForm=new ContactUsForm(400,450);
addChild(contactForm);
contactForm.x=100;
}
}
}

This Action Script code is free and available to download below but  you need to do few things before it can be fully functional according to your requirement.

1. Edit the send_email.php file and change $receiver variable and put your email id there.

2. Or you can change the send_email.php file path in ContactUsForm to point it to the folder wher you upload php file.

3. Make sure send_email.php is in same folder as the contact us form swf  is on server.

And your contact us form ready:

Soure Code Download

Enjoy!

M