6 Replies Latest reply on May 18, 2007 4:13 PM by Simon Bailey

    Best approach to loading question data into trivia game

    Padraig Doherty
      Hello, I've built a trivia game in Flash 8 which I've hardcoded all the questions,answers and catagories into arrays. The file has alot of audio and animation which makes the publishing take a long to complete. I'd like to load the question in from an external file so I don't have republish the game each time new questions are needed. I've looked around and have seen loadVars from a .txt file but I have to reformat all the text that nonalphanumeric. There is also the option of using XML(I don't know XML yet). Can anyone point me in the right direction? Should I dig in and figure out the XML, the loadVars form a text file or is there a better way I'm not aware of yet?

      Here is an example of some variable data im using. Usually 20 questions.
      catagory[1] = "sports";
      question[1] = "What sport does not use a round ball?";
      answerA[1] = "Baseball";
      answerB[1] = "Golf";
      answerC[1] = "Football";
      answerD[1] = "Tennis";
      theCorrectAnswer[1] = 3;

      Thanks,
      Padraig