Hi,

I have a viewstack of a few of my own components. When the viewstack 
is changed, I want to run a init() function located in the 
selectedChild component. Anyone knows what to do? I have 
tried "viewstack.selectedChild.init();" but it doesnt work.

<mx:Script>
     <![CDATA[
        public function onViewChange():void {
             appVS.selectedChild.init();
        } 
     ]]>
</mx:Script>

<mx:ViewStack id="appVS" right="10" left="10" bottom="10" top="30" 
change="onViewChange();">
        <views:Welcome id="view0"/>
        <views:NewBransletyp id="view1"/>
        <views:ChangeBransletyp id="view2"/>
</mx:ViewStack>

Please advice!

Thanks,

/Per

Reply via email to