Flex: View Stack Navigator

Posted by Deena on Stack Overflow See other posts from Stack Overflow or by Deena
Published on 2010-05-10T15:17:05Z Indexed on 2010/05/10 15:34 UTC
Read the original article Hit count: 394

Filed under:
|

Hi, I have a component mxml file in which i have a view stack, on click of a button i navigate to the first child, now i need to navigate to the second child during onclick of a button present in the second child. All the childs are component files included within the view stack. How could this be done, Sample code is present below,

--------------------Application.mxml---------------------

<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" >
    <mx:Script>
        <![CDATA[
             private function loadScreen():void
             {
                navigationViewStack.selectedChild=id_offering;  
             }
        ]]>
    </mx:Script>

     <mx:Button label="Save" click="loadScreen();"/>

 </mx:Canvas>

<mx:ViewStack id="navigationViewStack"  width="100%" height="100%">
    <components:dashboard   id="id_dashboard" label="Dashboard" />
    <components:offering   id="id_offering" label="Offering" />
    <components:IssueSec id="id_issueSec" label = "Issues"/>
</mx:ViewStack>

-------------------------Ends--------------------------------------

Now in my offering.mxml file if i try to access navigationViewStack i am getting an error stating 'Access of undefined property navigationViewStack.

Help me on how to access the view stack from my component mxml file.

Thanks!

Cheers, Deena

© Stack Overflow or respective owner

Related posts about flex

Related posts about viewstack