Hi all, nearly got this problem just cant find the right code to solve it.

At the moment i am using a function to display all of the images in a horizontal row. (this is just a snippet of the important bits)

PHP Code:
function processXML(e:Event):void{
    
    var 
myXML:XML = new XML(e.target.data);
    
xPos 0;
    
yPos myXML.@YPOSITION;
    
thumbWidth myXML.@WIDTH;
    
thumbHeight myXML.@HEIGHT;
    
images myXML.project.IMAGE;
    
total images.length();
    
    
createContainer();
    
callThumbs();
    
    
XMLLoader.removeEventListener(Event.COMPLETE,processXML);
    
XMLLoader null;
}

function 
callThumbs():void
{
    for(var 
i:Number 0totali++)
    {
        var 
thumb_url images[i].@THUMB;
        var 
thumb_loader = new Loader();
        
thumb_loader.load(new URLRequest(thumb_url));
        
thumb_loader.contentLoaderInfo.addEventListener(Event.COMPLETEthumbLoaded);
        
thumb_loader.name i;
        
thumb_loader.=(thumbHeight+10)* x_counter;
        
thumb_loader.=(thumbHeight+10)* y_counter;
        
y_counter++;
    }

in my XML for each project i want it to add the images in the <project> tag and then go onto the next row when the next <project> begins.

here is my XML

PHP Code:
<?xml version="1.0" encoding="utf-8"?>
<projects XPOSITION="30" YPOSITION="30" WIDTH="200" HEIGHT="100">
<project>
<IMAGE FULL="full_images/image1.jpg" THUMB="thumbs/thumb1.jpg" />
<IMAGE FULL="full_images/image2.jpg" THUMB="thumbs/thumb2.jpg" />
<IMAGE FULL="full_images/image3.jpg" THUMB="thumbs/thumb3.jpg" />
<IMAGE FULL="full_images/image4.jpg" THUMB="thumbs/thumb4.jpg" />
</project>
<project>
<IMAGE FULL="full_images/image5.jpg" THUMB="thumbs/thumb5.jpg" />
<IMAGE FULL="full_images/image6.jpg" THUMB="thumbs/thumb6.jpg" />
<IMAGE FULL="full_images/image7.jpg" THUMB="thumbs/thumb7.jpg" />
<IMAGE FULL="full_images/image8.jpg" THUMB="thumbs/thumb8.jpg" />
<IMAGE FULL="full_images/image9.jpg" THUMB="thumbs/thumb9.jpg" />
</project>
</projects>
i am sure i have all of the code i need apart from one piece which tells it that at the end of the project start a new row.

would really appreciate any help.

thanks
Dan