Compare 2 values in if statement

hi

whats wrong here?



if (_root.txt_1_a == _root.section_btn){
    trace("match");
}
trace(_root.txt_1_a);
trace(_root.section_btn);


the output is:

item_1
item_1

but if I do it like this it does work…



if ("item_1" == "item_1"){
    trace("match");
}
trace(_root.txt_1_a);
trace(_root.section_btn);


the output it this:

match
item_1
item_1