The following code is solution to a problem where you need to make the accordion component’s MouseOver event to behave like a click event. The code will work only in the case if you have not given the names to the AccordionHeader explicitly. Check the solution out here <?xml version=”1.0″?> <mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml”> <mx:Script> <![CDATA[ public function onMouseOver(evt:MouseEvent):void{ var strName:String = evt.target.name; var strLen:int = String("_header").length; if(strName.indexOf("_header") > -1){ accordion.selectedIndex = int(strName.substr(strLen,strName.length)); } } ]]> </mx:Script> <mx:Panel title=”Accordion Container Example” height=”90%” width=”90%” paddingTop=”10″ paddingLeft=”10″ paddingRight=”10″ paddingBottom=”10″> <mx:Label width=”100%” color=”blue” text=”Select an Accordion navigator button to change the panel.”/> <mx:Accordion id=”accordion” width=”100%” height=”100%” mouseOver=”onMouseOver(event)” > <!– Define each panel using a VBox container
Read the original:
Replicating click Event on a MouseOver event in Flex Accordion
