>         Totally my project got 100 pages. I divided the pages into four 
> movies
>         How can I trap the movie file name and the frame number.

One way would be to bring the text from all the files into an external 
cast--one page, one member. Name the members after the movies & frame, and 
when you find the word you're searching for, build the movie name from that 
member. For example, your cast members would be named "Movie1 marker1", 
"Movie1 marker2" etc.

Something like this (untested)--I'll use the old syntax since I don't know 
which version of Director you're using. Oh, and watch for line breaks your 
e-mail program puts in.

theCast = castLib "movieText"
numMembers = the number of members in theCast
wordFound = FALSE
repeat with i = 1 to numMembers
    theText = the text of member i of theCast
    numWords = the number of words in theText
    repeat with j = 1 to numWords
       if word j of theText = searchWord then
          theMemberName  = the name of member i of theCast
          theMovie = word 1 of theMemberName
          theFrame = word 2 of theMemberName
          wordFound = TRUE
          exit repeat
       end if
    end repeat
end repeat

if wordFound then go to frame theFrame of movie theMovie

Of course, this makes a big assumption--that there are no repeated words in 
your text, or that you include only non-repeating keywords.

You'll probably have to fix some bugs in my code--it's off the top of my 
head, and I've been bald for 25 years.


Cordially,
Kerry Thompson
Sr. Interface Engineer
Learning Network


[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