hi…
i want to create xml looping for infinite thumbnail
<images>
<image source="images/Image1.jpg" thumb="thumbnails/thumb1.jpg">Description of image 1.</image>
<image source="images/Image2.jpg" thumb="thumbnails/thumb2.jpg">Description of image 2.</image>
<image source="images/Image3.jpg" thumb="thumbnails/thumb3.jpg">Description of image 3.</image>
<image source="images/Image4.jpg" thumb="thumbnails/thumb4.jpg">Description of image 4.</image>
<image source="images/Image5.jpg" thumb="thumbnails/thumb5.jpg">Description of image 5.</image>
<image source="images/Image6.jpg" thumb="thumbnails/thumb6.jpg">Description of image 6.</image>
<image source="images/Image7.jpg"thumb="thumbnails/thumb7.jpg">Description of image 7.</image>
</images>
this my xml code
var imageLoader:Loader;
var xml:XML;
var xmlList:XMLList;
var xmlLoad:URLLoader = new URLLoader();
xmlLoad.load(new URLRequest("iphoneThumb_xml1.xml"));
xmlLoad.addEventListener(Event.COMPLETE, xmlLoaded);
function xmlLoaded(event:Event):void
{
xml = XML(event.target.data);
xmlList = xml.children();
for(var i:int = 0; i < xmlList.length(); i++)
{
imageLoader = new Loader();
imageLoader.load(new URLRequest(xmlList*.attribute("thumb")));
imageLoader.x = i * 125 + 25;
loaderImage.addChild(imageLoader);
trace(i);
}
}
and this my function for looping
thanks people for help this thread