First time here? First time here? Newsletter Signup Newsletter
651326 Members and growing! | Flash Jobs
Search tutorials
Author: Chris Falkenstein | Website: http://

Step 6: Adding Action Scripting to the Submit Button


Right click on the layer call "Buttons". In the menu that appears select Lock Others. This will allow us to focus on just the buttons.

Right click on the submit button at the bottom right hand side of the form. Select Actions in the menu that appears. This will open your Actions Panel. Click on the "+" sign at the top left hand side of the panel. Select Actions, set variable. This will insert some code into your Actions panel. In the field titled Variable type in "subject". In the field titled Value enter "Feed Back Form". You can give the Value field anything you want. This is the subject that will appear in email that the form sends.

Click on the "+" again and Select Actions, set variable to insert another variable. Type in "recipient" for the field titled Variable. Type in your email address for the field titled Value. This is where you tell the cgi script where to email the form results. Setting variables here is like creating hidden form fields in HTML.

The cgi script now knows what the subject is and who to send the results to, but we still have to tell Flash to send the field values that the user fills out (FirstName, LastName, ect.). For this we use the loadVaribles action.

Click on the "+" sign. Select Actions, loadvariables. In the field titled URL type in the web address of the form to mail script that your using. Leave the Location field to 0. Select "Send using GET" from the Variables pull down menu.

All right, now we're gettin' somewhere. When the user selects the submit button we not only want the information sent to us via email, but we want to thank our users for the feed back. So after the variables are loaded, which we just did, we want to send the user to the personal thank you frame.

Click on the"+". Select Basic Actions, Go to. The Go to code will be inserted into the Actions panel. Leave the the Scene field to <current scene>. Select Frame Label from the Type pull down menu and type in "ThankYou" in the field titled Frame. "ThankYou" is the name of the frame we will be creating very soon.

When we select our submit button and take a look at the Actions panel our code should be similar to the image above. It's important that the code is in the above order. If something is out of order you can use the up or down arrows at the top right hand side of the Actions panel to move the code up or down a level.

» Level Intermediate

Added: 2001-02-26
Rating: 7.94 Votes: 201
(10 being the highest)
» Author
No details available.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.