This final page will show the different quiz/survey structures modified to pull content data from external xml files. For completeness, we include not only the CheckBox quiz and ComboBox quiz from this tutorial, but also the RadioButton quiz from the tutorial, An XML-based RadioButton Quiz in Flash CS3. That tutorial provides detailed comments on ActionScript file loading and XML parsing, so we will not repeat that information here. See the links at the bottom of this page to download the well-commented fla and xml files for these examples.
CheckBox Quiz
The quiz shown below uses the XML data that follows:
The following is the content of the file ckQuizData.xml that must be included in the same subdirectory as the html and swf files.
<?xml version="1.0" encoding="utf-8"?>
<quiz>
<globalSettings titleText="History of Mathematics" titleSize="24" />
<question>
<setup claim="Who invented calculus?" questionWidth="400" questionHeight="30" fontSize="14" fontColor="0x000099" answerHeight="30" />
<answers choice="Leibniz" correct="1" />
<answers choice="DeMorgan" />
<answers choice="Gauss" />
<answers choice="Newton" correct="1" />
<answers choice="Hilbert" />
<answers choice="Euclid" />
</question>
<question>
<setup claim="What was the name of the Simon Stevin 1586 pamphlet that popularized decimals?" questionWidth="500" questionHeight="30" fontSize="12" fontColor="0x000000" answerHeight="30"/>
<answers choice="Liber Abbaci" />
<answers choice="Nine Chapters" />
<answers choice="The Tenth" correct="1" />
<answers choice="Arithmetica" />
<answers choice="Principia Mathematica" />
</question>
<question>
<setup claim="What people wrote the collection of problems in the Rhind Papyrus?" questionWidth="450" questionHeight="30" fontSize="14" fontColor="0x000099" answerHeight="30" />
<answers choice="Greeks" />
<answers choice="Romans" />
<answers choice="Indians" />
<answers choice="Egyptians" correct="1" />
</question>
</quiz>
ComboBox Quiz
The quiz shown below uses the XML data that follows:
The following is the content of the file cbQuizData.xml that must be included in the same subdirectory as the html and swf files.
<?xml version="1.0" encoding="utf-8"?>
<quiz>
<globalSettings titleText="History of Mathematics" titleSize="24" />
<question>
<setup claim="What was the name of the Simon Stevin 1586 pamphlet that popularized decimals?" questionWidth="500" questionHeight="50" fontSize="12" fontColor="0x000000" answerHeight="30"/>
<answers choice="Liber Abbaci" />
<answers choice="Nine Chapters" />
<answers choice="The Tenth" correct="1" />
<answers choice="Arithmetica" />
<answers choice="Principia Mathematica" />
</question>
<question>
<setup claim="What people wrote the collection of problems in the Rhind Papyrus?" questionWidth="450" questionHeight="30" fontSize="14" fontColor="0x000099" answerHeight="30" />
<answers choice="Greeks" />
<answers choice="Romans" />
<answers choice="Indians" />
<answers choice="Egyptians" correct="1" />
</question>
</quiz>
RadioButton Quiz
This is the same application shown in the tutorial, An XML-based RadioButton Quiz in Flash CS3. Read more information about the details there.
Downloads
Download the fla and xml files for the applications shown above.
- CheckBox quiz CheckBoxXMLQuiz.fla with external data file ckQuizData.xml
- ComboBox quiz ComboBoxXMLQuiz.fla with external data file cbQuizData.xml
- RadioBox quiz RadioBoxXMLQuiz.fla with external data file rbQuizData.xml










