# Please help me on this!

**URL:** <https://forum.kirupa.com/t/please-help-me-on-this/140341>\
**Category:** Uncategorized\
**Created:** [March 10, 2005, 7:43am UTC](https://forum.kirupa.com/t/please-help-me-on-this/140341 "2005-03-10T07:43:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tengngan](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@tengngan](https://forum.kirupa.com/u/tengngan)\
**Post date:** [March 10, 2005, 7:43am UTC](https://forum.kirupa.com/t/please-help-me-on-this/140341/1 "2005-03-10T07:43:01Z")

</div>

Hi every senior and expert,

Actually i just want to use the function of creating menu from this tutorial ([[color=#800080]http://www.kirupa.com/web/xml/examples/squirrelfinder.htm[/color]](http://www.kirupa.com/web/xml/examples/squirrelfinder.htm))  
and the function to showing portfolio from this tutorial ([[color=#800080]http://www.kirupa.com/web/xml/examples/portfolio.htm[/color]](http://www.kirupa.com/web/xml/examples/portfolio.htm)).

But the problem is i try many time it still cant work load the image!

So can you all help me on this?

**Below are the code i try:**

var thumb\_spacing = 25;  
var item\_count = 0;

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.firstChild.childNodes;  
for (var i = 0; i \< portfolioPictures.length; i++){  
var currentPicture = portfolioPictures\*;  
var portname = portfolioPictures\*.childNodes[0];  
var description = portfolioPictures\*.childNodes[1];

var currentThumb\_mc = menu\_mc.attachMovie ("menu\_item "+item\_count, item\_count);  
currentThumb\_mc.\_y = item\_count \* thumb\_spacing;  
item\_count++;

currentThumb\_mc.species\_txt.text = portname.firstChild.nodeValue;  
currentThumb\_mc.main\_btn.location\_text = description.firstChild.nodeValue;

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

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(“portfolio.xml”);

**This is the XML code:**

\<?xml version=“1.0” ?\>  
\<portfolio\>  
\<menuitems\>  
\<picture type = “ads”\>  
\<portname\>001\</portname\>  
\<description\>“portfolio\_text/001.txt”\</description\>  
image = “portfolio\_images/mm001/mm001.jpg” /\>

\<picture type = “ads”\>  
\<portname\>002\</portname\>  
\<description\>“portfolio\_text/002.txt”\</description\>  
image = “portfolio\_images/mm002/mm002.jpg” /\>

\<picture type = “ads”\>  
\<portname\>003\</portname\>  
\<description\>“portfolio\_text/003.txt”\</description\>  
image = “portfolio\_images/mm003/mm003.jpg” /\>  
\</menuitems\>  
\</portfolio\>

[color=red]PLEASE HELP ME ON THIS!!

THANKS A LOT!![/color]
