home | about this site | will call | papers, tutorials, etc | online journal | random thoughts


  Using XML and Flash  
  This is an example of a quiz created in Flash. The title, question and answers are dynamic text that are read from and XML file. This allows the Flash module to be easily reused with different content. This quiz and the XML file may be downloaded. The text can be changed in the XML file to create a new quiz.  
  Try the quiz. Try the quiz.  
  This quiz loads the questions and answers from an XML file. The file text is shown below. You may copy this code and paste in a text editor. All of the text in green can be changed to create a new quiz with this Flash template. Just make sure that you save the Flash file (swf) and XML file in the same folder.  



<!DOCTYPE quiz [
  <!ELEMENT quiz (title, items)>
  <!ELEMENT title (#PCDATA)>
  <!ELEMENT items (item)+>
  <!ELEMENT item (question, answer, answer+)>
  <!ELEMENT question (#PCDATA)>
  <!ELEMENT answer (#PCDATA)>
  <!ATTLIST answer correct (y) #IMPLIED>

 <title>A Quiz About Internet Stuff (8/23/2005)</title>
    <question>A java program that runs within a browser</question>
    <answer correct="y">Applet</answer>
    <question>Extensible Markup Language.</question>
    <answer correct="y">XML</answer>
    <answer>Dynamic Link Library</answer>
    <question>Security software installed between a company LAN and the     Internet.</question>
    <answer correct="y">Firewall</answer>
    <answer>OLE Control</answer>
    <question>The Internet began as this in 1969.</question>
    <answer correct="y">ARPANET</answer>