5 Replies Latest reply on Sep 25, 2008 12:57 PM by Reggy_01

    How do I make custom gap-fill component?

    Reggy_01
      I am trying to write a custom component for a gap-fill exercise. There could be several sentences in the exercise with multiple gaps - something that looks like this:

      London is the ________ and largest urban area in the _____________. An important settlement for two millennia, London's history goes back to its founding by the ___________.

      The component should be 'generic' as the data will be fed from a database. I was wandering if someone could give me some pointers to an existing solution or clues how to approach this.

      Although I have got a fair amount of server-side experience (java) this is my first attempt to write something that is 'displayed on screen' and any help will be greatly appreciated.
        • 1. Re: How do I make custom gap-fill component?
          ntsiii Level 3
          I am not quite sure what you are trying to display. "gap-fill" does not mean anything specific to me. What does the data look like, and what are the rules for building the string?

          Are you expecting any interactivity?

          Tracy
          • 2. Re: How do I make custom gap-fill component?
            Reggy_01 Level 1
            Hi Tracy,
            The purpose of this component is to test knowledge of a student on a given subject - in the above example it would be history. The student is given a piece of text with missing words in it. He/she has to fill in (type in this case) the missing words - hence this kind of test is called gap-fill.

            The component must be able to display text with 'floating' gaps within the text. These gaps would have similar behaviour to TextInput control. Once the student submits the answer the component will return the words that were typed in and these are then compared against the expected answers.

            As mentioned above the component should be able to display the text and the gaps dynamically getting all required parameters from the text. The position of the gaps could be marked by a special token - such as #10# - which would mark the position of the gap within the text and the size of the gap (number of characters).

            Therefore the above text could look like this before being loaded into the component:

            London is the #10# and largest urban area in the #15#. An important settlement for two millennia, London's history goes back to its founding by the #8#.

            Thank you for taking the time,
            Adam
            • 3. Re: How do I make custom gap-fill component?
              Level 7

              "Reggy_01" <webforumsuser@macromedia.com> wrote in message
              news:gbe1gi$cf3$1@forums.macromedia.com...
              > Hi Tracy,
              > The purpose of this component is to test knowledge of a student on a given
              > subject - in the above example it would be history. The student is given a
              > piece of text with missing words in it. He/she has to fill in (type in
              > this
              > case) the missing words - hence this kind of test is called gap-fill.
              >
              > The component must be able to display text with 'floating' gaps within the
              > text. These gaps would have similar behaviour to TextInput control. Once
              > the
              > student submits the answer the component will return the words that were
              > typed
              > in and these are then compared against the expected answers.
              >
              > As mentioned above the component should be able to display the text and
              > the
              > gaps dynamically getting all required parameters from the text. The
              > position of
              > the gaps could be marked by a special token - such as #10# - which would
              > mark
              > the position of the gap within the text and the size of the gap (number of
              > characters).
              >
              > Therefore the above text could look like this before being loaded into the
              > component:
              >
              > London is the #10# and largest urban area in the #15#. An important
              > settlement
              > for two millennia, London's history goes back to its founding by the #8#.

              You'll probably find it easier to write an editor that lets your SME's draw
              in where the text box should go and store that data. Once you have that,
              it's pretty simple to create TextInputs using a repeater or AddChild. Note
              that text entries are notoriously difficult to score, since, for instance,
              "dog", "puppy", and "pooch" might all be acceptable answers. Then you have
              to decide if you're checking their knowledge or their spelling ability...

              You may want to consider doing this as a drag and drop instead.

              HTH;

              Amy


              • 4. Re: How do I make custom gap-fill component?
                ntsiii Level 3
                This is an interesting requirement. Flex, unlike html, is not oriented around a flow-style interface.

                Perhaps a Tile container would work, but I forsee formatting issues since tile expects fixed width and height elements

                There is a component someone has created called a FlowBox that would probable be a good starting point for the UI. Then as Amy suggests, I would use repeater to generate the controls. That part would be pretty simple.

                Tracy
                • 5. Re: How do I make custom gap-fill component?
                  Reggy_01 Level 1
                  Thank you for the FlowBox tip - I think this component will be sufficient while prototyping. Hovewer I will have to think about implementing something a bit more specific for the purpose later on.