In this tutorial I will try to help you solve a problem of Who Should address the creation of aform via Flash.The creation of thisform provides a component made in Flash and PHP scripts.Since we know That Flash alone can not interact, we will help with the support of a simple PHP script.The lesson is Divided into 5 points know That There Will Be Easier To Understand how it ...
1)Open a blank document and begin to create 4 fields of text input.Give each field name "resort" that will recognize the script of the movie within the field order. Give an instance name as the first fieldname, second fieldSurname third fieldEmail fourth fieldinquiry.Now create a button for sending 'emails and give instance name
2)Then insert a blank frame in the following Action Script, making sure to replace your url of the script with your data where you see that the code is written inbold:
pulsInvio.onRelease = function () ( var Sendmail: LoadVars = new LoadVars (); sendMail.nome = Nome.text; sendMail.cognome = Cognome.text; sendMail.mittente = Email.text; sendMail.richiesta = Richiesta.text; sendMail.destinatario = 'destination email messages'; sendMail.onLoad = function (success) ( if (success) ( Nome.text =''; Cognome.text =''; Email.text =''; Richiesta.text =''; mcMsg.mcTxt.txtMsg.text = this.controllo; mcMsg.play (); ) ) sendMail.sendAndLoad ('url php script that generates the email, 'sendmail' POST '); )
As you can see the followingAction Scriptis very simple to understand, now I will explain generally how it works: First insert the action 'stop' to stop the 'time line', then write the name of 'instance of the Send button since the' Action Script revolves around it, alongsideas you can see there is actionon Releaseused to communicate to the button to release the mouse on it must start the action. After that we create a new variable we callSend Mailso that once the recall action withsend And Loadthis bringing together all the field names and sending input to the script which will then send the email to our mail. Now where is the actionsending Mail? In destinationinsert our email, while the last action type the URL where the script is located within our site preferably is located in the same folder where the flash movie.
3)Now we proceed with creating a script worthy FIRST SECOND functions and is easy to guess.Open the common Windows Notepad and write the following code and then save it with the nameemail. php.This too is quite simple enough to understand that you have a minimum basis of php that will be easy to read and understand: