Macromedia flash mx 2004-learning flash User Manual
105
CHAPTER 14
Create a Form with Conditional Logic and
Send Data
You can create a form with conditional logic that allows the SWF file to respond in different ways,
depending on user interaction, and send the form data from the SWF file to an external source. In
this lesson, you will create a simple form as you complete the following tasks:
depending on user interaction, and send the form data from the SWF file to an external source. In
this lesson, you will create a simple form as you complete the following tasks:
•
Add an input text field to collect form data
•
Create a button symbol
•
Add a
stop()
action
•
Write a script that validates the form with conditional logic
•
Pass data out of a SWF file
•
Write a function
Before taking this lesson, you should be familiar with writing functions and variables; to learn
about these, select Help > How Do I > Quick Tasks > Create an Application.
about these, select Help > How Do I > Quick Tasks > Create an Application.
Set up your workspace
First, you’ll open the start file for the lesson and set up your workspace to use an optimal layout
for taking lessons.
for taking lessons.
1.
To open your start file, in Flash select File > Open and navigate to the file:
■
On Windows 2000 or XP, browse to boot drive\Documents and Settings\All Users\
Application Data\Macromedia\Flash MX 2004\language\Configuration\HelpPanel\
HowDoI\BasicActionScript\start_files and double-click simpleForm_start.fla.
Application Data\Macromedia\Flash MX 2004\language\Configuration\HelpPanel\
HowDoI\BasicActionScript\start_files and double-click simpleForm_start.fla.
Note: If the Application Data folder is hidden, you’ll need to change your Windows Explorer
settings to see the folder.
settings to see the folder.
■
On Windows 98, browse to boot drive\Windows\Application Data\Macromedia\Flash MX
2004\language\Configuration\HelpPanel\ HowDoI\BasicActionScript\start_files and
double-click simpleForm_start.fla.
2004\language\Configuration\HelpPanel\ HowDoI\BasicActionScript\start_files and
double-click simpleForm_start.fla.
■
On Macintosh, browse to Macintosh HD/Users/Shared/Application Support/Macromedia/
Flash MX 2004/language/Configuration/HelpPanel/HowDoI/BasicActionScript/start_files
and double-click simpleForm_start.fla.
Flash MX 2004/language/Configuration/HelpPanel/HowDoI/BasicActionScript/start_files
and double-click simpleForm_start.fla.