Creating Forms in Flash
Posted On July 9, 2007 by Paresh Jain Language:
This tutorial will show you how to create a simple form in Flash.
What we have to do is create one form and several fields called Name, Homepage, email, Comments, and the buttons Send and Clear.
The Text Fields
To create these fields we'll use the Text Field button. But first hit the Text Tool button. After selecting Text Field, draw your text box and place the label "Name:" on the left side of the Text box.
At this point you could turn the text box into an object by selecting it and choosing
Insert> Convert to Symbol or just press F8. However for the purpose of this tutorial we'll keep it simple and just create a simple form.
Now right click on the Text box and select Properties.
In the Text Field Properties dialog box you will have to name your Text Field. Ensure that it's the same name you use in the html tag, variable>.
In the above picture we've just labeled the "Name" text field. Now repeat these steps to create the Text Fields, Homepage, email and Comments.
In the "Comments" field, select these two options listed above. "Multiline" will allow the user to press enter in the text field and continue adding text. "Word Wrap" will ensure that all the text added can be seen.
Create two buttons now, Send and Clear and place them in your form.
In the "Clear" button add the actions:
Set Variable: "name" = ""
Set Variable: "homepage" = ""
Set Variable: "email" = ""
Set Variable: "comments" = ""
In the "Send" button add the actions:
Load Variables ("http://www.developeriq.com/cgi-bin/myform.cgi", 1, vars=POST)