2 Replies Latest reply on Jul 24, 2011 6:22 PM by Twiggies Twigger

    Copying Game Score from Scene to Scene

    tjroberts Level 1
      Hi:

      I've created a game that involves 10 questions. Each question is in its own scene. I've been racking my small brain trying to find a way to copy the user's score from scene to scene and add (or deduct) points based on whether the user answers the question correctly or incorrectly.

      Any ideas or places to go to check out some sample script? Or am I missing something obvious.

      Thanks.

      Happy New Year

      Tim
        • 1. Re: Copying Game Score from Scene to Scene
          Greg Dove Level 4
          Hi Tim, I don't use scenes much. But I know that scenes are a design-time concept only. Once a swf is compiled, the scenes basically don't exist... its all converted into one long timeline.

          So my guess is that you would just store your score in a variable in the main timeline scope and it should be available in your future scenes when the playhead arrives at them.

          If that doesn't work you could try using the _global object and storing your score as a property inside that.

          • 2. Re: Copying Game Score from Scene to Scene
            Twiggies Twigger

            I'm also having same problems with tim...Greg, may i know how to combine the scene in the main timeline and what do you mean by used global object?is it means that we declare variable globally?