Getting undefined back for an array value

Hi folks,

This is really weird,
im getting undefined back for my link value.

pal.onPress = function(){
getURL(links[counter],"_self");
trace(links[counter]);

// here is my problem

// gives undefined
}

my code:

 
 
var textarray =  new Array ('inicio','quien somos','donde estamos','contactenos','busca trabajo');
var mylinks = new Array('index.html','quienes-somos.html','donde-estamos.html','contactenos.html','busca-trabajo.html');
 
 
MovieClip.prototype.ease = function(to:Number , speed:Number ){ 
var previousPosition:Number = this._x; 
if( isNaN( speed ) || Number(speed) !== speed || speed <= 1 ) speed = 1.2; 
this.onEnterFrame = function(){ 
holdme = to-(to - this._x);
 
this._x = (holdme/speed)+130; 
if( this._x == previousPosition ){ 
this._x = to - 130; 
delete this.onEnterFrame; 
} 
previousPosition = this._x ; 
} 
} ;
 
MovieClip.prototype.makeVisible = function() {
    clearInterval(this.interval);
    this._visible = true;
    this.play();
};
 
 
function AttachMc(counter)
{
 
 pal = Container.attachMovie("twee","item"+counter, counter);
return pal;
}
itemspacing = 130;
counter = 0;
for (var x=0; x < 5; x++)
{
 var pal = AttachMc(counter);
 
 //trace (pal.btntxt.instance+counter.text + textarray[counter]);
       pal.btntxt.text = textarray[counter];  
 
 pal._x = counter * 130;
 trace (pal._x);
 pal.stop()
    pal._visible = false;
 pal.interval = setInterval(pal, "makeVisible", 1000*counter);
 trace(counter);
 
  pal.onRollOver = function() {
  this._alpha = 70;
// works 
 //this.ease(-10,1); 
}
pal.onPress = function(){ 
getURL(links[counter],"_self"); 
trace(links[counter]);
 
// here is my problem
 
// gives undefined
 
 
 
 
 
} 
pal.onRollOut = function() {
  this._alpha = 100;
 this.ease(10,1); 
 // works
}
 counter++;
}

Thanks for looking,

Luck