Basically, im reading xml into an array to create 2 internal arrays (location and videofile) within the array (location and videofile) but when i try to read in from the first array at a certain selection into the second array it is just coming up "undefined".

heres the code for parsing in the xml to the first array:

function displayFiles(param)
{
filelist_xml = new XML();
filelist_xml.ignoreWhite = true;
filelist_xml.onLoad = function(success)
{
if (success)
{
var startTime = getTimer();

var files_xml = filelist_xml.firstChild;
for (var i = 0; i < files_xml.childNodes.length; i++)
{
var fileData = new Object();
for (var j = 0; j < files_xml.childNodes[i].childNodes.length; j++)
{
fileData[files_xml.childNodes[i].childNodes[j].nodeName] = files_xml.childNodes[i].childNodes[j].firstChild.nodeValue;
}
filelist_arr.push(fileData);
DislpayFilesArray.push(fileData);
}

// remove existing tabs
removeElements();
// check length
len = DislpayFilesArray.length;
trace("Lenghth: "+len);

// show scroll arrows
if (select == 1)
{
up_mc._visible = false;
}
else
{
up_mc._visible = true;
}
if ((len-select)>=20)
{
down_mc._visible = true;
}
else
{
down_mc._visible = false;
}

var tempCount = 0;
var noOfElementsToDisplay = (len-select)>=7 ? 7 : (len-(select-1));
for (var i = select; i<(select+noOfElementsToDisplay); i++)
{
var mc:MovieClip = _root.attachMovie("group_mc", "list"+i, _root.getNextHighestDepth());
mc._x = 14.2;

var diff = tempCount == 0 ? 0 : diffInBeween;
mc._y = 62.5+(tempCount*(mc._height+diff));
mc.txt.htmlText = DislpayFilesArray[i - 1].location;
mc.dumpName_txt.text = DislpayFilesArray[i - 1].videofile;
tempCount++;
}
// highlight the tab
_root["list"+select].gotoAndStop(2)
setSelectedFiles(_root["list"+select])

playSelectedVideo();
muteVideo();
/*if(!isVideoPlaying)
{
isVideoPlaying = true;
myStream.pause();
}*/
}
else
{
trace("Error loading filelist.");
}

// clean up after
delete filelist_xml;
};
filelist_xml.load("filelist.xml");
}

And the code when you press the enter button for the second array is:

on (keyPress "<Enter>")
{
stopVideo();

//SelectedFilesArray[selectedFilesCount] = DisplayFilesArray[select - 1];
//SelectedFilesArray = DisplayFilesArray.slice(select - 1, 1);
//SelectedFilesArray.push(DisplayFilesArray[select - 1]);
//DisplayFilesArray.splice(select);
SelectedFilesArray.splice(0,0, DisplayFilesArray);
file_txt.text = DislpayFilesArray[select].videofile;
//selectedFilesCount++;

var tempCount2 = 0;
var noOfElementsToDisplay = (selectedFilesCount-select)>=7 ? 7 : (selectedFilesCount-(select-1));


for (var selectedFilesCount = 0; selectedFilesCount<SelectedFilesArray.length; selectedFilesCount++)
{
var mc:MovieClip = attachMovie("group2_mc", "list"+select, getNextHighestDepth());
mc._x = 250.5;

var diff = tempCount2 == 0 ? 0 : diffInBeween;
mc._y = 62.5+(tempCount*(mc._height+diff));
mc.txt.htmlText = SelectedFilesArray[selectedFilesCount].location;
mc.dumpName_txt.text = SelectedFilesArray[selectedFilesCount].videofile;
tempCount++;
}
}