Hi,

There are two issues:
1. How to search the text (preferably quickly)
2. What to do when you find some text.

The first bit is relatively easy. You can repeat through every cast member
of every cast looking to see if the text of that member contains the search
term. A Big repeat loop like this will probably be bad because it will lock
on the user for a long time (the machine will appear to have hung whilst
searching). You can do a threaded search, stepping through a big list of
nested lists of potential text members to search - and I could give you an
example code of doing that (it requires some knowledge of parent scripts etc
though).

Alternatively, you could run the big repeat loop during authoring, stashing
the text into a v12 database. Then during runtime you search the v12
database, rather than the director castmembers. The advantage of this is it
is much quicker, and v12 has more flexibility in searching (eg - can search
for 'word starts' etc)

However, once you've found some text that matches, it gets a little
trickier. If you've got different text at different locations (markers in
the score, for example) then you need some way to match the castmember
containing the text you have searched for to a location in the score. And if
the castmember appears in different locations, it gets even more complex.
The way you would do the matching would be to have a big list that matched
castmembers with locations in the score (or with state arrangements if your
project is running out of one frame and displaying different members or text
according to state variables). Again,. it might be more efficient to store
this information in a v12 database -- so when you match a text in one field,
you can look up the information for marker or state variables in another
field for that record.

If you're dealing with lots of text, it becomes obvious that the best thing
to do is use v12 (or a similar database Xtra). If there's not that much you
want to search, then you can stick with cast members to store the data you
want to search and lists for runtime searching a search/result matching.

Luke

on 8/9/00 4:00 PM, Ken Chin at [EMAIL PROTECTED] wrote:

> Hi,
> 
> Any idea to create a search function(text) in a cd-rom???
> 
> Thanks
> 
> Regards
> Ken
> 
> 
> 
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/LUJ/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!]

-- 

Luke Wigley
Multimedia Director/Producer
Mecca Medialight Pty Ltd

Mecca Medialight:                       Medialight Sound Studio:
111 Moor Street                         1 Bakehouse Lane
Fitzroy, Vic. 3065                      North Fitzroy, Vic. 3068
Tel +613 9416 2033                      Tel +613 9416 2033
Fax +613 9416 2055                      Fax +613 9416 2055

www.medialight.com.au
__________________________________________________________________________



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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