Many thanks to Kerry and Alex for the help.
This code works very well:

searchword = member("searchWord").text
resulttext = ""

repeat with n = the number of castlibs down to 1
  repeat with m = the number of members of castlib n down to 1
    memref = member(m,n)
    if memref.type = #text then
      if offset(searchword, memref.text) > 0 then
put memref.name & RETURN after resulttext
    end if
  end repeat
end repeat

-- now delete the last return and output the result:
if resulttext.length then delete the last char of resulttext
else put "No members found !" into resulttext

member("results").text = resulttext

I have yet to try to tweak suggested yesterday about avoiding results from blank members, it may well be useful. But now I need to go to stage 2 of my search function for the CD Rom project. I need to turn the resultant member names displayed in the "results" field into links to the relevant points in the timeline, so that the user can click on them and jump to that part of the movie.

It was suggested to me that naming the members - hence the entries in the results field - the same as the labels that bookmark them in the timeline would be helpful. This I can do, but I am not sure what sort of code might be needed to make the interactive navigation happen in reality. Is it a matter of keeping a list of members and labels for Director to look up? But how will it recognise that the mouse is over a particular entry in the results field?

Hope this is't getting too tangled again. I don't know that I have a "natural talent for programming" at all. It is a chore to me, a means to a visual end. But I am always willing to learn.

thanks

Chris

_________________________________________________________________
Sign-up for a FREE BT Broadband connection today! http://www.msn.co.uk/specials/btbroadband


[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]

Reply via email to