The
accordion component is a container control that comes from the Tab Control
family. A good example of an Accordion control in a GUI application is
the one in Outlook, used to organize your favorites. In the next example,
you will see how to use the Accordion in conjunction with forms without
any programming.
Create a new Flash Form Application document by selecting File
-> New (Ctrl-N) and Flash Form Application from the list of
supported documents types.
Use the screenshot of the completed application, below, as a guide
when following the instructions in the following steps.
Use the Insert Screen icon to add a new form to your application.
It will get added with the default name of form1. Click on the Insert
Screen icon twice more to create two more forms; form2 and form3.
Click on the application screen to select it (it's the root node
in the form/screen navigator pane to the left.)
Rename Layer 1 in its timeline to Accordion Component.
Drag an instance of the Accordion component on to the Stage and set
its parameters as shown in the figure below. The childLabels property
determines the label used in the Accordion's headers. The childNames
property determines the instance names the component gives the content
clips it creates and the childSymbols parameter is where you specify
which forms to load into the content clips.
Place a Static Text field in each of the forms. To do this, first
select the form and then use the Text tool to enter some text to visually
differentiate the contents of each of your three forms. In the screenshot
above, the text reads "Form 1" for form1, "Form 2"
for form2 and "Form 3" for form3.
Make sure all three of the forms are invisible. Set their visible
parameters to false using the Property Inspector.
Test the movie and click on the headers to show the various forms.
You can play with the completed version, below.