5 Replies Latest reply on Oct 12, 2011 8:07 AM by kglad

    RadioButton tab Index

    A.kameshwaran Level 1

      Hi,

       

           I would like to know how to set the tabIndex for the RadioButton of a same group.

       

      Regards,

      Kamesh

        • 1. Re: RadioButton tab Index
          kglad Adobe Community Professional & MVP

          assign instance names and tabIndex properties.

          • 2. Re: RadioButton tab Index
            A.kameshwaran Level 1

            Ya i have done the same . It is selecting only the first radio button and not the others.

             

            I do have 3 RadioButton and i have made it in to single group. I have set the tabIndex as below,

              

            rd1.tabEnabled = true;

            rd2.tabEnabled = true;

            rd3.tabEnabled = true;

            rd1.tabIndex = 1;

            rd2.tabIndex = 2;

            rd3.tabIndex = 3;

             

            When i publish it, i can select only the first index. From that i can't able to move to next radio button using tab. Please guide me how to make this run.

            • 3. Re: RadioButton tab Index
              kglad Adobe Community Professional & MVP

              if you're testing in the flash test environment, disable keyboard shortcuts.

              • 4. Re: RadioButton tab Index
                A.kameshwaran Level 1

                Ya i have done this. Also checked in the browser also. But yet the result is same. I couldn't able to move using tab.

                • 5. Re: RadioButton tab Index
                  kglad Adobe Community Professional & MVP

                  assign your first radiobutton a tab index (eg, firstTI) and assign an invisible button (eg, btn) the next tab index (firstTI+1), then if your radiobuttons have instance names rb1,rb2 etc, you can use:

                   

                  var tl:MovieClip = this;

                  var index:Number=0;

                  rb1.tabIndex=firstTI;

                  btn.tabIndex=firstTI+1;

                   

                  var lo:Object = new Object();

                  lo.onSetFocus = function(oF, nF) {

                      if(nF._name=="btn"){

                          index=(index+1)%yourradiobutton.number;

                          Selection.setFocus(tl["rb"+(index+firstTI)]);

                      }

                  };

                  Selection.addListener(lo);