Control the tab order and reading order

You can create a tab order that determines the order in which objects receive focus when the users press the Tab key. You can also control the order in which a screen reader reads information about the object (known as the reading order). You can create both the tab and reading order using the tabIndex property in ActionScript (In ActionScript, the tabIndex property is synonymous with the reading order). If you have Flash MX Professional 2004, you can use the Accessibility panel to specify the tab order, but the tab index that you assign does not necessarily control the reading order.

To create a reading order, you must assign a tab index to every instance in ActionScript.

If you have Macromedia Flash MX Professional 2004, creating a tab order is as easy as entering a number in the Tab Index text box. You can then view the tab order directly on the Stage.

To create a tab order in this lesson, use one of the following procedures. To create a reading order along with a tab order, follow the procedure to control the tab order and reading order using ActionScript.

If you have Flash MX Professional 2004, you can follow this procedure to create a tab order using the Accessibility panel:

  1. With the Accessibility panel open, select the logo_mc instance at the top of the Stage. In the Accessibility panel, enter 1 in the Tab Index text box.
  2. Continue to select each instance on the Stage and enter a tab order number in the Tab Index text box, using information from the following table:

    Instance name

    Enter the following number in the Tab Index text box

    logo_mc

    1

    dealers_btn

    2

    orders_btn

    3

    research_btn

    4

    text4_txt

    5

    overview_btn

    6

    powerplant_btn

    7

    news_btn

    8

    safety_mc

    9

    text8_txt

    10

    text9_txt

    11

    bevel_mc

    12

If you have Flash MX Professional 2004, follow this procedure to view a tab order:

Follow this procedure to control the tab order and reading order using ActionScript:

  1. In the Timeline, select Frame 1 of the Actions layer.
  2. In the Actions panel (Window > Development Panels > Actions), view the ActionScript that creates the tab index for each instance in the document.
  3. If you're using Flash MX 2004, or if you're using Flash MX Professional 2004 and you did not create the tab index using the Accessibility panel, delete the /* and */ in the script to un-comment the script:
    _root.logo_mc.tabIndex = 1; 
    _root.dealers_btn.tabIndex = 2;
    _root.orders_btn.tabIndex = 3;
    _root.research_btn.tabIndex = 4;
    _root.text4_txt.tabIndex = 5;
    _root.overview_btn.tabIndex = 6;
    _root.powerplant_btn.tabIndex = 7;
    _root.news_btn.tabIndex = 8; 
    _root.safety_mc.tabIndex = 9;
    _root.text8_txt.tabIndex = 10;
    _root.text9_txt.tabIndex = 11;
    _root.bevel_mc.tabIndex = 12;