ViewStack Code:
==================
……
<mx:ViewStack id="viewstack1" width="100%" height="100%">
<custom:No1View id="No1View"/>
<custom:No2View id="No2View"/>
<custom:No3View id="No3View"/>
</mx:ViewStack>
……
Custom Component Code:
==================
……
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Button label="Show Next ViewStack" click="this.parentApplication.viewStack1.selectChild =
this.parent.viewStack1.No1View;"/>
<!–
or try this code:
parentApplication.viewStack1.selectedChild =
parentApplication.No1View;
–>
</mx:Canvas>
……
Like this:
Be the first to like this post.