instead of vwChart.selectedIndex=0 make it vwchart.selectedChild=lgch . It will work
Thanks, with Regards, Jitendra Jain Software Engineer 91-9979960798 ----- Original Message ---- From: Craig <[EMAIL PROTECTED]> To: flexcoders@yahoogroups.com Sent: Saturday, June 28, 2008 10:00:53 AM Subject: [flexcoders] Help with ViewStack Event Listeners for Custom Components My Viewstack does not make custom components active (they do not show up with simple functions like this one... vwChrt.selectedinde x=0; vwChrt.selectedinde x=1; I suspect I need to add Event Handlers, and would like some guidance. My MXML code looks like this (shortened) - A viewstack surrounding two custom components (panels) <mx:ViewStack id="vwChrt" creationPolicy= "queued" > <mx:Panel id="lgCh" label="Long" width="100%" height="100% "> <comp:Charts id="Chart" creationPolicy= "queued"> </comp:Charts> </mx:Panel> <mx:Panel id="shCh" title="Short" width="100%" height="100% " > <comp:ShortsChrt id="ShortChart" creationPolicy= "queued"> </comp:ShortsChrt> </mx:Panel> </mx:ViewStack> I am not sure how to use the following event listeners. vwChrt.getChildAt( 0).addEventListe ner(FlexEvent. CREATION_ COMPLETE, getLong); vwChrt.getChildAt( 1).addEventListe ner(FlexEvent. CREATION_ COMPLETE, getShort); Can anyone offer any advice? Thank you in advance for any help. Craig