For Flex 2.0 Beginners - Use the mx:States and mx:ViewStack Tags To Change The Application's View
Introduction:
As a new Flex 2.0 developer coming from using HTML, JavaScript, CSS, DHTML, and ColdFusion, how to design a Flex application was confusing. HTML, even with AJAX, is primarily a page-oriented environment. If I needed to significantly change what the users sees, I would usually have the user go to a new web page. Most HTML-based applications are a series of connected web pages.
In Flex, there is not the concept of a page. Rather, Flex has several different ways for you change the "view" of your application. In this brief tutorial for beginners, I'll introduce two Flex controls: mx:States and mx:ViewStack. These two controls can be used together to change what your users see on screen in your Flex application.
You are right there is documentation around, i still think people coming from a traditional web based layout though ( new content = new page ) struggle a little with how to move through their application and which options are appropriate.
This shows clearly how to / advantages without worrying about the other bits and peices .. clear and concise :-)
You stuff is really informative. Been using your site as a learning tool for Flex. I was wondering if you had any ideas to change a viewstate via a combobox? Just curiuous. Any help/feedback is welcomed. Thanks again. Keep up the good work!
Thanks.
I've not done this but try using ApplicationControlBar that contains a combo box. On the combo box change event, have the function select a new child for the view stack that matches the label of the combo box.