I want to build a flash based quiz app that will present users with questions and based on responses will pick next question from the pool. Any ideas on where to start?
A:
I guess you need some kind of array.
It would contain the questions (accessed by an ID number) and answers. To each answer another question ID would be attached so that when the user answers with that answer, the question with specified ID would appear.
Aurel300
2010-10-21 17:56:51
Sorry i forgot to mention i want to make it dynamic so that questions pool could be defined let's say in an xml file will be pulled in at runtime.
2010-10-21 18:11:45
Same... The parsing is your thing. The array will just be the core of it - it's on you how you make that array.
Aurel300
2010-10-22 16:40:33
+1
A:
imho XMLList class is the best choice e.g.:
<?xml version="1.0" encoding="utf-8" ?>
<data>
<question id="1" onright="2" onwrong="3" answer="4" text="calcutate 2*2"/>
<question id="2" onright="4" onwrong="1" answer="25" text="calcutate 5*5"/>
<question id="3" onright="2" onwrong="1" answer="yes" text="just mistyped?"/>
<question id="4" onright="5" onwrong="?" answer="?" text="?"/>
</data>
it really depend on the quiz structure
www0z0k
2010-10-21 21:44:28