2 Replies Latest reply on Feb 28, 2009 10:11 AM by Gregory Lafrance

    Navigation using Buttons

      Problem 1

      I have created a number of Components (with the .mxml extension) which will make up the individual Pages of my Application. Each component (Page) has a Next and Prev button (except the 1st Page which has only the Next button, and the last Page which only has the Prev button). How do I code the Navigation from each Page when the User clicks on Next or Prev?

      Problem 2

      On each Page will be another info button which when clicked will popup another Page (Component.mxml). There will be a Close button on the popped up Info Page which when clicked will close the Page and return you to the Page you clicked the info button from. Any ideas how the code would look for the popping up and closing button clicks?

      Any help would be appreciated
        • 1. Re: Navigation using Buttons
          Level 7

          "hkpadobe" <webforumsuser@macromedia.com> wrote in message
          news:gob4gb$g04$1@forums.macromedia.com...
          > Problem 1
          >
          > I have created a number of Components (with the .mxml extension) which
          > will
          > make up the individual Pages of my Application. Each component (Page) has
          > a
          > Next and Prev button (except the 1st Page which has only the Next button,
          > and
          > the last Page which only has the Prev button). How do I code the
          > Navigation
          > from each Page when the User clicks on Next or Prev?

          Next:
          myViewStackOrTabNavigator.selectedIndex++;

          Previous:
          myViewStackOrTabNavigator.selectedIndex--;

          > Problem 2
          >
          > On each Page will be another info button which when clicked will popup
          > another
          > Page (Component.mxml). There will be a Close button on the popped up Info
          > Page
          > which when clicked will close the Page and return you to the Page you
          > clicked
          > the info button from. Any ideas how the code would look for the popping up
          > and
          > closing button clicks?

          Look in the help for TitleWindow and PopupManager.


          • 2. Re: Navigation using Buttons
            Gregory Lafrance Level 6
            And you can make the buttons enabled or visible property dependent on the current selectedIndex. If selectedIndex == 1, then the Back button should be disabled or invisible. If it is numChildren -1 the Next should be disabled or invisible.