Saturday, May 12, 2007

Change in the XML files' structure

As I posted before, the Hiragana project use XML files to hold multiple question for quiz. And in the project proposal, I specified that this file contains sections with each one is one question as following:


_ url address (or identifier in the Flash library) to the Hiragana symbol
_ correct answer
_ wrong answer
_ wrong answer
_ wrong answer





However, I have made a new structure in the current version of our project which is more compact and flexible.


New structure of XML files

In this structure, I don't keep the whole multiple choice question as the previous one. Instead of that, I only keep the url address of the Hiragana symbol and its right pronunciation. Therefore, the Flash has to work more. In the old structure, it has only one task which is choose questions randomly from the file and display them onto the screen. Now, it has to create the question by itself.

Firstly, the Flash choose randomly a Hiragana symbol from the file (including the url address and the pronunciation). The pronunciation of this symbol is also the correct answer. The Flash will continue to seek for 3 other wrong answers from the remaining file. After having 1 correct answer and 3 wrong answer, it shuffles and display with the image of the Hiragana symbol.

No comments: