# Xml photo gallery

**URL:** <https://forum.kirupa.com/t/xml-photo-gallery/140930>\
**Category:** Uncategorized\
**Created:** [March 15, 2005, 3:59pm UTC](https://forum.kirupa.com/t/xml-photo-gallery/140930 "2005-03-15T15:59:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nytewlkr](https://avatars.discourse-cdn.com/v4/letter/n/b5ac83/32.png) [@nytewlkr](https://forum.kirupa.com/u/nytewlkr)\
**Post date:** [March 15, 2005, 3:59pm UTC](https://forum.kirupa.com/t/xml-photo-gallery/140930/1 "2005-03-15T15:59:24Z")

</div>

I know this has been covered several times but I can’t seem to get this to work. I have been all over the place reading about flash and xml. I have my thumbnails and images, etc. working. What I want now is …

I have about 20 images and I want my images to load into 5 columns (4 rows), I want a dynamic border around my Large image that loads, and a dynamic border around my thumnail that is highlighted. I don’t know how to call this into flash from the xml file? [xml file here](http://www.jfiore.com/xmlphoto.xml)

> var thumb\_spacing = 40;

var description\_lv = new LoadVars();  
description\_lv.onData = function(raw\_text){  
description\_txt.text = raw\_text;  
}

function GeneratePortfolio(portfolio\_xml){  
var portfolioPictures = portfolio\_xml.firstChild.childNodes;  
for (var i = 0; i \< portfolioPictures.length; i++){  
var currentPicture = portfolioPictures\*;

var currentThumb\_mc = menu\_mc.createEmptyMovieClip(“thumbnail\_mc”+i,i);  
currentThumb\_mc.\_x = i \* thumb\_spacing;

currentThumb\_mc.createEmptyMovieClip(“thumb\_container”,0);  
currentThumb\_mc.thumb\_container.loadMovie(currentPicture.attributes.thumb);

currentThumb\_mc.title = currentPicture.attributes.title;  
currentThumb\_mc.image = currentPicture.attributes.image;  
currentThumb\_mc.description = currentPicture.attributes.description;

currentThumb\_mc.onRollOver = currentThumb\_mc.onDragOver = function(){  
info\_txt.text = this.title;  
}  
currentThumb\_mc.onRollOut = currentThumb\_mc.onDragOut = function(){  
info\_txt.text = “”;  
}  
currentThumb\_mc.onRelease = function(){  
image\_mc.loadMovie(this.image);  
description\_lv.load(this.description);  
}  
}  
}

var portfolio\_xml = new XML();  
portfolio\_xml.ignoreWhite = true;  
portfolio\_xml.onLoad = function(success){  
if (success) GeneratePortfolio(this);  
else trace(“Error loading XML file”);  
}

portfolio\_xml.load(“xmlphoto.xml”);

Thank you for your help.
