you set the tabIndex element values ββto be edited anytime you want
so that they are the same for childIndex
for (var i:int=0;i<container.numChildren;++i) { container.getChildAt(i).tabIndex = i;
Following work for me
iButton1.tabIndex = 1; iButton2.tabIndex = 2; iButton3.tabIndex = 3; iButton1.tabEnabled = true; iButton2.tabEnabled = true; iButton3.tabEnabled = true; function fnClick (pME:MouseEvent):void { iButton1.tabIndex = 3; iButton2.tabIndex = 2; iButton3.tabIndex = 1; } iButton3.addEventListener(MouseEvent.CLICK, fnClick);
you can download the fla sample here http://matrixoft.infunity.com/agents/calvin/flash/tab.rar
press the third button and it will change the order of the tabs. You may need "Control-> Disable keyboard shortcuts" when you ctrl-enter to test fla
Unreality
source share