Please take a look at a segment of my Flex code:
<mx:Accordion id="accordian" width="100%" height="326" selectedIndex="0">
<journal:ResearchJournalSection id="researchSection" width="100%"/>
<journal:QuestionJournalSection id="questionSection" width="100%"/>
<journal:DesignJournalSection id="designSection" width="100%"/>
</mx:Accordion>
<mx:Panel width="100%" height="129" layout="absolute" title="FAQ Area">
<mx:Text x="0" y="10" text="What is a research question?
" width="250
height="20" fontWeight="bold"/>
</mx:Panel>
what it does is showing three journals(Research,Question and Design),also showing a FAQ question panel beneath.
Currently the FAQ Panel always shows “What is a research question”,but I want to make it shown things that corresponding to what journal the user is currently selecting,so for example,if the user now clicks on “Design Journal”,then the corresonding text in the FAQ area should read “What is importat about Design?”.
Hope I make things clear,thanks in advance!
My Flex is a little rusty, but you should be able to add an
change="myFunction()"attribute on the Accordion pointing to an Actionscript function:The function should be put in a script tag inside the mxml file.