2 Replies Latest reply on Mar 6, 2007 11:25 AM by DebbieW007

    Creating a "quesion creator" in MX 2004

      Hi all, I've tried doing a search on "quiz" etc but haven't came up with anything which will help me.

      My problem is that I'm creating a gameshow projector which can be used by fellow instructors. I would like the ability for them to create their own answers and questions which are stored locally on their machines so they don't have to re-enter the information every time they run the projector.
      I've read in the developer section that Director doesn't support database use so is there anyway I can get Director to put the instructors' questions and answers onto a text file which can be read back into Director?

      Thanks in advance for any help, it would be most appreciated.

        • 1. Re: Creating a "quesion creator" in MX 2004
          James Newton, ACP Level 3
          Director can connect to external databases, via third-party xtras. For your purposes, I would recommend Tabuleiro's Arca Database, which allows you to create a fully-searchable database as a sirgle external file. Your fellow instructors could create their own databases, and share them with their colleagues by sending the Arca file to them by email.

          If you don't want to invest in a third-party xtra, you can use the built-in FileIO xtra to write to and read from an external text file.

          Perhaps the easiest way to start would be to create a property list to hold your questions and answers: For example:

          on CreateTest()
          vList = [:]
          vQuestion = "What did Neil Armstrong step on on July 20 1969?"
          vAnswers = [:]
          vAnswers.setaProp(1, "The gas")
          vAnswers.setaProp(2, "Ginger Roger's feet")
          vAnswers.setaProp(3, "The moon")
          vAnswers.setaProp(4, "The cat's tail")
          vAnswers.setaProp(#correct, 3)
          vList[vQuestion] = vAnswers

          vQuestion = "What does 'iff' mean?"
          vAnswers = [:]
          vAnswers.setaProp(1, "Botanical: a species of yew tree")
          vAnswers.setaProp(2, "Mathematical: if and only if")
          vAnswers.setaProp(3, "Chemical: butyl seleno-mercaptan (skunk odour)")
          vAnswers.setaProp(4, "Criminal: International Federation of Fraudsters")
          vAnswers.setaProp(#correct, 2)

          vList[vQuestion] = vAnswers

          FileWrite(the moviePath&"Test.txt", string(vList)) -- in File Manager script

          return vList
          end CreateTest

          put CreateTest()
          -- ["What did Neil Armstrong step on on July 20 1969?": [1: "The gas", 2: "Ginger Roger's feet", 3: "The moon", 4: "The cat's tail", #correct: 3], "What does 'iff' mean?": [1: "Botanical: a species of yew tree", 2: "Mathematical: if and only if", 3: "Chemical: butyl seleno-mercaptan (skunk odour)", 4: "Criminal: International Federation of Fraudsters", #correct: 2]]

          The FileWrite() handler is a custom Lingo handler that you can find File Manager script at http://nonlinear.openspark.com/tips/scripts/xtras/. You'll also need to download the Xtras Broker script, as the FileWrite() handler uses that to create an instance of the FileIO xtra.
          • 2. Re: Creating a "quesion creator" in MX 2004
            DebbieW007 Level 1
            Thanks very much for your reply. I think I'll go down the File I/O Xtra as my workplace won't purchase third party plugins / xtras :(

            Thanks again.