Well, regardless if this helps take the mcLoader out of the loop, what a waste:
PHP Code:
System.security.allowDomain("http://www.translucidedesign.com");
var prefix = 'http://www.translucidedesign.com/kana/';
//1. Import base class
import mx.utils.Delegate;
//2. XMLLoader setup
var XMLLoader:XML;
XMLLoader = new XML();
XMLLoader.ignoreWhite = true;
XMLLoader.onLoad = Delegate.create(this,onObjectsLoaded);
XMLLoader.load(prefix+'domainebrossard.xml');
var mcLoader = new MovieClipLoader();
var mclListener:Object = {};
mcLoader.addListener(mclListener);
mclListener.onLoadInit = mcLoaded;
function onObjectsLoaded(success:Boolean) {
if (success) {
var nodes:Array = this.XMLLoader.childNodes[0].childNodes;
var currentx = 10;
var currenty = 10;
var itemsxy = 76;
var spacing = 10;
var pictures:Array = new Array();
var thumb = '';
var picture = '';
for (var i:Number = 0; i<nodes.length; i++) {
thumb = nodes[i].attributes.thumb;
picture = nodes[i].attributes.image;
var thisObj:Object = new Object();
thisObj.pic = picture;
pictures[i] = thisObj;
//trace(picture);
attachMovie('photosquare','picturethumb'+i,this.getNextHighestDepth());
var thisPic = eval('picturethumb'+i);
thisPic._x = currentx + (i%4)*(itemsxy+spacing);
thisPic._y = currenty + (itemsxy+spacing)*Math.floor(i/4);
//Movie clip loader for pictures...
mc.itemsxy = itemsxy;
mcLoader.loadClip(prefix+thumb, thisPic.pic);
thisPic.btn.number = i;
thisPic.btn.onPress = function() {
if (_root.popup)_root.popup.removeMovieClip();
_root.attachMovie('popup','popup',_root.getNextHighestDepth());
_root.popup.number = this.number;
_root.popup.loadPic(this.number);
_root.popup._x = 200;
_root.popup._y = 200;
}
}
//trace('pictures : '+ pictures[0].pic);
_root.pictures = pictures;
} else {
trace('Error reading XML');
}
}
function mcLoaded(mc:MovieClip){
mc._x = 0;
mc._y = 0;
mc._width = mc.itemsxy;
mc._height = mc.itemsxy;
}
I didn't check it but this should function fine although I don't know that it will fix your problem. The code is fairly clean above otherwise so I don't know what could cause it and you should be capable of debugging this if you wrote that.
I believe onLoadInit fires in the scope of the mc so passing mc:MovieClip as a parameter is unnecessary? I forget. Good luck