Integrating Flash with Web Applications > Creating forms > Creating a search form

Creating a search form

An example of a simple form is a search field with a Submit button. As an introduction to creating forms, the following example provides instructions for creating a search interface using a getURL action. By entering the required information, users can pass a keyword to a search engine on a remote Web server.

To create a simple search form:

1 Create a button for submitting the entered data.
2 Create a label, a blank text field, and an instance of the button on the Stage.
Your screen should look like this:
3 Select the text field and choose Window > Panels > Text Options.
4 In the Text Options panel, set the following options:
Choose Input Text from the pop-up menu.
Select Border/Bg.
Specify a variable name.
Note: Individual search engines may require a specific variable name. Go to the search engine's Web site for details.
5 On the Stage, select the button and choose Window > Actions.
The Object Actions panel appears.
Note: A check next to Actions in the Window menu indicates the panel is open.
6 Drag the getURL action from the toolbox to the Script window.
7 In the Parameters pane, set the following options:
For URL, enter the URL of the search engine.
For Window, select _blank. This will open a new window that displays the search results.
For Variables, select Send Using GET.
8 To test the form, choose File > Publish Preview > HTML.