Hi there,
I’m having some issues with this loop:
[AS]for(var i=0; i<10; i++){
_root[‘myXML’ + i] = new XML();
_root[‘myXML’ + i].ignoreWhite = true;
_root[‘myXML’ + i].onLoad = function(ok) {
if (ok) {
allContent* = this.firstChild.firstChild.nodeValue;
amLoaded* = true;
}
}
_root[‘myXML’ + i].load(‘content/’ + names* + ‘/text.xml’ );
}[/AS]
So, I know there is an issue with this kind of thing. I use a similar script to allocate actions to MCs, but with an MC, I can store a variable inside it, so it knows who it is. With this script above, because they all come in at the same time, it only shows one lot of content.
Any suggestions on how to rewrite it? Please bare in mind, that I am actually trying to load them all at once, and not sequentially (if that makes sense)
Thanks.