XML Loads but appears to be empty

Hi everyone,

I really hope someone can help with this, and i’m sure it’s something minor that i’m missing but as everyone here should know after a certain amount of time you become blind to the obvious…sorry i’m starting to rambble,

So here’s my problem… I’m building a portfolio section of our website where we have several sections for example: TVC, DigiFX, Audio, etc.

I have one xml file controlling that part which works a treat (thanks to gotoAndlearn()). The script reads the xml and places (depending on how many nodes are in the xml) x number of tv screens in a carousel style layout where the user can select a category. Now this is where things go pearshaped… When a user selects a ‘TV’ a variable is set to tell which category was selected and loads the appropate xml for that section.

I have a few traces which gives me this output:

SelectedTV = _level0.TV0
Current XML playlist= portfolio/TVC_playlist.xml
videos Array =
videos Array 0 = undefined
flvTitle 0 = undefined
flv URL 0 = undefined
PlayListXML Loaded = true
PlayListXML Status = 0
PlayListXML Total File Size in Bytes = 2942
PlayListXML Length = 0

PlayListXML Node Contents = undefined
PlayListXML Length = 0

as you can see the xml gets loaded (even has the correct file size) but shows up as empty or 0 in length when i know there’s 7 and the videos array is empty.

Here’s a snippet of the function i’m using for onLoad (thou to get the whole picture you might need to see the fla, if anyone can help me with this and needs the fla and xml files let me know):

PlayListXML.onLoad = PlayListXMLLoad;

//FLV PlayList XML onLoad Function
function PlayListXMLLoad(loaded)
{
if(loaded)
{
trace("Current XML playlist= "+SelectedTV.playlist);
var videos:Array = PlayListXML.firstChild.childNodes;
PlayListLength = videos.length;

for (var v=0; v<videos.length; v++)
{

flvPlayList.addItem(videos[v].attributes.flvtitle, videos[v].attributes.url);
videos[v].attributes.desc, videos[v].attributes.url, videos[v].attributes.client, videos[v].attributes.flvtitle;
Info.push(videos[v].attributes.desc);
ClipTitle.push(videos[v].attributes.flvtitle);
flvURL.push(videos[v].attributes.url);
Clients.push(videos[v].attributes.client);
//trace("videos Array = "+videos);
}
ns.pause(flvPlayList.getItemAt(0).url);
flvPlayList.selectedIndex = 0;
flvTitle.text = ClipTitle[0];
Client.text = Clients[0]; //videos[0].attributes.client;
description.text = Info[0];

trace("videos Array = "+videos);
trace("videos Array 0 = "+videos[0]);
trace("flvTitle 0 = "+ClipTitle[0]);
trace("flv URL 0 = "+flvURL[0]);
trace("PlayListXML Loaded = "+PlayListXML.loaded);
trace("PlayListXML Status = "+PlayListXML.status);
trace("PlayListXML Total File Size in Bytes = "+PlayListXML.getBytesTotal());
trace(“PlayListXML Length = “+PlayListLength);
trace(””);
trace("PlayListXML Node Contents = "+PlayListXML.firstChild.childNodes[0].nodeValue);
trace("PlayListXML Length = "+PlayListXML.firstChild.childNodes.length);
}else{
trace(“Can Not do ‘onLoad’”);
}
}

and here’s stripped down version what my xml file looks like (which i have used before and works fine, but that was with a single viewing GUI ie one tv screen and playback):

<videos>

<video url=“urlPathToFLV.flv” flvtitle=“FLVTITLE” desc=“Description of FLV can be long could that be an issue?”
client=“ClientForThatProject”/>

</videos>

…and I have 7 <video url="" flvtitle="" desc="" client=""/>

Cheers
P.S. This was done with CS3 but using AS2, since i first started the project with F8 and don’t have the time at the moment to convert it to AS3.