XML/Flash Problem

Hi, I’m trying to load information from an XML file into a textbox in Flash. Some of the information is just made up for this testing. So, the following code is placed into the first (and only) frame on the timeline along with a dynamic textbox with the variable name “textBox”…

 textBox = "";
titlesArray = new Array(); 
function pushArray() {
trace (objXML.firstChild.childNodes.length);
for (var count = 1; count < objXML.firstChild.childNodes.length; count++) {
nodeObj = objXML.firstChild.childNodes[count];
titlesArray[count] = nodeObj.attributes.title;
trace(titlesArray[count]);
textBox = titlesArray[count];
}
}
 
// load XML doc
 
objXML = new XML();
objXML.onLoad = loadXML;
objXML.load("xmldocument.xml");
 
// onLoad XML function
function loadXML(success) {
if (success) {
_root.pushArray();
} else {
}
}
 

And the XML below is stored in the filename “xmldocument.xml”…

 
<WEBSITES>
<WEBSITE title="XMLStuff"/>
<WEBSITE title="DavidFox"/>
<WEBSITE title="Thirdone"/>
</WEBSITES>

It looks like Flash is returning the wrong amount of nodes in the XML document so I really don’t know what I’m doing wrong.

Any help would be greatly appreciated.

objXML = new XML();
objXML.ignoreWhite = true;
objXML.onLoad = loadXML;

I’m a **** FOOL!!!

I completely missed that and it’s something I helped somebody else out with before!!!

I guess I don’t practice what I preach!!!

Thanks anyway and take it easy,
Dave

They ban the word [edited] here!?!?

I wouldn’t elude the filter like that – last time I did I got a firm “hey, don’t do that”. Just passing along my past experience. :wink:

(but that is ridiculous, since you can even say the d-word in a G-rated movie, along with *****ing and a few other soft curse words)

yeah movies have gone to h… heck

Why have a ratings system when everything is socially acceptable? :sigh: