1 Reply Latest reply on Jun 19, 2007 4:19 AM by Stefan08

    Switching Viewstack/Linkbar Programatically error

      I use a linkbar / view stack to let the user go the appropriate page. Some times in my logic I want to MOVE the user to a new page, so I have code that looks like "parentApplication.myViewStack.selectedIndex = 1". I have 2 problems with this:
      1). The new linkbar page is NOT greyed out in the display so the user has no indication as to which button was pressed.
      2). If the user clicks on the SELECTED linkbar, the following error is raised:
      RangeError: Error #2006: The supplied index is out of bounds.
      at flash.display::DisplayObjectContainer/getChildAt()
      at mx.core::Container/getChildAt()
      at mx.controls::LinkBar/mx.controls:LinkBar::hiliteSelectedNavItem()
      at mx.controls::LinkBar/mx.controls:LinkBar::clickHandler()