0
var viewStack:ViewStack = new ViewStack();
viewStack.percentWidth = 100;
viewStack.percentHeight = 100;
viewStack.addChild(canVas1);
viewStack.addChild(canVas2);
viewStack.addChild(canVas3);
lb = new LinkBar();
lb.dataProvider=viewStack;

Its only displaying canVas3 contents not canVas1 and canVas2

thanks

Michael Brewer-Davis
  • 14,018
  • 5
  • 37
  • 49
Bruno
  • 1
  • 1

1 Answers1

1

I think that's what it's supposed to do. It just puts components one on top of the other like a deck of cards, with the topmost (last added) being visible. Check this out.

NG.
  • 22,560
  • 5
  • 55
  • 61
  • Thanks Michael, I know its shows in the form of deck, but when you addChild let say Area1, Area2 and Area3 its showing me only Area3 and nothing in Area1 and Area2. – Bruno Mar 11 '10 at 14:47
  • To see the other areas, you need to change the selected index on the viewstack. Look at the example I linked in the answer. You can only see one of the areas at a time. – NG. Mar 11 '10 at 14:50
  • Hey SB, Can you please send the link again I dont see it in answer. – Bruno Mar 11 '10 at 15:52
  • I am trying to do it in ActionScript, the viewstack is a dataprovider to linkBar, and viewstack has multiple canvas and only the last is visible.Am I missing something to add in here. Where would I add viewStack.selectIndex? var canV_brand:Canvas = new Canvas(); canV_brand.label = "Canvas1"; canV_brand.addChild(hBox1); Same viewstack I mention in the question earlier – Bruno Mar 11 '10 at 17:22
  • try viewStack.selectedIndex=1; in your code - you can change it to whatever you want depending on which one you want to see. YOU CAN ONLY SEE ONE AT A TIME – NG. Mar 11 '10 at 20:41
  • The thing is I do see the canvas3, but not canvas1 and canvas2 when I click on there respective linkbutton. for eg: not able to see Area1 and Area2 when I click there respective button. I know only one panel will be visible at a time, but I am only able to see the top most, not the first and second. – Bruno Mar 11 '10 at 20:49