Ultrashock Tutorials > Flash MX 2004 > Flash MX 2004 UI Components  
 
by Aral Balkan,  BitsAndPixels.co.uk 
Download Source Files (5MB!)  
 
Flash MX 2004 UI Components
 

 01. v1 Components, We Hardly Knew Ye 
 02. Button Component 
 03. Alert Component 
 04. Checkbox Component 
 05. Radio Buttons 
 06. The List Box family of Components 
 07. Date Chooser Component 
 08. Date Field Component 
 09. Label Component 

 10. Loader / Progress Bar Components 
 11. Numeric Stepper Component 
 12. Text Area/Input Components 
 13. Menu / Menu Bar Components 
 14. Scroll Pane Component 
 15. Window Component 
 16. Tree Component 
 17. Accordion Component 
 18. Conclusion 

Aral Balkan is co-author of
Flash MX Components Most Wanted.
Click to check it out at Amazon.com!
- discuss this tutorial -

17. Accordion Component

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.

  1. Create a new Flash Form Application document by selecting File -> New (Ctrl-N) and Flash Form Application from the list of supported documents types.



  2. Use the screenshot of the completed application, below, as a guide when following the instructions in the following steps.



  3. 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.



  4. Click on the application screen to select it (it's the root node in the form/screen navigator pane to the left.)

  5. Rename Layer 1 in its timeline to Accordion Component.

  6. 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.



  7. 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.

  8. Make sure all three of the forms are invisible. Set their visible parameters to false using the Property Inspector.



  9. Test the movie and click on the headers to show the various forms. You can play with the completed version, below.


- discuss this tutorial -
 
©2003 Ultrashock.com - All rights reserved