Avoid using continue and break when you don't have to.
PHP Code:
function selectToolName(temp.staffCode) {
temp.code = 0;
temp.tools = getTools();
DoctorStaffBar_Control_Text.text = temp.tools[temp.staffCode][0];
for (temp.code = 0; temp.code < temp.tools.size(); temp.code++) {
temp.thing = ("DoctorStaffBar_Control" @ temp.code);
if (temp.code == temp.staffCode) {
temp.thing.alpha = 1;
} else {
temp.thing.alpha = 0.3;
}
}
}