• Home
  • About Me
  • AIR Central
  • AS3 Libs
  • Books
  • Flex Central
  • Resources
  • The Guru's
  •  

    Accordion with Icons

    March 29th, 2007

    accordioniconsimg.jpg

    I built this component to allow an icon to be added to each Accordion Header where the icon is dependent on the current state of the Accordion. There are 3 possible states that are tracked, up, down, and selected. The upIcon is displayed whenever the pane is above the selected pane. The downIcon is displayed whenever the pane is below the selected pane. The selectedIcon is displayed when pane is the selected pane. See the image below.

    accordioniconsdiagram.png

    Sample Syntax (Basic with default icons):

    1. <eflex:AccordionIcons>
    2. <mx:Canvas label=”Canvas”/>
    3. <mx:VBox label=”VBox”/>
    4. <mx:HBox label=”HBox”/>
    5. </eflex:AccordionIcons>

    Sample Syntax (Advanced with custom icons and selectedIndex):

    1. <eflex:AccordionIcons
    2. upIcon=”@Embed(source=’assets/icons/arrowUp2.gif’)
    3. downIcon=”@Embed(source=’assets/icons/arrowDown2.gif’)
    4. selectedIcon=”@Embed(source=’assets/icons/arrowSelected2.gif’)height=”200
    5. selectedIndex=”1>
    6. <mx:Canvas label=”Canvas”/>
    7. <mx:VBox label=”VBox”/>
    8. <mx:HBox label=”HBox”/>
    9. </eflex:AccordionIcons>

    Run this demo

    View/Download Source

    Docs