MovieClip.tabChildren Property

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
MovieClip.tabChildren Property Flash 6

controls whether contained objects are included in the automatic tab order read/write
mc.tabChildren

Description

The Boolean tabChildren property specifies whether the text fields and buttons inside mc are included in the automatic tab order. It applies only to movie clips, not main movies (e.g., _root, _level1). When tabChildren is true (the default), all buttons, movie clips with button handlers, and text fields contained by mc are part of the automatic tab order, even when mc.tabEnabled is false. When tabChildren is false, the objects contained by mc are not accessible via the Tab key.

The tabChildren property has two typical uses:

  • It can conveniently disable tabbing for a whole group of objects. For example, to disable a set of toolbar buttons, place the buttons inside a movie clip and set the clip's tabChildren to false.

  • It can prevent a movie clip's contents from interfering with the clip's keyboard accessibility. For example, to prevent the Tab key from accessing, say, the handle inside a slider bar, set the slider bar's tabEnabled to true and tabChildren to false. This way, the entire bar counts as a single tab index in the tab order.

Usage

The Tab key does not work reliably in Test Movie mode unless Control figs/u2192.gif Disable Keyboard Shortcuts is enabled. Be sure to test keyboard behavior in the Standalone Player, if applicable, and in the Flash Player for all targeted web browsers.

Example

The following code enables sliderBar_mc to receive focus via the Tab key, but it prevents any of its contents from being focused:

sliderBar_mc.tabEnabled = true; sliderBar_mc.tabChildren = false;

See Also

MovieClip.tabEnabled, MovieClip.tabIndex



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net