A Sample XML File
The XML (extensible markup language) file appears to be the standard way for content from differing applications, created in under different operating systems, to be communicated across the internet. It has a vague simiarity to html, but the tags are user defined. In my case, I defined tags <q> for the question, <c> for the choice and <a> for the answer. One reason that this appears to be the correct way to generalize the content for the AcedemiaMania game is that it is difficult to program new content into Flash for each new subject for which a person may want use the game. So if Flash can be set up with only game play, scoring, question fields and answer fields, with access to the content that goes into these fields from an external text file, the game may be generic andadaptable to a wide variety of subjects. It turns out that Flash does have the ability to read and incorporate XML files and this is how the Math Jeopardy Game was transformed into AcademiaMania.
The reason that a simple text file cannot be used is that for each question there are a number of attributes (data about the data) that need to be communicated to the game; for example, the time duration allowed for the question (time), the correct answer (ans), what is the point value of the question, what is an image or movie associated with the question (img and mov) and what is the quesiton style (stl). The question style is what sets the question "stage" to be used in Flash. At present, I have not created stages to incorporate the mov and img attributes. At present, I have created only mc5 and mc4 style attributes corresponding to 5 choice and 4 choice multiple choice questions. However, the types of question stages is virtually limitless. The attibute fields are highlighted in red for the first few lines. The text content itself is highlight in blue.
To create content for a different topic or subject, one needs only to edit the red text to suit their particular attributes and blue text for the actual content to create a game for an entirely different topic. A future plan for this game is to write a script to make this process more user friendly, a "question creator" and "question viewer", in which the XML file is generated from user input from a menu driven screen. One area that seems a bit limiting is that I do not presently see how to embed html tags within the xml file. This will prevent some text formatting features. This is presently viewed as a minor limitation. Another area, perhaps more sigfniciant than formatting, is that I did not initially see how to incorporate special characters. For complex equations, this will need to be done using the img attribute. But I did discover a useful feature that allows incorporation of rudimentary greek letters and mathematical symbols. Notice that UTF-8 character set in the header of the XML file. This is a fairly extensive set of characters in foreign languages, as well as symbols. Fortunately it is a simple matter to incorporate these characters into the XML file.
The following is the XML file that generates the "Definitions and Concepts" row in the game:
<?xml version="1.0" encoding="UTF-8"?>
< !-- q symbolizes a question, there are up to 9 of these per button
for example 234 is row 2, button (score) 3 and the fourth question;
a symbolizes the answer,
c symbolizes a choice (such as a through e) -->
< !-- Topic 1: Definitions and Concepts -->
< topic>
< q pnts="1" deep="1" time="30" ans="d" img="null" mov="null" stl="mc5">
A vector may be represented by:
<
c>a point on a graph.</c>
<
c>an x and a y coordinate.</c>
<
c>a line of a given length.</c>
<
c>an arrow of a given length and direction.</c>
<
c>a trigonometric identity.</c>
<
a>an arrow of a given length and direction.</a>
< /q>
< q pnts="2" deep="1" time="30" ans="e" img="null" mov="null" stl="mc5">
Which of the following is an acceptable definition of a vector?
<
c>The set of all possible rays of a given direction. </c>
<
c>The set of all points in space with a given set of
ordered coordinates. </c>
<
c>The set of all line segments of a specified length. </c>
<
c>The set of all line segments of a specified direction. </c>
<
c>The set of all line segments of a specified length
and direction. </c>
<
a>The set of all line segments of a specified length
and direction. </a>
< /q>
< q pnts="3" deep="1" time="30" ans="c" img="null" mov="null" stl="mc5">
Which of the following statements is not true regarding vectors?
<
c>A vector must be described by a magnitude and a direction. </c>
<
c>The magnitude of a vector is described by a scalar. </c>
<
c>A scalar and a vector are opposite in direction. </c>
<
c>The direction of a vector may be expressed by an angle. </c>
<
c>A vector may be expressed by x and y components. </c>
<
a>A scalar and a vector are opposite in direction. </a>
< /q>
< q pnts="4" deep="1" time="30" ans="b" img="null" mov="null" stl="mc5">
A ray may or may not represent a vector:
<
c>may, because they are both represented by arrows. </c>
<
c>may not, because a ray is of infinite length. </c>
<
c>may not, because a vector is of infinite length. </c>
<
c>may not because a ray is of finite length. </c>
<
c>may because the direction of a ray and a vector is
specified. </c>
<
a>may not, because a ray is of infinite length. </a>
< /q>
< q pnts="5" deep="1" time="30" ans="d" img="null" mov="null" stl="mc5">
The magnitude of a vector connecting two points in space is found by:
<
c>the sum of the magnitudes of the vectors.</c>
<
c>the inverse tangent of the ratio of the x component
to the y component.</c>
<
c>the inverse tangent of the ratio of the y component
to the x component.</c>
<
c>the square root of the some of the squares of the
x and y components.</c>
<
c>the tangent of the ratio of the y component to the
x component.</c>
<
a>the square root of the some of the squares of the
x and y components.</a>
< /q>
<
q pnts="5" deep="2" time="30" ans="e" img="null" mov="null" stl="mc5">
The direction of a vector connecting two points in space is found by:
<
c>the sum of the magnitudes of the vectors.</c>
<
c>the inverse tangent of the ratio of the x component
to the y component.</c>
<
c>the inverse tangent of the ratio of the y component
to the x component.</c>
<
c>the square root of the some of the squares of the
x and y components.</c>
<
c>the tangent of the ratio of the y component to the
x component.</c>
<
a>the tangent of the ratio of the y component to the
x component.</a>
< /q>
< q pnts="5" deep="3" time="30" ans="c" img="null" mov="null" stl="mc5">
The opposite of a vector it can be found by
<
c>rotating it clockwise 90°.</c>
<
c>rotating it counterclockwise by 90°.</c>
<
c>taking the opposite the x and y components.</c>
<
c>the inverse tangent of the ratio of the y component
to the x component.</c>
<
c>the square root of the some of the squares of the
x and y components.</c>
<
a>taking the opposite the x and y components.</a>
< /q>
< /topic>