FlashVault.net
  Active TopicsActive Topics  Display List of Forum MembersMemberlist  CalendarCalendar  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
User submitted tutorials
 FlashVault Forum :Flash :User submitted tutorials
Message Icon Topic: Flash Form using PHP Post Reply Post New Topic
Author Message
benjezza
Groupie
Groupie
Avatar

Joined: 30 Jul 2007
Online Status: Offline
Posts: 81
Quote benjezza Replybullet Topic: Flash Form using PHP
    Posted: 04 Jun 2008 at 6:38am

With this tutorial you will learn to create an online flash form using PHP coding to send the data... there is no knowledge of php needed as the code is included… I must state though, I created this from the internet a while ago and cannot find where I got it from… Naveen has created a good flash form tutorial with validation on this forum check it out also!!!

I WILL POST THE SOURCE AS SOON AS I CAN FIND IT – I PROMISE!!!

Step 1

Open flash and create a new document

Step 2

Select the text tool and create a text box on the stage… don’t stress too much about the size or position of the box at this stage we will fix it later!!!


In the properties box, change the text “static text” property to “Input text” and give it a variable of “name”… also, make sure that the colour of the text is black and that you click the “Show Border aroung Text” button…


Step 3

Copy steps 1 and 2 until you have four input text boxes on the stage… give a variable of “phone”, “email”, and “comments” respectively… your stage should look like this…


Step 4

Now it is time to resize and position the input boxes to your liking… select a box and in the “info properties” make each box the same width… for this tutorial I am making them 250 each… you will then have to position them as you please… a little bit of mucking around but well worth the professional finish (use the selection tool for this)… my stage looks like this… it doesn’t really matter as you can make it look anyway you like!!!


Step 5

Using the text tool add text to the stage “Name”, “Phone”, “Email”, and “Comments” and align them respectively with the input boxes you gave the variable to… make sure that they are “static text” AND NOT “input text”

Step 6

Clicking the stage and pressing Ctrl + A (or using the selection tool) select everything on the stage!!! Press F8 to create a symbol, select movie clip and name it “form mc” (you can also right click and “convert to symbol”)… click OK…

Select this movie click and give it an instance name of “form” in the properties box!!!

Step 7

Create a button or use the buttons that flash provides ( Window menu -> common libraries -> buttons) and place it near the bottom of the form… I am using the provided button in the “buttons rect bevel” folder – rect bevel aqua!!! Just drag the provided button onto the stage where you would like position it!!!

Step 8

Select the button and add the action script to the button…

on (press) {

                form.loadVariables("email.php","POST");

}

Step 9

You have now created the form that will work with the email.php provided below (we will get to changing that in a minute)… first we will work on a little bit of animation so that the people who are entering their details will know that the data has been sent… this is important so that they don’t continuously click the enter button numerous times and send the email over and over again… so, let’s get to it…

Create a new layer and name it “actions”… you should have two layers now – “actions” and “Layer 1” (you can change the layer 1 name to be whatever you like but for this tutorial I will leave it – mainly because I’m lazy and have already taken the screen shots… LOL)… on the first frame of “actions” layer add the action script:

stop(); 

(this can easily be done by pressing Esc + S + T)



 

Step 10

On the first frame of “Layer 1” layer… select the “form mc” movie clip and open the actions panel… Add the action script:

onClipEvent (data) {

                _root.nextFrame();

}

Step 11

Select the second frame of “Layer 1” layer right click it and create a “New Keyframe” (you can also go through the menu – Insert -> Timeline -> Keyframe)

Then, with the second frame select on Layer 1 delete everything on the stage and add the text:

Your details have been submitted… I will be in contact with you at my earliest convenience (or whatever you would like to say!!!)

Step 12

Select the second frame of “actions” layer, right click it and create “New Keyframe”… open the actions properties and add the action script:

Stop();

We are now complete with the flash form… ON TO THE PHP FILE!!!

Download the source files below before we go on!!! I got the email.php from the following site:

<a href="http://www.thesitewizard.com/php/index.shtml" target="_top">Free PHP Tutorials and Scripts</a>

 PROPS TO THEM!!!

Open email.php – I am assuming that you have a program to do this – if not NOTEPAD++ is a good code editing program and its FREE get it here

(Disclaimer - I have absolutely no affiliation with NOTEPAD++ or its creators. Please don’t ask me any question about it!!! )

OK… after all that is said…

In the email.php scroll down and make the following changes:

$mailto = 'YOUR EMAIL ADDRESS GOES HERE' ;  (Change this to be your email address!!!)

$subject = "SUBJECT OF THE EMAIL YOU WILL RECIEVE GOES HERE" ; (Change this to be the subject of the email that you will receive)

THAT IS IT!!! You have now created your very own flash form using PHP…

All you have to do now is change the colouring to suit your needs and save the flash document as form.fla and publish it as form.swf… you then add it to your website and upload all the files to the SAME directory as the web page (this is a must!!!)

 

 

Download Source files here…

IP IP Logged
konetch
Groupie
Groupie
Avatar

Joined: 15 May 2009
Online Status: Offline
Posts: 34
Quote konetch Replybullet Posted: 18 May 2009 at 10:25pm
Great tutorial. I believe that learning how to set up a mail form on flash is one of the best things to learn when you first start. Although I already knew how to do this for those people who don't listen to him because he knows what he's talking about.


Alex
IP IP Logged
hanxuefei
Newbie
Newbie
Avatar

Joined: 13 Jul 2010
Location: &#32654;&#22269;
Online Status: Offline
Posts: 14
Quote hanxuefei Replybullet Posted: 13 Jul 2010 at 7:38am
DVD to iPad Converter is an all-in-one dvd to ipad converter, which can help you convert dvd to ipad with just a few simple clicks, please feel free to download it and have a wonderful try!
AVI to iPad Converter
FLV to iPad Converter
IP IP Logged
jingjia1989
Newbie
Newbie


Joined: 23 Jun 2010
Online Status: Offline
Posts: 14
Quote jingjia1989 Replybullet Posted: 14 Jul 2010 at 3:51am

123
iPad Converter provides powerful and professional functions. With this iPad software pack, you can rip any DVD files (DVD-Video, DVD folder and DVD IFO file) to iPad. Also you can convert all popular videos/audios to iPad formats. While the iPad Transfer realizes files transfer from PC to iPad, from iPad to PC and from iPad to iPad.
iPad to PC Transfer
iPad to Computer
iPad to iTunes
iPad Video to PC
AVI to iPad Converter  
WMV to iPad Converter
FLV to iPad Converter
DivX to iPad Converter
MTS to iPad Converter  
M2TS to iPad Converter   
Blu-ray to iPad

 

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Bulletin Board Software by Web Wiz Forums version 8.04
Copyright ©2001-2006 Web Wiz Guide

This page was generated in 0,156 seconds.