I'm trying to place certain movies in certain holders.

I have .xml file, I want to determine if position = 2, then information will be place in leftholder. I'm making sure that positions childNode's name is count, loop through count's childNodes and determine mediatype. If mediatype = 1 it's text, if mediatype = 2 it's image. So, I want to be able to determine which holder to make visible when endtime becomes hit.

I'm trying to make it something like this:
<as>
lower_left_cnt = 0;
lower_left=new array();
lower_left[0][0]=mediatype;
lower_left[0][1]=info;
lower_left[1][0]=mediatype;
lower_left[1][1]=info;

//function needed for when I hit endtime

function swap_lower_left(mediatype,info)
{
hide image box;
set flashbox=myflash;
make flashbox visible;
}
</as>

I've been able to just write some actionscript to test. So, I can make sure I'm writing the actionscript right to retrieve the .xml file.

<as>
//This for loop loops through the firstChild, child nodes and checks to see which one has the name of position.
for(var n=0; n<xml.firstChild.childNodes.length;n++)
{
if(xml.firstChild.childNodes[n].nodeName=="position")
{
for(attr in xml.firstChild.childNodes[n].attributes)
{
trace(xml.firstChild.childNodes[n].nodeName +" = "+xml.firstChild.childNodes[n].attributes[attr]);
trace("attributes = " + xml.firstChild.childNodes[n].attributes[attr]+"= "+attr);
if(xml.firstChild.childNodes[n].attributes[attr]==1)
{
//Create a function right here to loop through the
child nodes to find the media type
trace(xml.firstChild.childNodes[n].childNodes);
for(var x=0;x<xml.firstChild.childNodes[n].childNodes.length;x++)
if(xml.firstChild.childNodes[n].childNodes[x].nodeName=="count")
{
trace(xml.firstChild.childNodes[n].childNodes[x].nodeName + " = " + xml.firstChild.childNodes[n].childNodes[x].attributes[attr]);
//This for loop goes throug and retrieve the childNodes of nodeName = count.
for(var l=0;l<xml.firstChild.childNodes[n].childNodes[x].childNodes.length;l++)
{

trace(xml.firstChild.childNodes[n].childNodes[x].childNodes[l].nodeName +" = "+ xml.firstChild.childNodes[n].childNodes[x].childNodes[l].firstChild);
}
trace("");
}
trace("notes loaded");
loadNotes(filename);
trace("");
}

My Output:

count = 1
mediatype = 1
information = safgsdfg
endtime = 35

count = 2
mediatype = 2
information = 718731087.TXT
endtime = 80

count = 3
mediatype = 1
information = asgfgssdfgfgfgfg
endtime = 135

count = 4
mediatype = 3
information = 1906126560.swf
endtime = 150

count = 5
mediatype = 1
information = afasdfsdfasdfasdfasdf
endtime = 175

picture loaded

I hope I'm not too confusing! But, can someone help me with a function to place the appropriate text or jpeg once the endtime has been hit.

Sincerely,
cbs