home *** CD-ROM | disk | FTP | other *** search
- on InitMenu
- global leftArrow, rightArrow, retnKey, useKeys, expRegion
- set leftArrow to 123
- set rightArrow to 124
- set retnKey to 36
- installMenu(3)
- set the checkMark of menuItem 8 of menu "Spectra" to 1
- set the puppet of sprite 8 to 1
- set the castNum of sprite 8 to 0
- set the foreColor of sprite 8 to 243
- set expRegion to 0
- when keyDown then checkKey
- 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
- set the puppet of sprite 8 to 0
- installMenu(0)
- 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(1, "MainProg")
- exit
- end if
- end
-
- on doExit whichFrame, whichMovie
- global auxframePos, frameName, movieName, useKeys, auxoldUseKeys, expRegion
- if useKeys < 3 then
- exit
- end if
- set auxframePos to the frame
- set auxoldUseKeys to useKeys
- if whichFrame = 0 then
- go(whichMovie & expRegion)
- exit
- else
- go(1, whichMovie)
- end if
- end
-
- on doExpand whichOne
- global framePos, useKeys, oldUseKeys, expRegion
- if useKeys < 3 then
- exit
- end if
- if the castNum of sprite 8 <> 0 then
- set the castNum of sprite 8 to the castNum of sprite 8 + whichOne
- end if
- set expRegion to whichOne
- set framePos to the frame
- set oldUseKeys to useKeys
- puppetTransition(5, 2, 10, 1)
- installMenu(4)
- set the checkMark of menuItem 8 of menu "Spectra" to 1
- go("Exp" & expRegion)
- end
-
- on doContract
- global framePos, useKeys, oldUseKeys, expRegion
- if useKeys < 3 then
- exit
- end if
- if the castNum of sprite 5 <> 0 then
- set the castNum of sprite 8 to the castNum of sprite 8 - expRegion
- end if
- set expRegion to 0
- set useKeys to oldUseKeys
- puppetTransition(6, 2, 10, 1)
- installMenu(3)
- set the checkMark of menuItem 8 of menu "Spectra" to 1
- go(framePos)
- end
-
- on doPeakClick
- global expRegion, useKeys
- set posH to the mouseH
- if useKeys < 3 then
- exit
- end if
- if (posH < 26) or (posH > 624) then
- exit
- end if
- if expRegion = 0 then
- set prefix to EMPTY
- if posH < 224 then
- set waveNum to 4000 - ((posH - 26) * 2000 / 199)
- else
- set waveNum to 2000 - ((posH - 224) * 1600 / 400)
- end if
- else
- set prefix to "Exp1 "
- set waveNum to 3600 - ((posH - 61) * 1000 / 551)
- end if
- if (waveNum < 3386) and (waveNum > 3327) then
- go(prefix & "NH2 Anti Str")
- end if
- if (waveNum < 3328) and (waveNum > 3245) then
- go(prefix & "NH2 Sym Str")
- end if
- if (waveNum < 2982) and (waveNum > 2943) then
- go(prefix & "CH3 Anti Str")
- end if
- if (waveNum < 2944) and (waveNum > 2888) then
- go(prefix & "CH2 Anti Str")
- end if
- if (waveNum < 2889) and (waveNum > 2859) then
- go(prefix & "CH3 Sym Str")
- end if
- if (waveNum < 2860) and (waveNum > 2829) then
- go(prefix & "CH2 Sym Str")
- end if
- if (waveNum < 1701) and (waveNum > 1507) then
- go(prefix & "NH2 Scis")
- end if
- if (waveNum < 1481) and (waveNum > 1455) then
- go(prefix & "CH3 Asym Bend")
- end if
- if (waveNum < 1456) and (waveNum > 1415) then
- go(prefix & "CH2 Scis")
- end if
- if (waveNum < 1393) and (waveNum > 1359) then
- go(prefix & "CH3 Umbr")
- end if
- if (waveNum < 1360) and (waveNum > 923) then
- go(prefix & "Finger")
- end if
- if (waveNum < 924) and (waveNum > 747) then
- go(prefix & "NH2 Wag")
- end if
- if (waveNum < 748) and (waveNum > 695) then
- go(prefix & "CH2 Wag")
- end if
- end
-
- on doOverlay whichCast
- global expRegion, useKeys
- if useKeys < 3 then
- exit
- end if
- set dummy to whichCast + expRegion
- if (whichCast = 0) or (the castNum of sprite 8 = dummy) then
- set the castNum of sprite 8 to 0
- else
- set the castNum of sprite 8 to whichCast + expRegion
- end if
- puppetTransition(1, 2, 10, 0)
- end
-
- on setUseKeys theCode
- global useKeys
- set useKeys to theCode
- end
-
- on dontLeave
- global auxframePos, useKeys, auxoldUseKeys
- set useKeys to auxoldUseKeys
- go(auxframePos)
- end
-
- on doLeave
- global frameName, movieName
- when keyDown then nothing
- set the puppet of sprite 8 to 0
- installMenu(0)
- updateStage()
- go(frameName, movieName)
- end
-