Thanks for your quick reply. The problem was exactly as you suggested(sequence of lines and placement of p++). When I changed as you have written it all runs properly but i get a text error at the very end, saying url not found. I then removed the p++ and the trace function from the loop and place it in the parent loadPix function and there is no longer an error. Sweet. Thanks again.
Its my first adventure into loading content using XML and I have a quick question regarding loading XML images. There seems to be many people with experience loading content with XML in these forums, so I hope someone could shed some light on this issue.
I’m trying to learn how to load multiple images from an XML file and place each image in a new location(all working correctly). The only problem is that my first image is always shown loaded twice and as a consequence the final image is ommitted!
I’ve assigned a trace function to let me know when each image is loaded stating the index number, and to trace when all mage have finished loading. This works fine, but oddly enough, the repeated image mentioned above seems to have different index numbers,  & ! But there is no problem with the xml file.
Additionally when I set the index variable to start at 1 instead of 0 then the second image is loaded in twice! which points to the error being in the code. See the code here on pastie in a nice twilight theme! CODE
Its probably something very simple that I’m not seeing. Any help would be greatly appreciated. Cheers