1 Reply Latest reply on Dec 19, 2008 7:10 AM by Newsgroup_User

    Flex Viewstack Help Needed

    dzinr38
      I hope I can explain this correctly. I have a Flex prototype in which I am using viewstacks. I have some components within these viewstacks, and those components also contain viewstacks. So, if I have a component that has 5 viewstacks, and you click to another component, then back to the component with 5 viewstacks, instead of going to the 1st viewstack of that component, it takes you back where it was the last time you went to that screen. I want to set it up so that each time you go to a viewstack it goes to the default rather than the last screen you were on. Does anyone know how to do this? I hope it makes sense. Thanks!
        • 1. Re: Flex Viewstack Help Needed
          Level 7

          "dzinr38" <webforumsuser@macromedia.com> wrote in message
          news:gif80t$59p$1@forums.macromedia.com...
          >I hope I can explain this correctly. I have a Flex prototype in which I am
          > using viewstacks. I have some components within these viewstacks, and
          > those
          > components also contain viewstacks. So, if I have a component that has 5
          > viewstacks, and you click to another component, then back to the component
          > with
          > 5 viewstacks, instead of going to the 1st viewstack of that component, it
          > takes
          > you back where it was the last time you went to that screen. I want to set
          > it
          > up so that each time you go to a viewstack it goes to the default rather
          > than
          > the last screen you were on. Does anyone know how to do this? I hope it
          > makes
          > sense. Thanks!

          Use an event listener to listen for a change in the ViewStack and then set
          the child ViewStack index to 0.

          HTH;

          Amy