Form submitting using flash

Form submitting using flash
1. First we create a three text fields like (Name,Email,Address),for address we choose the text area for multiple lines. Give the instance name for the text,text area fields (name1,email,address1)

2. Create new key frame on 10 lable it success & create 20 th key frame label it Error

3. On that keyframes give the success messagein 10th key frame & error message on 20th key frame

4. After that we add the button for submitting the form.(Create the button for submit & give the instance name as send_btn)

5. Create new layer name it Action script , in this layer create the loadvariable for sending the values to server(php,.Net.), retrieve the data in server
var sendLoad:LoadVars = new LoadVars(); // send the values to php
var recLoad:LoadVars = new LoadVars(); // retrieve the values

send_btn.onRelease = function() {
formSend();
}
function formSend() {
sendLoad.name1 = name1.text;
sendLoad.email = email.text;
sendLoad.message1 = message1.text;
sendLoad.sendAndLoad(“mail.php”,recLoad); }

Finally we create the php file to send mail For exp : In this sentOk is to send the message (mail send success or any error) And add this code in flash
recLoad.onLoad = function() {
if(this.sentOk) {
_root.gotoAndStop(“success”);
}
else {
_root.gotoAndStop(“erorr”); }
}
For checking success message or error message

Advertisements

Posted on November 18, 2009, in Flash and tagged . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: