7 Replies Latest reply on Feb 26, 2007 10:07 PM by kglad

    tabIndex problem

    LucaLT
      Hello,

      I'm experiencing some problems using tabIndex. I have 2 Movieclips that contains a form: "Login" and "Registration". If I place them onto the stage the tab navigation works just fine. If I use attachMovie to place the clips I loose the tabNavigation. I tried to define a tabIndex order, but it simply doesn't work. I tried to put the tabIndex on the main timeline and inside each clip., I also tried to disable the keyboard shortcuts while testing the swf inside flash, but it just simply doesn't work. Is there something I'm doing wrong? Thanks in advance for the help!
        • 1. Re: tabIndex problem
          kglad Adobe Community Professional & MVP
          yes, you're doing something wrong. show the code you used to (try and) define the tabIndex.
          • 2. Re: tabIndex problem
            LucaLT Level 1
            Thanks for the reply.

            First I just defined only the tabIndex in the main timeline as follow:

            this.login.userField.input.tabIndex = 1;
            this.login.passField.input.tabIndex = 2;

            I also tried to define them inside the "login" mc without any luck.

            Then I tried to set tabEnabled to true for each mc and each textfield, but it didn't work either. The only thing I don't understand is why it's working without defining any tabIndexes if I place the mc onto the stage without using attachMovie.
            I think I'm not setting the index on the right mc since they are all nested. the input texfield (input) is inside an mc (userField) which is inside another one (login).
            Thank again for helping me out!

            • 3. Re: tabIndex problem
              kglad Adobe Community Professional & MVP
              you're code should work once the stage has focus, IF you path/instance names are correct.

              but i wouldn't use input for the name of anything in flash because that's a reserved word used to designate a type of textfield.
              • 4. Re: tabIndex problem
                LucaLT Level 1
                I changed the instance name to input_txt, but it's still not working. The path/instance names are correct, because the whole login system works just fine. It's just the tabbing that is giving me the headaches. How can I make sure if the stage has focus?
                Thanks again for the help
                • 5. Re: tabIndex problem
                  kglad Adobe Community Professional & MVP
                  if you click on the stage, it has focus. at that point using the tab key should work as expected.

                  post a link to a fla that shows the issue, if you're still having problems.
                  • 6. Re: tabIndex problem
                    LucaLT Level 1
                    I think I got it working, but still I don't understand. I was revising my code and I erased a second layer I used to do some actions. As soon as I did that the tab start working without define any index. Then I wanted to set the focus on the first field using Selection.setFocus and it stop working again, unless I used the tabIndex properties. Anyway, the important thing is everythingis working. Thanks again for the help!
                    • 7. Re: tabIndex problem
                      kglad Adobe Community Professional & MVP
                      you're welcome.