Trouble passing xml file name to function

Hi folks,

I’m new to AS3, I’m wondering if anyone could please help me out.

I have an index.swf that loads thumbnail images from this file (projects_list.xml).

When the user clicks on a thumbnail image I want it to pass the selected thumbnails “link” node information to the callFull function. You can see that I have managed to get it to work when I use the real path name. I just can’t figure out how to pass the link node text.

Many Thanks
Sylvia

projects_list.xml file set up

<project id="0" name="Con" thumb="portfolio/images/con/thumbs/web_1_200pix.jpg" htm="" link="portfolio/xml/desc/desc_con.xml"></project>

desc_con.xml file set up (details file)

<project id="0" name="con">
<desc><![CDATA[<h2>Project: Con</h2><br/><p>Description of project here</p>]]></desc>
<full_images>
<logo tag="Logo">portfolio/images/con/full_size/logo_300pix.jpg</logo>
<web_1 tag="Web Page 1">portfolio/images/con/full_size/web_1_300pix.jpg</web_1>
<web_2 tag="Web Page 2">portfolio/images/con/full_size/web_2_300pix.jpg</web_2>
</full_images>
</project>

Here is the edited down version of my AS 3 code with just the snippets I thought were important.
AS CODE

var myXMLLoader:URLLoader = new URLLoader();
myXMLLoader.load(new URLRequest("portfolio/xml/projects_list.xml"));
myXMLLoader.addEventListener(Event.COMPLETE, processXML);
function processXML(e:Event):void {
var myXML:XML = new XML(e.target.data);
my_project = myXML..project;
my_thumb_images = my_project.@thumb;
my_full_link= my_project.@link;
createContainer();
callThumbs();
}
 
function createContainer():void {
container_mc = new MovieClip();
container_mc.x = my_x;
container_mc.y = my_y;
addChild(container_mc);
container_mc.addEventListener(MouseEvent.CLICK, callFull);
}
 
function callThumbs():void {
for (var i:Number = 0; i < my_project_total; i++) {
var thumb_url= my_thumb_images*;
var thumb_loader = new Loader();
thumb_loader.load(new URLRequest(thumb_url));
thumb_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded);
thumb_loader.name = i;
var thumbText:String = my_thumb_name*.toString();
htmlThumbText= thumbText;
thumbName.htmlText = htmlThumbText;
container_mc.addChild(thumbName);
}
 
function thumbLoaded(e:Event):void {
//trace("thumb loaded");
var my_thumb:Loader = Loader(e.target.loader);
container_mc.addChild(my_thumb);
}
 
function callFull(e:Event):void {
//var Full_xml= "portfolio/xml/desc/desc_con.xml";//this works
var Full_xml= my_full_link;//this works but it's loading all the xml files not just the one associated with the thumbnail I have selected
trace("Full_xml= "+Full_xml);
var myXMLURL:URLRequest=new URLRequest(Full_xml);
var urlLoader=new URLLoader(myXMLURL);
urlLoader.load(new URLRequest(Full_xml));
urlLoader.addEventListener(Event.COMPLETE,parseDescXML);
}
 
function parseDescXML(e:Event):void {
var myDescXML:XML = new XML(e.target.name);
my_full_link = myDescXML.project;
}