I have an Air application that has in it:
<mx:VBox>
<mx:ViewStack id="vs">
<mycomp:Elist id="elist"/>
<mycomp:Achart id="achart"/>
<mycomp:Txy id="txy"/>
</mx:Viewstack>
<mx:Text id="info" htmlText="{compinfo}"/>
</mx:VBox>
Where each "mycomp" is a MXML component I created. Each component is different but each contain a property: public var infotxt:String;
I wish to set the text of the "info" text component to the value of the selected mycomp. A timer changes the vs.selectedIndex periodically.
I've tried something like this in the timer event handler:
compinfo = vs.selectedChild.infotxt;
which yields me an "access of possibly undefined property infotxt through a reference with static type mx.core:Container.
What is the right way of doing this? I know I could move the text component to the child, but it seems like there should be a way of doing this.
Thanks in advance... TB