Hi guys,
I’m working on a news ticker off of a rss feed and I am running into a problem when it is displaying the images. It currently displays every other image ie: 1,3,5 instead of 1,2,3,4,5. Code looks solid but maybe there is something I am forgetting.
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
caption = [];
story = [];
url = [];
image = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
caption* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
story* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
url* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
image* = xmlNode.childNodes*.childNodes[3].firstChild.nodeValue;
}
initial_item();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("rss_feed.xml");
function initial_item() {
p = 0;
display(p);
}
function display(pos) {
news_mc.news_txt.text = caption[pos];
story_mc.story_txt.text = story[pos];
image_mc.loadMovie(image[pos]);
}
nextstory_btn.onRelease = function() {
p++;
display(p);
delete this.onEnterFrame;
}
the images are linked externally with full http paths. thanks for any help.