# XML parsing for thumbnails

**URL:** <https://forum.kirupa.com/t/xml-parsing-for-thumbnails/170578>\
**Category:** flash\
**Created:** [November 27, 2005, 9:20pm UTC](https://forum.kirupa.com/t/xml-parsing-for-thumbnails/170578 "2005-11-27T21:20:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dopewon](https://avatars.discourse-cdn.com/v4/letter/d/6f9a4e/32.png) [@dopewon](https://forum.kirupa.com/u/dopewon)\
**Post date:** [November 27, 2005, 9:20pm UTC](https://forum.kirupa.com/t/xml-parsing-for-thumbnails/170578/1 "2005-11-27T21:20:52Z")

</div>

I’m trying to modifiy a script I found on [Hotscripts.com](http://Hotscripts.com) for my personal portfolio. The original creates navigation buttons for the projects and loads thumbnail buttons from an external XML file. I want to take it a step further by adding another step to the process. instead of loading just the project names as buttons I want to create a “catagorie” then the the appropriate “projects”. I got the catagorie and project navigation to load but when you click the project the proper thumbnails don’t load.

the function to load the thumbnails from the project navigation looks like this:

function projectListLoad(whichproject){  
//loops through to clear the thumbnails  
for (var rr = 0; rr\<noofrow\*noofcolumn; rr++) {  
rr = rr+pageindex;  
this.thumbHolder\_mc[“thumbframe”+rr].removeMovieClip();  
this.thumbHolder\_mc[“thumbframein\_mc”+rr].removeMovieClip();  
rr = rr-pageindex;  
}  
/////////////////////////////////////////////////////////////////  
//parameters set in the XML document for thumbnails functionality  
param = this.portfolioList\_xml.firstChild.firstChild;  
pc = int(param.attributes.noofcolumn);  
pr = int(param.attributes.noofrow);  
ptx = int(param.attributes.thumbxs);  
pty = int(param.attributes.thumbys);  
\_global.ptw = int(param.attributes.thumbwidth);  
\_global.ptl = int(param.attributes.thumbheight);  
/////////////////////////////////////////////////////////////////  
//counts the # of catagories in the XML  
//sets varibles to read the format and info back to into flash  
var projectCountXML = this.portfolioList\_xml.firstChild.childNodes.child Nodes;  
projectCount = this.portfolioList\_xml.firstChild.childNodes[whichcatagorie].childNodes.length;  
var projectNode = this.portfolioList\_xml.firstChild.childNodes[whichcatagorie].childNodes[p].firstChild;//IMAGE TAG  
var projectBoxData = createResourceList(projectNode.childNodes, pc, pr, ptx, pty, ptw, ptl);//Actual Images

trace ("PROJECT COUNT = " + projectCount);  
trace ("PROJECT NODE = " + projectNode);

//catagorie NAMES GET TRANSFORMED INTO NAVIGATION///////////////////////////////////////////////////////////////////////////////  
for (p=0; p\<projectCount; p++) {  
this.projectDisplay\_mc.attachMovie(“projectNames\_m c”, “projectNames\_mc”+p, 100+p);  
this.projectDisplay\_mc[“projectNames\_mc”+p].projectnametxt.text = this.portfolioList\_xml.firstChild.childNodes[whichproject].childNodes[p].attributes.projectname;  
this.projectDisplay\_mc[“projectNames\_mc”+p].\_x = 5;  
this.projectDisplay\_mc[“projectNames\_mc”+p].\_y = p_14;  
this.projectDisplay\_mc[“projectNames\_mc”+p].sett = p;  
this.projectDisplay\_mc[“projectNames\_mc”+p].onRelease = function() {  
currentpage = 1;  
for (var rr = 0; rr\<noofrow_noofcolumn; rr++) {  
rr = rr+pageindex;  
this.thumbHolder\_mc[“thumbframe”+rr].removeMovieClip();  
this.thumbHolder\_mc[“thumbframein\_mc”+rr].removeMovieClip();  
rr = rr-pageindex;  
}  
projectListLoad(this.sett);  
\_global.whichProject = this.sett;  
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////  
};  
}  
}

I hope someone can help me with this.  
If you need the source files or any other information let me know.  
Thanks
