This is an old piece of code for tabbing.
Modify to suit.
buttons with instance names "name", "email", "address", "zip", "country"
on a timeline.
//in the next frame (cant remember why next frame?) of the timeline that the
buttons appear.//
stop();
a = ["name", "email", "address", "zip", "country"]
Selection.setFocus(a[0]);
//on a blank button on the same timeline
on (keyPress "<Tab>"

{
//for the case where the user clicks on any button.
if(Selection.getFocus()!=this+"."+a
){
for(i=0; i<a.length; i++){
if(this+"."+a==Selection.getFocus())break;
}
}
//TAB:forward. SHIFT+TAB:backward.
Selection.setFocus(a[i=(i+!Key.isDown(Key.SHIFT)*2-1+a.length)%a.length]);
}