Building a Quiz type application
Greetings all. I'm new to animate, and have dabbled in flash in the past. I am working on a project in Animate CC 2017 that will read in a XML file that contains question and answers to a Quiz. On the first frame of the timeline I load the XML file and start process it. This is the XML file I am using:
<?xml version="1.0" encoding="utf-8"?>
<TEST>
<TITLE>Test over Training Aide: A-1</TITLE>
<DESCRIPTION>This test will check your understanding of the material covered in Training Aide: A-1</DESCRIPTION>
<POINTS TOTAL="10" PASSING="8" />
</TEST>
This is the code I have in frame on of the timeline:
var xmlTest:XML;
var urlLoader:URLLoader = new URLLoader();
urlLoader.load(new URLRequest("a-1.xml"));
urlLoader.addEventListener(Event.COMPLETE, processXML);
function processXML(e:Event):void {
xmlTest = new XML(e.target.data);
txtTitle.text = xmlTest.TITLE;
txtDescription.text = xmlTest.DESCRIPTION;
txtScore.text = "To pass you must get " + xmlTest.POINTS.@PASSING + " out of " + xmlTest.POINTS.@TOTAL + " correct.";
gotoAndStop(2);
}
On Frame 2 I have 3 dynamic text area to display the information. Loaded from the XML file. It works as designed when I go to debug it in animate, but when I run it from a browser, all I get is a blank screen. When I run it in the browser I open the file form explorer by right click and clicking on open in Internet explorer. I am at a loss, any help would be greatly appreciates. Thank you