I want to know if I can use a tree and when and item in the tree is clicked the viewstack changes to that certain item?
Yes. Try something like this:
<mx:Tree id="tree" click="viewStack.selectedChild = tree.selectedItem" />
If your dataprovider for the tree does not contain the ViewStack component you're looking for:
If you still need help, post some code!