1 Reply Latest reply on Jul 29, 2007 1:32 AM by Bob Saggot

    Building quizzes with a current score bar

    John_Fact

      Hi,
      I am a beginner in Flex. I am taking a training. I have a project to build a quiz and have a graphical bar to display current score. I also have database with coldfusion interaction that I need to connect to Flex. I have finished 8 hours of training through lynda.com. But I am still not getting any idea on building quiz.

      My thought on building a quiz set is making one page with one quiz. And make next button to flip to a next question. But it looks like Flex does not run that way, not like hyperlinked method. Please advice on this.

      And I want to add a feature the scores learners receive need to be stored in database through coldfusion. Do I have to use SOAP for this or other way? Please advice on this. Thank you.
        • 1. Re: Building quizzes with a current score bar
          Bob Saggot Level 1
          lookup RemoteObject

          its the by far easiest way to connect to coldfusion, as for each quiz question, you could go with the very easy route (say you have 10 questions) and just say

          currentState = "questionsone"
          on the questionones state, have a little arrow key (or something) that once it has a click command it goes to
          "questiontwo" and it just goes down the states...

          or you can do it 100% by actionscript using arrays. Once they answer a question, just run a method that says "i = i+1"
          //i = what question you are on.
          switch(i)
          {
          case 1:
          maintextbox.text = arrayMainTextname //i.e. "this is question one"
          question1.text = arrayQUESTIONname
          ; // "what is the color of the sky?"
          }

          setting up the questions is the easiest part connecting to a cold fusion server... it was a pain in the butt, but i eventually got it going.