[f8]reloading fresh images in the same place
normally this works for me, but i am not getting the correct results...essentially, every time i call loadThumbImages i woudl like to start a new set of images exactly where the old ones were (same starting _x and _y)...any idea why the the next set of thumbs (after a new call) load immediately where the previous set left off??? shouldn't mcHolder be removed and replaced with exactly the same mc?
Code:
function loadThumbImages(thumbXML) {
var mcHolder = this.createEmptyMovieClip("mcHolder", 2000);
root = thumbXML.firstChild.childNodes;
var nX:Number;
var nY:Number;
for (var i = 0; i<=root.length-1; i++) {
thumbs = root[i].firstChild;
mcImage = mcHolder.createEmptyMovieClip(i, i);
createThumbs(thumbs);
}
}
function createThumbs(thumbs) {
var mclListener:Object = new Object();
var mclLoader:MovieClipLoader = new MovieClipLoader();
mclLoader.addListener(mclListener);
mclListener.onLoadInit = function(mcClip:MovieClip) {
nextColumn = mcClip._width+5;
var newY = 30;
if (nX == undefined) {
nX = 800-(mcClip._width);
nY = newY;
}
if (nY>=450) {
nX -= nextColumn;
nY = newY;
}
mcClip._x = nX;
mcClip._y = nY;
nY += mcClip._height+5;
};
mclLoader.loadClip(rootURL+"images/"+galleryID+"/"+galleryID+"-Thumbnails/"+thumbs, mcImage);
}