Hi....
1) define the a control for displaying question
2) take a radio buton group.
3) define next/prev butons with nextHandler()/prevHandler()
4) define a http service to call data(ques and ans) from db. u can
know the len(length) /total no of ques here
5)In nextHandler()
        check in cases ..currentQuesId=1 or CurrentQuesId=len
     iterate from 1 to len .

      if(count != len-1)
      {
        count++;
        questionText.text = questionfeed.ques[coun...@value;
        questionNum.text = "Question "+ (count+1)+ " of " + len ;
        quesBox.removeAllChildren();
        rbg = new RadioButtonGroup();
        rbg.addEventListener(ItemClickEvent.ITEM_CLICK,moveChk);//here u can
handle whats user selected & whats the correct ans 4m db

        if(currQuestionId == len)
        {

             moveFwd.enabled = false;

                if (rb.selected == true)
                {
                    moveBck.visible = false;
                }
        }
              for each (var Ans:XML in questionFeed.Ques[count].Ans)
              {
         rb = new RadioButton();
         rb.group = rbg;
         rb.id = questionNum.text;
         rb.label = Ans;

         if(resultArr[currQuestionId])
{                                             //  this block of code
is for
            if(rb.label==resultArr[currQuestionId].selectedValue){      //
handling user selected ans
                rb.selected =
true;                                                   // when he
navigates from prev and next
                moveFwd.visible = true;                       //  in the 
questionair
                    }                                                           
                      //
               }
             quesBox.addChild(rb);
           }

         moveBck.visible = true;
          }
        if(currQuestionId == len)
         {
        moveFwd.visible = false;
        moveBck.visible = false;
         }
}

like wise in prevHandler()

and in moveChk():
u can handle whats user selected & whats the correct ans 4m db

and store those in array/array correction for future requirement.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to