If statement == Values match but returns false

Hi there,
I’ve got the following code here which is giving me some grief. The problem is the if statement always returns false even though I know that the two values are definitely the same somewhere through the loop as I have traced the values. All I can think of is that teamCode* is a string so its not truely == to specialcode. Any thoughts or help much appreciated.

_global.specialcode = specialcode.text;
teamCode = new Array();
var ranking:XML = new XML();
ranking.ignoreWhite = true;
ranking.onLoad = function(success) {
     if (success) {
          var entry_arr = this.firstChild.childNodes;
          for (var i = 0; i<entry_arr.length; i++) {
               teamCode* = entry_arr*.attributes.id;
               trace("Code ------- "+teamCode*);
               if (specialcode == teamCode*) {
               } else {

Many Thanks