2 Replies Latest reply on Mar 4, 2009 9:00 PM by Newsgroup_User

    ViewStack Issues

    combustion007
      Hello Everyone,

      How can I keep all (4)VBoxes and their navigation buttons within my viewstack disable until one is selected. So when init function is invoked, it sets all the viewstacks disabled, but the selected one. I thought about doing this way, but this doesn't work.

      ViewStack id = "boxStack";

      private function init():void
      {
      this.boxStack.buttonMode = false;
      }


        • 1. Re: ViewStack Issues
          robbyk87
          hmmm, I think they should be disabled automatically if they are not within the selectedIndex.

          But you can just give each of your buttons an id, and also set them to false.

          So,

          <mx:Button enabled='false' id='btn1'/>

          you can then enable or disable these buttons with their own id's.

          //AS
          btn1.enabled = false;

          This is the long way of doing it - especially if you have lots of buttons
          • 2. Re: ViewStack Issues
            Level 7

            "combustion007" <webforumsuser@macromedia.com> wrote in message
            news:gom7e4$e33$1@forums.macromedia.com...
            > Hello Everyone,
            >
            > How can I keep all (4)VBoxes and their navigation buttons within my
            > viewstack
            > disable until one is selected. So when init function is invoked, it sets
            > all
            > the viewstacks disabled, but the selected one. I thought about doing this
            > way,
            > but this doesn't work.
            >
            > ViewStack id = "boxStack";
            >
            > private function init():void
            > {
            > this.boxStack.buttonMode = false;
            > }
            Just set MouseChildren to false on screens that are not selected. I've
            also seen objects in hidden viewstack panes reacting to the mouse.