home *** CD-ROM | disk | FTP | other *** search
- on setUpDlogBox n
- global castData, WdName, browseName, CR, bkMrkList, bkMrkLstName, menuText
- set WdName to item 1 of castData
- if WdName = "bookmark" then
- put bkMrkLstName into field 464
- set menuText to bkMrkList
- if bkMrkList contains browseName then
- nothing()
- else
- put browseName & CR & bkMrkList into field 483
- set bkMrkList to browseName & CR & bkMrkList
- set the locH of sprite 4 to 320
- end if
- set the visible of sprite 23 to 1
- updateStage()
- showWd("16-24")
- else
- if WdName = "search" then
- put EMPTY into field 540
- set the textHeight of field 540 to 19
- set the editableText of sprite 21 to 1
- showWd("16-35")
- else
- if "print,help,notebook,browse,game,oasis" contains WdName then
- showWd("16")
- end if
- end if
- end if
- end
-
- on setUpMenu n
- global castName, articleList, castData, loValPos, hiValPos, scrRange
- if item 1 of castData = "subheadings" then
- showMenu("38-41")
- else
- if n > 14 then
- set y to char 1 of the movie
- if y <> char 1 of castData then
- if word 2 of item 1 of castData <> "index" then
- exit
- end if
- set x to the number of lines in articleList
- set z to the number of items in line 1 of articleList
- set moviePtr to 0
- repeat with j = 1 to x
- put item 1 of castData && item z of line j of articleList
- if char 1 of castData = char 1 of item z of line j of articleList then
- set moviePtr to j
- exit repeat
- end if
- end repeat
- if moviePtr > 0 then
- set destMovie to item z of line moviePtr of articleList
- goNextLoc(destMovie, 1, marker(0))
- end if
- exit
- else
- if item 1 of castData contains "Index" then
- showMenu("38-42")
- exit
- end if
- end if
- else
- if item 1 of castData = "Index" then
- set loValPos to 140
- set hiValPos to 350
- set scrRange to hiValPos - loValPos
- showMenu("38-47")
- else
- if item 1 of castData = "backtrack" then
- if the locH of sprite 38 > 1000 then
- if the timer < 20 then
- goBack()
- else
- showMenu("38-41")
- end if
- end if
- exit
- else
- if item 1 of castData = "see also" then
- showMenu("38-42")
- end if
- end if
- end if
- end if
- end if
- end
-
- on showMenu spriteNums
- global castData, browseNames, CR, seeAlsoText, subHeaderText, letrIndexText, theTxtFont, theMenu, offsetPtr, tempText, displayLines, menuText, indexText, scrUpCast, scrDnCast
- set spriteNums to convertToList(spriteNums)
- set castPtr to the number of cast item 1 of castData
- set menuData to the text of cast (castPtr + 1)
- set wdSpriteNum to value(item 1 of spriteNums)
- repeat with n = 1 to the number of items in spriteNums
- puppetSprite(value(item n of spriteNums), 1)
- set the immediate of sprite value(item n of spriteNums) to 1
- set x1 to value(item 1 of line n of menuData)
- set y1 to value(item 2 of line n of menuData)
- set x2 to value(item 3 of line n of menuData)
- set y2 to value(item 4 of line n of menuData)
- set theCastNum to value(item 5 of line n of menuData)
- set the castNum of sprite value(item n of spriteNums) to theCastNum
- if n = 2 then
- set txtSprite to value(item n of spriteNums)
- end if
- if n = 3 then
- set scrUpCast to theCastNum
- end if
- if n = 4 then
- set scrDnCast to theCastNum
- end if
- spriteBox(value(item n of spriteNums), x1, y1, x2, y2)
- set the ink of sprite value(item n of spriteNums) to value(item 6 of line n of menuData)
- end repeat
- if stringp(theFieldNum) = 0 then
- set theFieldNum to 441
- end if
- set theMenu to item 1 of castData
- if theMenu = "backTrack" then
- set the textSize of field theFieldNum to 14
- set displayLines to 5
- set menuText to browseNames
- selectLines(theFieldNum)
- else
- if theMenu = "see Also" then
- set displayLines to 7
- set the textSize of field theFieldNum to 14
- set menuText to seeAlsoText
- selectLines(theFieldNum)
- else
- if theMenu = "subheadings" then
- set displayLines to 7
- set the textSize of field theFieldNum to 14
- set menuText to subHeaderText
- selectLines(theFieldNum)
- else
- if theMenu = "index" then
- set the textSize of field theFieldNum to 14
- set displayLines to 15
- set menuText to indexText
- selectLines(theFieldNum)
- put EMPTY into field 442
- set the textFont of field theFieldNum to theTxtFont
- else
- if theMenu contains "index" then
- set the textSize of field theFieldNum to 14
- set displayLines to 14
- set menuText to letrIndexText
- selectLines(theFieldNum)
- set the textFont of field theFieldNum to theTxtFont
- end if
- end if
- end if
- end if
- end if
- set tempText to field theFieldNum
- set offsetPtr to 0
- end
-
- on selectLines theFieldNum
- global theMenu, displayLines, menuText
- set nLines to the number of lines in menuText
- if nLines < displayLines then
- set the text of field theFieldNum to line 1 to nLines of menuText
- set displayLines to nLines
- else
- set the text of field theFieldNum to line 1 to displayLines of menuText
- end if
- end
-
- on setUpSpriteBox theSpriteNum, theCastNum, theData
- set the castNum of sprite theSpriteNum to theCastNum
- set x1 to value(item 2 of theData)
- set y1 to value(item 3 of theData)
- set x2 to value(item 4 of theData)
- set y2 to value(item 5 of theData)
- spriteBox(theSpriteNum, x1, y1, x2, y2)
- set the ink of sprite theSpriteNum to value(item 5 of theData)
- end
-
- on showWd spriteNums
- global castData
- beep()
- setUpSprites("37-48", 0)
- updateStage()
- set spriteNums to convertToList(spriteNums)
- set castPtr to the number of cast item 1 of castData
- if the number of items in spriteNums > 1 then
- set wdData to the text of cast (castPtr + 1)
- else
- set wdData to castData & "," & the number of cast item 1 of castData & "," & 36
- delete item 1 of wdData
- end if
- set wdSpriteNum to value(item 1 of spriteNums)
- repeat with n = 1 to the number of items in spriteNums
- puppetSprite(value(item n of spriteNums), 1)
- set the immediate of sprite value(item n of spriteNums) to 1
- set x1 to value(item 1 of line n of wdData)
- set y1 to value(item 2 of line n of wdData)
- set x2 to value(item 3 of line n of wdData)
- set y2 to value(item 4 of line n of wdData)
- set the castNum of sprite value(item n of spriteNums) to value(item 5 of line n of wdData)
- spriteBox(value(item n of spriteNums), x1, y1, x2, y2)
- set the ink of sprite value(item n of spriteNums) to value(item 6 of line n of wdData)
- end repeat
- end
-