This will get you started:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>
  <mx:Script>
    <![CDATA[
      private function nextHandler():void{
        if(accordion.selectedIndex == accordion.numChildren-1){
          accordion.selectedIndex = 0;           
        }else{
          accordion.selectedIndex++;
        }           
      }
    ]]>
  </mx:Script>
  <mx:Accordion id="accordion" width="500" height="500">
    <mx:Panel id="one" width="100%" height="100%" label="One">
      <mx:Label text="Panel One"/>
    </mx:Panel>
    <mx:Panel id="two" width="100%" height="100%" label="Two">
      <mx:Label text="Panel Two"/>
    </mx:Panel>
    <mx:Panel id="three" width="100%" height="100%" label="Three">
      <mx:Label text="Panel Three"/>
    </mx:Panel>
    <mx:Panel id="four" width="100%" height="100%" label="Four">
      <mx:Label text="Panel Four"/>
    </mx:Panel>
  </mx:Accordion>
  <mx:Button label="Next Panel" click="nextHandler()"/>
</mx:Application>


--- In flexcoders@yahoogroups.com, "christophe_jacquelin" 
<christophe_jacque...@...> wrote:
>
> Hello,
> 
> Inside an accordion Panel, how to open the other panel of the accordion by a 
> click on a button ? 
> 
> Thank you,
> Christophe,
>


Reply via email to