4 Replies Latest reply on May 20, 2011 12:41 AM by Flex harUI

    Fastest way to load flex-app with complex gui menus

    bre_an Level 1

      Hi,

       

      In my current project I have some more menus. Each menu has a tabbar with one to five tabs and some more or less complex gui-stuff in the NavigatorContent.

       

      Most of the menus should be opened by clicking on a button.

       

      I could implement this by setting every menu to invisible and visible when someone clicks on a button:

       

      <menu:MyFirstMenu id="first" visible="false" />

      <menu:MySecondMenu id="second" visible="false" />

      ...

      <s:Button click="first.visible = true;second.visible=false" />

      <s:Button click="first.visible = false;second.visible=true" />

       

      but I fear, that this takes some time at the when the application is initializing.

       

      or I can add the menues after the user clicked on a button

      <s:SkinnableContainer id="menuArea" />

      <s:Button click="menuArea.addElement(new MyFirstMenu())" />

      <s:Button click="menuArea.addElement(new MySecondMenu())" />

      but I am not so sure, if this is the right way to do this.

      (I know I have to also remove the other menu when I click on one of the buttons, but you get the Idea)

       

      So what is a good and robust approach to implement this, if I want to have my application loaded quickly?