4 Replies Latest reply on Feb 22, 2010 7:12 AM by James Newton, ACP

    Director 11.5 - Tidying Work

    Charlotte.Heale

      I am currently working on a University project which involves using Director to create an application with a music basis.

      I’ve never used Director before but am aware of basics. I just need a small question answering.

      The application is going to consist of 4 different mini games. With my current knowledge of Director I only know how to do this in one score window which would surely mean that each of the 4 games would be spread drastically across one score sheet. I’d end up with 1000’s of frames. And I find when I do this and apply go to X Frame on my main screen button to get to say the third game 500 frames in, it slowly works its way over there rather than jumping directly to the frame.

      I hope that makes sense.

      Do you have any ideas how I could make my work tidier and resolve the problem I have mentioned? Feedback as soon as possible would be great appreciated.

       

      (Also, if anyone knows how to create a random loop of ‘questions’/frames and create a correct answer counter I would appreciate that information also.’

      Thank you.

        • 1. Re: Director 11.5 - Tidying Work
          James Newton, ACP Level 3

          You can create a separate Director movie for each of your games, and then use...

           

            go movie "NameOfGame"

           

          ... to jump to the first frame in the NameOfGame.dir movie.  You don't need to include the ".dir" extension.  Director is clever enough to look for a file with the right extension.

          • 2. Re: Director 11.5 - Tidying Work
            James Newton, ACP Level 3

            Charlotte.Heale wrote:

             

             

            how to create a random loop of ‘questions’/frames and create a correct answer counter...?

             

            There have been a couple of recent questions on the theme of showing random screens: Creating A Random Button and how to make multiple choice with random question.

             

            As for a correct answer counter, you will have 3 numbers that you can show: the total number of questions, the number of questions attempted so far and the number of questions that the user got right.  The total number of questions will not change once the user has started a given series of questions, so you can simply display this number in a text or field member which is placed as a sprite on the Stage.

             

            For the number attempted and the number right so far, you could work with a list.  You can create a list of question numbers like this:

             

            vListOfQuestions = [1:0, 2:0, 3:0]

             

            (I'll assume just three questions.  You could add more.)

             

            A list has properties and values.  In the list above, 1, 2 and 3 are properties, and all the values are 0.  You can change the value for a given property like this:

             

            vListOfQuestions.setaProp(2, 1)

             

            This will set the value of the property 2 to 1, so the list will now look like this:  [1:0, 2:1, 3:0]

             

            You could set the value for a particular question number to 1 if the user answers correctly and to -1 if s/he gets it wrong.

             

            I suggest that you try experimenting with lists for a while, to get a feeling for how they work.  You'll need to use lists to generate a random order for your questions anyway.  When you feel more comfortable with lists, then you may be able to work out for yourself how to deal with your correct answer counter, or you may want to ask more precise questions on how to implement it.

             

            You can find the beginnings of an explanation of lists >here<.

            1 person found this helpful
            • 3. Re: Director 11.5 - Tidying Work
              Charlotte.Heale Level 1

              That's great thank you.

               

              Just quickly... What is this " go movie "NameOfGame" you mentioned? Haha. Sorry.

              • 4. Re: Director 11.5 - Tidying Work
                James Newton, ACP Level 3

                That's me revealing how long I have been working with Director :-)

                 

                To show that you are up-to-date with all the latest syntax, you should usehttp://help.adobe.com/en_US/Director/11.5/UsingScripting/WSc3ff6d0ea77859461172e0811d64c1a 1b3-7f42.html_movie.go(1, "NameOfGame")... if you have created a movie named "NameOfGame.dir".