home *** CD-ROM | disk | FTP | other *** search
- on getMenuItem
- global linePtr, offsetPtr, theMenu, menuText, theMenuItem, castData, theClickLine
- if theMenu = "index" then
- set theMenuItem to line linePtr + 1 of field 441
- put theMenuItem into field 442
- else
- if item 1 of castData = "searchResults" then
- set theMenuItem to line linePtr + 1 of field 463
- else
- if item 1 of castData = "bookmark" then
- set theMenuItem to line linePtr + 1 of field 483
- else
- set theClickLine to linePtr + 1 + offsetPtr
- set theMenuItem to line theClickLine of menuText
- end if
- end if
- end if
- end
-
- on goToMenuItem
- global browsetrail, browseNames, theClickLine, linePtr, subHeaderText, shMkrLst, theMenu, theMenuItem, browseMenuItems, articleList
- if theMenu = "backtrack" then
- selectMovie(theMenuItem)
- delete line theClickLine of browseNames
- delete line theClickLine of browsetrail
- else
- if theMenu = "subheadings" then
- set x to the number of lines in subHeaderText
- repeat with n = 1 to x
- if line n of subHeaderText contains theMenuItem then
- set theMarker to "p" & line n of shMkrLst
- exit repeat
- end if
- end repeat
- setUpSprites("6;8;10-12;37-48", 0)
- go(marker(theMarker))
- else
- selectMovie(theMenuItem)
- end if
- end if
- end
-
- on selectMovie theItem
- global articleList, browseName
- if stringp(theItem) = 0 then
- exit
- end if
- set x to the number of lines in articleList
- set y to the number of items in line 1 of articleList
- if theItem = "Mandela, Nelson" then
- delete item 2 of theItem
- end if
- set destMovie to EMPTY
- repeat with n = 1 to x
- if line n of articleList contains theItem then
- if theItem <> browseName then
- set destMovie to item y of line n of articleList
- exit repeat
- end if
- end if
- end repeat
- if destMovie <> EMPTY then
- setUpSprites("6;8;10-12;37-48", 0)
- goNextLoc(destMovie, 1, marker(0))
- else
- beep()
- end if
- end
-