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 3 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 3 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 3 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 < 29) or (posH > 629) then
- exit
- end if
- if expRegion = 0 then
- set prefix to EMPTY
- if posH < 221 then
- set waveNum to 4000 - ((posH - 29) * 2000 / 192)
- else
- set waveNum to 2000 - ((posH - 221) * 1600 / 408)
- end if
- else
- if expRegion = 1 then
- set prefix to "Exp1 "
- set waveNum to 3200 - ((posH - 44) * 600 / 571)
- else
- if expRegion = 2 then
- set prefix to "Exp2 "
- set waveNum to 1700 - ((posH - 44) * 700 / 570)
- end if
- end if
- end if
- if expRegion = 0 then
- if (waveNum < 3063) and (waveNum > 3011) then
- go("Vinyl Anti Str")
- end if
- if (waveNum < 2990) and (waveNum > 2917) then
- go("Vinyl Sym Str")
- end if
- if (waveNum < 2917) and (waveNum > 2896) then
- go("CH3 Anti Str")
- end if
- if (waveNum < 2896) and (waveNum > 2855) then
- go("CH2 Anti Str")
- end if
- if (waveNum < 2855) and (waveNum > 2813) then
- go("CH3 Sym Str")
- end if
- if (waveNum < 2813) and (waveNum > 2761) then
- go("CH2 Sym Str")
- end if
- if (waveNum < 1836) and (waveNum > 1800) then
- go("Overtone")
- end if
- if (waveNum < 1655) and (waveNum > 1628) then
- go("CC Str")
- end if
- if (waveNum < 1455) and (waveNum > 1436) then
- go("CH3 Asym Bend")
- end if
- if (waveNum < 1436) and (waveNum > 1416) then
- go("CH2 Scis")
- end if
- if (waveNum < 1393) and (waveNum > 1357) then
- go("CH3 Umbr")
- end if
- if (waveNum < 1357) and (waveNum > 1012) then
- go("Finger")
- end if
- if (waveNum < 1012) and (waveNum > 969) then
- go("OOP CC Bend A")
- end if
- if (waveNum < 942) and (waveNum > 875) then
- go("OOP CC Bend B")
- end if
- if (waveNum < 875) and (waveNum > 400) then
- go("Finger")
- end if
- exit
- else
- if expRegion = 1 then
- if (waveNum < 3084) and (waveNum > 3059) then
- go("Exp1 Vinyl Anti Str")
- end if
- if (waveNum < 3006) and (waveNum > 2986) then
- go("Exp1 Vinyl Sym Str")
- end if
- if (waveNum < 2968) and (waveNum > 2951) then
- go("Exp1 CH3 Anti Str")
- end if
- if (waveNum < 2938) and (waveNum > 2916) then
- go("Exp1 CH2 Anti Str")
- end if
- if (waveNum < 2882) and (waveNum > 2871) then
- go("Exp1 CH3 Sym Str")
- end if
- if (waveNum < 2871) and (waveNum > 2856) then
- go("Exp1 CH2 Sym Str")
- end if
- exit
- else
- if (waveNum < 1637) and (waveNum > 1624) then
- go("Exp2 CC Str")
- end if
- if (waveNum < 1473) and (waveNum > 1457) then
- go("Exp2 CH3 Asym Bend")
- end if
- if (waveNum < 1457) and (waveNum > 1440) then
- go("Exp2 CH2 Scis")
- end if
- if (waveNum < 1384) and (waveNum > 1370) then
- go("Exp2 CH3 Umbr")
- end if
- if (waveNum < 1357) and (waveNum > 982) then
- go("Exp2 Finger")
- end if
- exit
- end if
- 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
-