I am using this code for an RSS FEED (works Great)
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
caption = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
caption* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
}
first_item();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("news.xml");
//
function first_item() {
delay = 5000;
p = 0;
display(p);
p++;
}
function timer() {
myInterval = setInterval(ticker, delay);
function ticker() {
clearInterval(myInterval);
if (p == total) {
p = 0;
}
fadeout();
}
}
function display(pos) {
over = new TextFormat();
over.underline = false;
//
out = new TextFormat();
out.underline = false;
//
newsText._alpha = 100;
newsText.text = caption[pos];
timer();
}
function fadeout() {
this.onEnterFrame = function() {
if (newsText._alpha>=0) {
newsText._alpha -= 5;
} else {
display(p);
p++;
delete this.onEnterFrame;
}
};
}
I want to load the first child into one text box and the 2nd child into another text box. any sugestions?