Loading XML files - AS2
Hi all... hoping someone can help as I've not had much luck elsewhere. I have an extrememly basic knowledge of flash and as2. I have followed a tutorial on how to make a flash quiz and have got it going so far. However I would like to expand on it and can't seem to find info anywhere.
So... the quiz 4 scenes... a pre-loader, I've added a categories page, the quiz scene, and results. The data is loaded from an xml file where not only the questions are loaded but also the timer, scoring etc options.
My problem is how to get other xml files to load into the same quiz scene. So for instance I have a category that is geography and it loads the quiz scene movieclips and dynamic text, data populated from geography.xml. That's all good... at the end of 10 questions the results loads. Here the user can replay the same category or go back to the categories to choose a new one.
But how to now get the categories to load a different xml file? The next category being science for instance and this will load a different xml file called science.
I don't know how to get it to do this. Everything I've tried simply loads the different xml file straight away without going to the results. So one gets to the end of the set of questions and instead of going to results the movieclips reload and it starts a new set of questions from the second xml file.
I've read in other forums about creating an xml array and creating a variable to load the xmls... but the code was sequential ie it would load file1, file2, file3 etc in that order. This is not what I want... the user needs to be able to select a category and it loads the appropriate xml each time going to results at the end of the set of questions.
Would appreciate help. And if anyone can be specific ie show me what to do rather than telling me that would be even more appreciated by this noob.
Click Here to Expand Forum to Full Width
Poll by Flashkit.com