Ahh can anyone help me out here, I need the xml to cycle through the nodes but not loop throught them once outputted, so when it has cycled through all the xml up until the end, I wish for the loop to stop.
Anyone know a quick solution?
[AS]
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(“greeting.xml”);
//
function first_item() {
delay = 5000;
p = 0;
display§;
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 = true;
//
out = new TextFormat();
out.underline = false;
//
mc_XML.greetingText._alpha = 100;
mc_XML.greetingText.text = caption[pos];
timer();
}
function fadeout() {
this.onEnterFrame = function() {
if (mc_XML.greetingText._alpha>=0) {
mc_XML.greetingText._alpha -= 5;
} else {
display§;
p++;
delete this.onEnterFrame;
}
};
}
[/AS]