I love mx Navigators (ViewStack, TabNavigator etc.) yet when adding spark containers to them you get the error…
The children of Halo navigators must implement INavigatorContent.
If you want to use the new spark containers you need to wrap them in, or just use spark.components.NavigatorContent (not easily found unless your using design view). NavigatorContent itself extends spark.components.SkinnableContainer so you can use it much like a Group and set a custom layout.
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"> <s:layout> <s:VerticalLayout/> </s:layout> <mx:ViewStack id="vs" width="400" height="200"> <s:NavigatorContent width="100%" height="100%" backgroundColor="0xFF0000"> <s:layout> <s:VerticalLayout/> </s:layout> <s:Button label="vertical button 1"/> <s:Button label="vertical button 2"/> <s:Button label="vertical button 3"/> </s:NavigatorContent> <s:NavigatorContent width="100%" height="100%" backgroundColor="0x0000FF"> <s:layout> <s:HorizontalLayout/> </s:layout> <s:Button label="horizontal button 1"/> <s:Button label="horizontal button 2"/> <s:Button label="horizontal button 3"/> </s:NavigatorContent> </mx:ViewStack> <mx:ToggleButtonBar dataProvider="{vs}"/> </s:Application>

[...] 来源页面: http://www.tink.ws/blog/using-spark-containers-in-mx-navigators/ [...]
Thx, that’s exactly the tip I was looking for
thnks its helpful very much
Thanks for the tip.
By the way, are you of African decent. I was wondering because of the black faced fellow you have at the top of your sight.
Nah thats me doing this
Hi
abobe sample code is not working for flex mobile project. How to create a spark-based ViewStack .
Thanks
Brij Kishor
What error do you get with the above code?
Also have you looked at using a navigator instead?
http://www.tink.ws/blog/flex-4-navigator/
Precise answer that i was looking for