createEmptyMovieClip + geturl problem

I am using createEmptyMovieClip to create MC’s based on values from an array. The MC’s are placed into the FScrollPaneSymbol component. They load ok however the getURL that should be loaded from the array doesn’t work. I’ve only been able to get it working if I put in an onEnterFrame function but that makes it assign the last url from the array to all the MC’s.


foo.onEnterFrame = function() {
  for (q in portfolio.sections[0].items) {
    //loader[thumbX] is a dynamically created MC
    loader["thumb"+q].onRelease = function() {
    geturl(portfolio.sections[0].items[q].mpg);
  }
}

If the array values are 1,2,3 it assigns the geturl for each of the MC’s to “3”;

Any ideas how I can fix this problem? Do I even have to use the onEnterFrame for the ScrollPane/MC’s?

THanks!

Jason