
Home
|


MACROMEDIA FLASH
Use editable text fields
In Flash, you can place interactive controls and editable text fields
inside symbols. In this section, you'll add basic data entry capabilities
to the TEXT - CONTACT symbol.
| 1 |
Double-click the icon for the TEXT - CONTACT symbol in the
Library to open the symbol for editing. |
| 2 |
Create a new layer in the Timeline and name it "Data
Entry." |
| 3 |
Select the first frame in the Data Entry layer in the Timeline. |
| 4 |
With the first frame in the Data Entry layer selected, click the
text tool and the Text Field modifier.
 |
| 5 |
Draw editable text fields for Name, Email, and Comment. |
|
Use the arrow tool to adjust the size and position
of the fields. It's not important at this point to get them
perfect. Notice that the square resize handle on an editable text
field is on the field's lower right corner. |
| 6 |
Using the arrow tool, select the Name text field and choose
Modify > Text Field to open the Text Field Properties dialog
box. |
| 7 |
Enter "Name" in the Variable box and click OK. |
|
Flash assigns the content entered in the editable
text field to the variable whose name you enter here. You can then
use the value of the variable in actions. |
| 8 |
Repeat steps 6 and 7 for the Email text field; name the variable
"Email." |
| 9 |
Repeat steps 6 and 7 again for the Comment text field; name the
variable "Comment", and click the Multiline and Word
Wrap options before clicking OK. |
 |
|
Add the Send button
Now add the Send button to the TEXT - CONTACT symbol.
| 1 |
Make sure that the first frame of the Data Entry layer is still
selected, and then drag an instance of the BUTTON - SEND symbol
from the Library window and place it just below the editable
fields.
 |
| 2 |
Double-click the instance of the BUTTON - SEND symbol to open
the Instance Properties dialog box. |
| 3 |
On the Actions tab, click + (plus) and choose Get URL from the
pop-up menu. |
| 4 |
Type a URL in the box on the right, choose Send Using GET from
the Variables pop-up menu, and then click OK.
 |
|
This sends the contents of all variables (the text
entered in the editable fields) to the URL you specify. In a real
application, you would need to create a valid CGI script at the
URL location to receive the information, but for learning purposes
you can enter any URL and it won't matter if there is no CGI
script. |
|
At this point, you are done creating symbols for
the movie. You're now ready to use the symbols you've created in
the main movie. |
|
 |