Hi,
I am writing a bit of actionscript that loads an xml file and displays movie clips etc.. appropriately on the stage. However I have come to bit of problem where i want to reset the display via a function through loading a different xml file. I have loaded the new file but the display doesn't change as if its still loaded the previous xml.
Below is the first bit of code that loads the first xml object and runs my function that alters the mcs on the stage.
function CallLineFunction1() {
xmlFile1="test.xml"
// set up XML object
var my_xml1 = new XML();
my_xml1.ignoreWhite = true;
my_xml1.onLoad = function(success){
generateRW(my_xml1);
}
// load xml into object
my_xml1.load(xmlFile1);
}
This works fine. However on the click of a button, I want to load a new xml file to again alter the mcs on the stage. I am using this code to do this:
function CallLineFunction2() {
xmlFile2="with_disruption_statuses.xml"
// set up XML object
var my_xml2 = new XML();
my_xml2.ignoreWhite = true;
my_xml2.onLoad = function(success){
generateRW2(my_xml2);
}
// load xml into object
my_xml.load(xmlFile2);
}
Whilst I've tested that my second generateRW2 statement is run (which it is) the display stays the same using the attributes of the old xml.
I've tried using the delete command but to no avail,
I'm hoping I don't have to copy everything to a second frame and run it from there as there are multiple layers and hundreds of mcs that require alteration depending on the xml data.
Any help appreciated!