9 Replies Latest reply on Feb 10, 2011 6:33 AM by eLearningDave

    CS5(?) tabindex problem

    science_ed

      "If any currently displayed object in the SWF file contains a tabIndex  property, automatic tab ordering is disabled..."

      I have just upgraded Flash from CS3 to CS5. After publishing files in CS5, TAB-navigation includes several objects where .tabindex is not set. (When publishing in CS3, this does not happen.) Anyone else who have experienced this and can give some timely tips?

        • 1. Re: CS5(?) tabindex problem
          kglad Adobe Community Professional & MVP

          create a dummy object with tabindex after your currently last indexed object and create a dummy listener to changes focus to the first indexed object when the dummy receives focus.

          • 2. Re: CS5(?) tabindex problem
            science_ed Level 1

            In one way or antother, the tab index was set to 0 in the accessibility panel for some objects. CS3 ignores objects having tab index=0, CS5 doesn't (even though 0 is not a valid value in the tab index field in the accessibility).

            • 3. Re: CS5(?) tabindex problem
              science_ed Level 1

              When tabindex is set in the accessibility panel you can actually not remove it! You can clear the Tab index field, but when saved and reopened the field will have the value "0" (even though "0" is not a valid value.) When publishing the file, the objects now having Tab Index = 0 in the accessibility panel, will be placed first in the tab order. I did report this to Adobe in early june...

              • 4. Re: CS5(?) tabindex problem
                berra

                Confirmed!

                 

                This is a project killer for me unless I can find a workaround.

                • 5. Re: CS5(?) tabindex problem
                  berra Level 1

                  Well I found a workaround, so here it is:

                   

                  package
                  {


                      public class ZeroIndexKiller
                      {

                   

                          public function ZeroIndexKiller()
                          {
                              // constructor code
                          }

                   

                          public function killZeros(thisObj:Object):void
                          {
                              for (var i=0; i<thisObj.numChildren; i++)
                              {
                                  var thisChild:Object = thisObj.getChildAt(i);
                                  if (thisChild.hasOwnProperty("tabIndex") && thisChild.tabIndex == 0)
                                  {
                                      thisChild.tabEnabled = false;
                                  }
                              }
                          }

                   

                      }

                   

                  }


                  //

                   

                  Just call it like this:

                   

                  var noZeros:ZeroIndexKiller = new ZeroIndexKiller();

                  noZeros.killZeros(this);

                   

                  /Berra

                  • 6. Re: CS5(?) tabindex problem
                    science_educator

                    Great, but this doesn't work in AS2. Any suggestion there?

                    • 7. Re: CS5(?) tabindex problem
                      berra Level 1

                      It should work if you extract the function from the package.

                       

                      I tried it in a framescript before making a class of it.

                       

                      for (var i=0; i<this.numChildren; i++)
                      {
                          var thisChild:Object = this.getChildAt(i);
                          if (thisChild.hasOwnProperty("tabIndex"))
                          {
                              if (thisChild.tabIndex == 0)
                              {
                                  thisChild.tabEnabled = false;
                              }
                          }
                      }

                       

                      /Berra

                      • 8. Re: CS5(?) tabindex problem
                        science_educator Level 1

                        It seems to me that:

                        > var thisChild:Object = this.getChildAt(i);

                        .getChildAt doesn't work in AS2

                         

                        > if (thisChild.tabIndex == 0)

                        doesn't work when tabIndex is set in the Accessibility panel

                         

                        This worked in a simple test file, but not in the more advanced project files::

                        function resetZeroTabindex(myObj:Object){
                        for (var prop in myObj) {
                          if(typeof(myObj[prop])=="movieclip" || typeof(myObj[prop])=="object"){
                           var zeroTabbed:Number=myObj[prop].tabIndex;
                           if(zeroTabbed<1 || ! zeroTabbed){ // "! zeroTabbed" -> tabIndex set in Acc.panel
                            myObj[prop].tabEnabled=false;
                           }
                           resetZeroTabindex(myObj[prop]);
                          }
                        }
                        }
                        resetZeroTabindex(this);

                        • 9. Re: CS5(?) tabindex problem
                          eLearningDave Level 2

                          Hello,

                           

                          I too am having many problems with the automatic inclusion of a zero in the accessibility panel (incorrect tabbing orders, crashing Flash CS5 Pro, etc.)  I have contacted Matt May with Adobe Accessibility and he has informed me that he has brought the issue up to the  "Flash Pro" team and he says they handle important issues quickly.  Hopefully they can resolve this issue.

                           

                          dave