Please can someone look at my code and explain why the attached movies when they are bigger than the stage go to the next line but tahy stay all in the same location
Stage.scaleMode = "noScale";
Stage.align = "TL";
var galXml:XML = new XML();
galXml.ignoreWhite = true;
this.createEmptyMovieClip("holder", this.getNextHighestDepth());
var gap:Number;
galXml.onLoad = function(yes) {
if (yes) {
var xmlRoot = this.firstChild;
trace(xmlRoot.childNodes.length);
_global.total=xmlRoot.childNodes.length
for (var i:Number = 0; i<xmlRoot.childNodes.length; i++) {
var photos = xmlRoot.childNodes*;
//var leg = xmlRoot.childNodes*.firstChild.firstChild.nodeValue;
var pic = xmlRoot.childNodes*.lastChild.firstChild.nodeValue;
//trace(pic);
var pictures = holder.attachMovie("thumb_mc", "thumb_mc"+i, i);
pictures.empty_mc.loadMovie(pic);
/*
pictures._x = 0+(pictures._width+10)*i;
if (holder._width>Stage.width) {
pictures._x=0+gap
pictures._y = 150;
gap+=180
}
*/
if (i == xmlRoot.childNodes.length-1) {
trace(holder._width);
}
}
} else {
_root.info_txt.text = "there was an error loading the xml";
}
};
galXml.load("xml/gallery.xml");
the xml
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<gallery>
<photo>
<name>Alexandre </name>
<img>images/small/alex_thumb_1.jpg</img>
</photo>
<photo>
<name>Angela </name>
<img>images/small/ni_thumb_1.jpg</img>
</photo>
<photo>
<name>Alexandre </name>
<img>images/small/alex_thumb_1.jpg</img>
</photo>
<photo>
<name>Angela </name>
<img>images/small/ni_thumb_1.jpg</img>
</photo>
<photo>
<name>Alexandre </name>
<img>images/small/alex_thumb_1.jpg</img>
</photo>
<photo>
<name>Angela </name>
<img>images/small/ni_thumb_1.jpg</img>
</photo>
</gallery>
thanks