Dupicating Movieclip & positioning them?

What I’m trying to do, is duplicate a movie clip an x amount of times, based on a variable loaded externally, not the problem though, got that working fine.

My problem comes in while I’m trying to reposition the duplicated movies, to line up in a stacked order.

It duplicates the movie the number of times I need it, but when trying to call upon the movie clip, which is the a=this[“a”+i]; script, nothing happens, the clips don’t get repositioned.

If anyone can help me out, it’d be much apreciated.

Heres the code;
onClipEvent (load) {
x = 0;
y = 1;
space = 1;
num = 21;
stat = 1;
var Work = new LoadVars();
Work.load(“portfolio.txt”, this.Work);
Work.onLoad = function(loaded) {
if (loaded) {
_parent.t = "PHP loaded just fine<br>results = "+Work.num_results;
for (i=2; (i-1)<=Work.num_results; i++) {
a1.duplicateMovieClip(“a”+i, i);
a = this[“a”+i];
// Math to space out icons
if (x<10) {
x++;
} else {
y++;
x = 1;
}
a._y = a1._y+a1._heighty;
a._x = a1._x+a1._width
x;
a._visible = true;
a.ty = Work.TYPE[i-2];
a.ti = Work.TITLE[i-2];
a.id = Work.ID[i-2];
}
}
};
}

Heres the open source;
http://www.whydoyouwork.com/recentf...ork_Dynamic.zip

[edited at 11.55am central time by whydoyouwork]