onPress inside for loops

function loadSWF(src) {
 _parent.swfContainer.loadMovie(src);
}
my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success) {
 if (success) {
  dir = "thumbs/";
  swfDir = "swf/";
  spacing = 2;
  root = my_xml.firstChild;
  swf = root.firstChild.childNodes;
  thumbs = root.childNodes[1].childNodes;
  for (var i:Number = 0; i<swf.length; i++) {
   container.attachMovie("thumbs", "thumbs"+i, i);
   container["thumbs"+i]._x = i*(66+spacing);
   container["thumbs"+i].loadMovie(dir+thumbs*.firstChild);
   
   this.container["thumbs"+i].onPress=function() {
    //loadSWF(swfDir+swf*.firstChild);
    trace(swf*.firstChild);
   };
   
   trace(swf*.firstChild);
  }
  trace(thumbs.length);;
 } else {
  trace("not laoded");
 }
};
my_xml.load("dustcoverinfo.xml");
MovieClip.prototype.easex = function(x) {
 this.onEnterFrame = function() {
  this._x = x-(x-this._x)/1.200000;
  if (Math.abs(x-this._x)<=1) {
   delete this["onEnterFrame"];
   this._x = x;
  }
  // end if  
 };
};
setRollOver = function () {
 this.onEnterFrame = function() {
  if (this.mask.hitTest(_root._xmouse, _root._ymouse)) {
   slideMenu();
  }
 };
};
slideMenu = function () {
 diff = _root._xmouse-this._x;
 scale = diff*100/this.mask._width;
 target = -scale*(this.container._width-this.mask._width)/100;
 this.arrows.easex(diff);
 this.container.easex(target);
};
setRollOver();

the code above … the onPress button dont work dont know why can you guys spot whats wrong thanks …

this.container["thumbs"+i].onLoad = function(){
this.onPress=function() {
    //loadSWF(swfDir+swf*.firstChild);
    trace(swf*.firstChild);
   };
}

ok thanks ill try it … but i dont understand why does have to use it inside onLoad?

nope it doesnt work