frozenpeas
Technical User
Hey, I am trying to set a global variable then call it from loaded movies. It seems that I am not able to access the variable from the loaded movies.
Here is where I'm setting the variable (which it does successfully):
and here is how I'm calling it from the loaded movies:
When I replace season with something else (valid folder name) it works.
Thanks.
Here is where I'm setting the variable (which it does successfully):
Code:
fscommand("showmenu", 0);
fscommand("allowscale", 0);
#include "xmlnitro.as"
configfile = new XML();
configfile.onLoad = readXML;
configfile.load('/config.xml');
function readXML () {
if (configfile.loaded) {
for (i=0; i<configfile.childNodes[2].childNodes.length; i++) {
node = configfile.childNodes[2].childNodes[i];
if (node.nodeName.toLowerCase() == "season") {
_global.season = node.childNodes;
}
}
bg = "/"+season+"/bg.swf";
menu = "/"+season+"/menu.swf";
loadMovieNum(bg, 1);
loadMovieNum(menu, 3);
} else {
readXML();
}
}
and here is how I'm calling it from the loaded movies:
Code:
bg = "/"+season+"/bg.jpg";
loadMovie(bg,"_root.blank");
home = "/"+season+"/home.swf";
loadMovieNum(home, 1);
When I replace season with something else (valid folder name) it works.
Thanks.