Problems with positioning dyn. attached buttons & centering loaded images [renamed]

this is a piece of my script…
what it has to do is to generate “j” buttons (j being the number of registrations from my database) and arrange them in rows of 5 or 6…
unfortunately the buttons are generated but are not arranged properly. i have 9 registrations in the database so there are 9 buttons… the first 8 are next to each other and the last one is somewhere to the right…

further on, at the release of a button it should create the lwLogo movieclip and load there a certain pic (the path being taken from my database). then the lwLogo mc should be centered on the screen… as this doesn’t happen in the _root the center of the screen would be -442 in this movie clip so normally to center the image i should place lwLogo at -442-(lwLogo._width/2) but this doesn’t work. the photos are loaded but not in the center…

would anyone please take a look?
thanks in advance

serie=0;
serii=0;
for(j=workEntries-1;j>=0; j--){
var mc = copyButton.duplicateMovieClip("copy"+j,j+10);
mc._x = (j-serii)*20;
if (mc._x>=120) {serie=serie+35; serii=serii+5} 
mc._y =(15 + serie);
mc.id = workSection.childNodes[j].childNodes[1];
mc.nr=j;
mc.onRelease = function(){
removeMovieClip(_root.lwLogo);
this.createEmptyMovieClip(lwLogo)
lwLogo._alpha=0;
		lwLogo.loadMovie(unescape(workSection.childNodes[this.nr].childNodes[2].firstChild.nodeValue));
			if (lwLogo.getBytesLoaded() == lwLogo.getBytesTotal()) {
			lwLogo._x=-442-(lwLogo._width/2);
				this.onEnterFrame = function() {if (lwLogo._alpha<=100) {
					lwLogo._alpha += 10;

anyone… please :( :( :*(

i solved the first problem (with arranging the buttons) but i still can’t center the **** images…

well… i finally solved the problem :smiley:
yupiiiiiiiiii