1 Reply Latest reply on Aug 22, 2008 12:36 AM by Rob Rusher

    Integrating pages in flex application

    Smart_flex
      Hi,

      I have general question on integrating all the screens in a flex application. I have observed that if we have multiple <mx:Application> root tag mxml files, when navigating between these screens you will notice initilazation progress bar. I understand that viewstack and states gives the smooth transition between the page navigations.

      Can you please tell me which is the preferred or standard way to in navigating through flex applications.
      1. Having all the screens as <mx:Application> or
      2. Have one <mx:Application> and make rest of them childs to this and implement view stack and states.

      I would like to know pros and cons of either case. thanks in advance.


        • 1. Re: Integrating pages in flex application
          Rob Rusher Level 1
          A Flex application should have only one <mx:Application> tag. All of the screens should be loaded using the various navigation containers (ViewStack, TabNavigator, Accordion). You definitely do not want to have a separate <mx:Application> for each screen. That creates a separate SWF that will have to be downloaded and initialized for each screen. Now, there are ways to load other SWFs, but it is not necessary nor recommended. The other option for larger applications are Modules, but that is a whole other discussion.

          States are not used for navigation. States are for components that have slight modifications for different situations. i.e. a search component that resizes to include advanced search filters would be a good use of states.

          Keep in mind that you will nest additional navigation containers to create the entire experience.
          So your code might look like this: