I want to control a the selectedIndex of a number of different accordions from a single control (e.g. a VSlider).
Using the example at http://blog.flexexamples.com/2007/09/17/programmatically-changing-a-flex-accordion-contain ers-selected-index/, I've got a single VSlider controlling a single accordion ("mainhaccordiona"), using the code below. I'd like to control four accordions (mainhaccordiona, mainhaccordionb, mainhaccordionc, and mainhaccordiond) from the single VSlider.
My ultimate goal is to set up both a "reset" function (open all panels at selectedIndex = 0) and also a randomizer (each selectedIndex is set to a random value within each accordion's range).
Does anyone have any tips or is there an example already out there on the web that I've missed?
private function init():void
slider.maximum = mainhaccordiona.numChildren -1;
slider.labels = [0, slider.maximum];
private function dataTipFunc(item:Object):String
return "selectedIndex = " + item.toString();
<mx:ApplicationControlBar dock="true" fontSize="8">
change="mainhaccordiona.selectedIndex = event.value;"