[F8] depth problem! (overlapping)

Hi everybody!

I’m working on a xml gallery and I’m having problems with the depth, when the images display the last ones overlap, I’ve been trying to make this work but I still can’t.
That’s why I’m asking for your help, please:
This is the code:


function GeneratePortfolio(portfolio_xml) {
	var portfolioPictures = portfolio_xml.firstChild.childNodes;
	noclips = portfolioPictures.length;
	objectsInScene = new Array();
	for (i=0; i<noclips; i++) {
		var currentPicture = portfolioPictures*;
		this.thumbHolder = theScene.attachMovie("square", "mc"+i, i);
		this.thumbHolder.x = i*150;
		this.thumbHolder.y = 0;
		// real z coordinate (depth)
		this.thumbHolder.z = i*500;
		this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail", 0);
		this.thumbLoader._x = 10;
		this.thumbLoader._y = 10;
		this.thumbLolder._alpha = 80;
		this.thumbLoader.loadMovie(currentPicture.attributes.thumb);
		this.thumbHolder.title = currentPicture.attributes.title;
		this.thumbHolder.image = currentPicture.attributes.image;
		this.thumbHolder.thumb = currentPicture.attributes.thumb;
		this.thumbText = this.thumbHolder;
		this.thumbHolder.onRelease = displayPicture;
		this.thumbHolder.onRollOver = selectStar;
		this.thumbHolder.display = displayStar;
		objectsInScene.push(this.thumbHolder);
		cameraView = new Object();
		cameraView.x = 0;
		cameraView.y = 0;
		cameraView.z = 0;
		cameraView.target = new Object();
		cameraView.target.x = 0;
		cameraView.target.y = 0;
		cameraView.target.z = 0;
		focalLength = 1500;
		easeToTarget = function () {
			cameraView.x += (cameraView.target.x-cameraView.x)/5;
			cameraView.y += (cameraView.target.y-cameraView.y)/5;
			cameraView.z += (cameraView.target.z-cameraView.z)/5;
			for (var i = 0; i<objectsInScene.length; i++) {
				objectsInScene*.display(cameraView, focalLength);
			}
		};
		theScene.onEnterFrame = easeToTarget;
	}
}
var portfolio_xml = new XML();
portfolio_xml.ignoreWhite = true;
portfolio_xml.onLoad = function(success) {
	if (success) {
		GeneratePortfolio(portfolio_xml);
	} else {
		trace("error");
	}
};
portfolio_xml.load("xmlphoto.xml");

Thanks in advanced.
:slight_smile: