home *** CD-ROM | disk | FTP | other *** search
- on InitKeys
- global leftArrow, rightArrow, retnKey, useKeys, expRegion
- set leftArrow to 123
- set rightArrow to 124
- set retnKey to 36
- installMenu(6)
- when keyDown then checkKey
- set the checkMark of menuItem 3 of menu "Theory" to 1
- end
-
- on checkKey
- global leftArrow, rightArrow, retnKey, useKeys
- if useKeys = 1 then
- if the keyCode = retnKey then
- doLeave()
- else
- exit
- dontPassEvent()
- end if
- end if
- if useKeys = 2 then
- if the keyCode = retnKey then
- when keyDown then nothing
- quit()
- else
- exit
- dontPassEvent()
- end if
- end if
- if (the keyCode = leftArrow) and (useKeys <> 3) then
- go(marker(-1))
- else
- if (the keyCode = rightArrow) and (useKeys <> 4) then
- go(marker(1))
- end if
- end if
- dontPassEvent()
- end
-
- on checkButton
- global useKeys
- set posH to the mouseH
- set posV to the mouseV
- if (posV > 465) or (posV < 440) or (posH > 605) or (posH < 262) then
- exit
- end if
- if (posH > 579) and (useKeys <> 4) then
- go(marker(1))
- end if
- if (posH > 534) and (posH < 560) and (useKeys <> 3) then
- go(marker(-1))
- end if
- if (posH > 459) and (posH < 500) then
- doExit(0, "Quit")
- exit
- end if
- if (posH > 384) and (posH < 425) then
- doExit(0, "Help")
- exit
- end if
- if posH < 350 then
- doExit("Intro", "MainProg")
- exit
- end if
- end
-
- on doExit whichFrame, whichMovie
- global framePos, frameName, movieName, useKeys, oldUseKeys
- if useKeys < 3 then
- exit
- end if
- set framePos to the frame
- set oldUseKeys to useKeys
- if whichFrame = 0 then
- go(whichMovie)
- exit
- else
- go(1, whichMovie)
- end if
- end
-
- on setUseKeys theCode
- global useKeys
- set useKeys to theCode
- end
-
- on dontLeave
- global framePos, useKeys, oldUseKeys
- set useKeys to oldUseKeys
- go(framePos)
- end
-
- on doLeave
- global frameName, movieName
- when keyDown then nothing
- go(frameName, movieName)
- end
-