0 Replies Latest reply on Feb 21, 2007 10:38 AM by france2003

    Site Navigation - HELP

      I am working on the layout for our next generation application. I am in serious need of architecture assistance in relation to navigation. Here is the basic layout of what I have...

      ViewStack 1.1 [application container]
      -----Canvas 1.1 [login form]
      -----Canvas 1.2 [homepage]
      ----------Canvas 2.1 [navigation links]
      ----------ViewStack 2.1 [main body]
      ---------------Canvas 2.1 [screen A]
      ---------------Canvas 2.2 [screen B]
      ---------------and so on, there will be many of these

      This is set up like a lot of traditional websites -- navigation pane on the left side with a "main body/content" on the right. I will have many many links in the navigation area that will change the selectedChild of the main body [ViewStack 2.1]. Here are my questions:

      1) Am I setting this up okay? Should I have some other type of architecture design in place? If you know of any good articles on the subject, please let me know how to get to them...

      2) For lack of knowledge of any other way, I am currently trying to get my first link button to work by using an custom event listener that passes a string. The string is the id of the canvas in ViewStack 2.1 that I want to go to. Since I have so many links, I was hoping to create "generic" functions that use the value of the passed string to ultimately tell the ViewStack [2.1] which component to go to. I'm trying this, but it's not working...

      on the application container mxml page, this is the function that is called after the event listener has been triggered:

      private function goToThisScreen(x:StringEvent):void {
      navDestination = x.stringToPass;
      ViewStack[1.1].selectedIndex = 1;

      then on Canvas[1.2] in the initApp() function I am trying to set the main body ViewStack[2.1].selectedChild = navDestination.

      I realize that navDestination is a String and that the selectedChild refers to a Container and that is why it is not working, however, I don't know where to go from here.

      I want to stay away from using selectedIndex as it is early in development and that's a lot to keep track of as new components are added.