• home
  • forum
  • my
  • kt
  • download
  • Flash/PHP Email Form

    Author: 2009-07-14 09:33:28 From:

    1. Create the necessary labels...
    You will need labels for the Title, Full Name, Email, and Message

    2. Create 3 input texts and set the variables to fullname, email, body.
    Make sure you set the variable form field to those names, not the name of the movie clip. This will be important later for sending the variables to PHP...

    3. Select the 3 input texts you created and Convert To > MovieClip. Name the instance mail_form.
    This time make sure after you convert it, you name the <instance name> mail_form, not the variables, and not the name of the object.

    4. Add code to the mail_form movie clip.
    	onClipEvent(data){
    		_root.gotoAndStop(2);
    	}
    

    5. Create a Submit button at the bottom and add the following code to it.
    	on(release){
    		_root.mail_form.loadVariables
    		("http://www.yoursite.com/email.php",
    		"POST");
    	}
    

    6. Create a second frame and insert a Dynamic Text: variable field to mail_form.success.
    After you do this, go back to the first frame and add stop(); so it doesn't automatically head to the second frame before you press the submit button.

    7. Add the code to email.php so grab the flash variables and return if it works or if errored.
    You may download the source code from the files below to get the php file since it is kind of long.

    Download the Source Files

    discuss this topic to forum

    relation tutorial

    No information

    Category

      3D (36)
      Math Physics (18)
      3rd Party (10)
      Navigation (70)
      Actionscripting (248)
      Optimization (17)
      Animation (185)
      Projector (11)
      Audio (54)
      Special Effects (173)
      Backend (26)
      Text Effects (93)
      Drawing (34)
      Tips and Techniques (58)
      Dynamic Content (38)
      Tricks (8)
      Games (114)
      Utilities (24)
      Getting Started (99)
      Video (59)
      Interactivity (48)
      Web Design (37)

    New

    Hot