3 Replies Latest reply on Dec 4, 2006 9:34 AM by duckets

    find results in a textbox

    Level 7
      Hello:
      Is possible to find lines (records) wich contains a word or sentence with NO
      dabatase at all and put the results in other textbox?
      I mean, all the lines that match with word/sentence to put in a textbox.
      Thank you very much



        • 1. Re: find results in a textbox
          duckets Level 1
          Yes. If your 'lines' are lines in a director text cast member, you can check through each line and use the 'contains' function to see if it contains a word or phrase.

          See the attached code below.

          hope this helps!

          - Ben
          • 2. Re: find results in a textbox
            Level 7
            Thank you.
            I need to get no only one record but all records that contain that word or
            sentence
            .
            "duckets" <webfoankrumsuser@macromedia.com> escribió en el mensaje
            news:el0via$ni0$1@forums.macromedia.com...
            > Yes. If your 'lines' are lines in a director text cast member, you can
            > check
            > through each line and use the 'contains' function to see if it contains a
            > word
            > or phrase.
            >
            > See the attached code below.
            >
            > hope this helps!
            >
            > - Ben
            >
            > textRecords = member("my records").text
            > resultRecords member("search results").text
            > searchString = "foo"
            >
            > repeat with n=1 to textRecords.line.count
            > currentLine = textRecords.line[n]
            > if currentLine contains searchString then
            > put currentLine&return after resultRecords
            > end if
            > end repeat
            >


            • 3. Re: find results in a textbox
              duckets Level 1
              quote:

              Originally posted by: Newsgroup User
              Thank you.
              I need to get no only one record but all records that contain that word or
              sentence



              Did you try the code? It does that.

              - Ben