Hello all!! I’m currently working on a personal website that has an XML of swfs that are continually loaded into my main movie clip at random. In other words, one randomly selected swf will play to the end and then another one will load directly after it.
I found a way to make it all work using onEnterFrame but I’m still getting the following error message:
Error opening URL file:///C|/Documents%20and%20Settings/Owner.ME.000/My%20Documents/My%20Docs/Site2/undefined
It’s strange because it works pretty well, and this error message doesn’t appear 100% of the time (only about 60 to 70%).
Anyhow, here’s my code, any suggestions you could give me would be great: I would also like to find a way to avoid playing the same Swf 2 times in a row (I’m a newb, I need help):
function loadXML(loaded) {
if (loaded) {
var nodes = this.firstChild;
poo = [];
for (i=0; i<nodes.childNodes.length; i++) {
poo* = nodes.childNodes*.childNodes[1].firstChild.nodeValue;
number = nodes.childNodes.length;
p = Math.floor(Math.random()*number);
holder_mc.loadMovie(poo[p]);
}
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("thoughts/thoughts.xml");
onEnterFrame = function () {
if (holder_mc._currentframe == holder_mc._totalframes) {
p = Math.floor(Math.random()*number);
holder_mc.loadMovie(poo[p]);
}
}
Thanks :afro: