If() Statement within a for() STUFFING UP!

Hi everyone…this problem is really giving me crap…both of these traces -

trace(“Status ID = “+eval(“villa_button”+i+”.villaStatusID”));

they both trace the right value (the value is 2). but when I try to test if the variable is equal to 2 in a for() statement like this

for(i=1; i<=villaNumberResults; i++){
[indent]if([color=red]_root[“villa_button”+i].villaStatusID[/color] ==2){


it doesnt work. Why is that…how can I test equality of my villaStatusID variable for each villa_button+i?

Thanks in advance.