views:

49

answers:

2

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
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.
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
+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
you can define IDs of next questions in parameters of answer tag
www0z0k
but i'm still not sure how do i achieve that little bit of AI in the program that if question 'A' is correct move to question 'B' or if it is wrong then move to 'a-1'? What will be the structure of the xml file?
updated answer above
www0z0k