4 Replies Latest reply on Jun 8, 2007 4:57 PM by kglad

    storing a large number of strings

    Level 7
      Hello,

      What is the best way to store a large number of strings in Flash for use in
      a quiz? I want to create a quiz of about 100 questions, but select these
      questions from several hundred during runtime. I was thinking of storing
      the strings in an offscreen text object, but didn't know if this was the
      best approach. I also thought of a database, but don't think it is
      necessary. Any ideas? The Flash movie will be used as a sprite inside of
      Director, but I don't want to pass the strings through a function call.

      Thanks in advance,

      Brian


        • 1. Re: storing a large number of strings
          kglad Adobe Community Professional & MVP
          you should probably use an xml file. a text file could be used but creating, maintaining and processing an xml file would be easier.
          • 2. Re: storing a large number of strings
            Level 7
            Does the xml file need to be stored externally or is there a way it can be
            part of the .fla file's library? I'm trying to avoid external files.

            Thanks,

            Brian

            "kglad" <webforumsuser@macromedia.com> wrote in message
            news:f4cmnl$78s$1@forums.macromedia.com...
            > you should probably use an xml file. a text file could be used but
            > creating, maintaining and processing an xml file would be easier.


            • 3. Re: storing a large number of strings
              Level 7
              If you use a database, you can store all of the text on the server and
              only download the text you need for the 100 questions that are chosen.
              This will be a lighter memory load than keeping all of the possible
              questions' text in the Flash movie all of the time. You might want to
              test out two versions of the .swf to see how much larger the version is
              with all of the questions vs. just 100. It may matter,it may not.

              If you decide to keep the text in the Flash movie, a simpler approach is
              to assign a variable to each question's text and then just place the
              variables and their strings in an actionscript frame space.
              • 4. Re: storing a large number of strings
                kglad Adobe Community Professional & MVP
                if you don't keep the questions external, then every update will require editing your fla. ie, this can't be maintained by someone with minimal skills.