AS3 find XML Node Childindex

Hey Everyone,

I’m having the hardest time trying to figure this out and it seems like it should be so simple. Here’s my XML:

[FONT=Menlo][COLOR=#b72612]<[/COLOR]LOCK CODE=[COLOR=#9533b8]"l0101"[/COLOR][COLOR=#b72612]>[/COLOR][/FONT][COLOR=#b72612]<[/COLOR]LOCKNUMBER[COLOR=#b72612]>[/COLOR][COLOR=#1738f5]1[/COLOR][COLOR=#b72612]</[/COLOR]LOCKNUMBER[COLOR=#b72612]>[/COLOR]
[COLOR=#b72612]<[/COLOR]COMBO[COLOR=#b72612]>[/COLOR][COLOR=#1738f5]475[/COLOR][COLOR=#b72612]</[/COLOR]COMBO[COLOR=#b72612]>
[/COLOR]<TEAMS>
[COLOR=#b72612]<[/COLOR]TEAM NAME=[COLOR=#9533b8]"blue"[/COLOR][COLOR=#b72612]>[/COLOR]no[COLOR=#b72612]</[/COLOR]TEAM[COLOR=#b72612]>[/COLOR]
[COLOR=#b72612]<[/COLOR]TEAM NAME=[COLOR=#9533b8]"red"[/COLOR][COLOR=#b72612]>[/COLOR]no[COLOR=#b72612]</[/COLOR]TEAM[COLOR=#b72612]>[/COLOR]
[COLOR=#b72612]</TEAMS>
</[/COLOR]LOCK[COLOR=#b72612]>[/COLOR]

In Flash, I need to target the index number of one of the TEAM nodes based on who is playing. So, if someone is logged in as blue, that number should be 0. If they’re red, it should be 1. I’m not getting anything and it’s driving me nuts!

lockXML.COMBOLOCK.(@CODE==inputCode).TEAMS.TEAM.(@NAME==teamName).childIndex;

Any thoughts would be greatly appreciated!

Thanks everyone!

Tony