home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global qtSprite, firsttime, detectOK, gospot
- put "AT startmovie"
- set qtSprite to 16
- set firsttime to 1
- set detectOK to 1
- set gospot to 0
- getready()
- morestarters()
- put "Finished with startmovie"
- end
-
- on getready
- global allowclick
- put "AT getready"
- cursor(209)
- set allowclick to 1
- end
-
- on waitforQT x
- global qtSprite
- set n to the movieTime of sprite qtSprite / 60
- if n >= x then
- go(the frame + 1)
- else
- holding()
- end if
- end
-
- on waitforend
- global qtSprite
- set x to the duration of cast the castNum of sprite qtSprite
- set n to the movieTime of sprite qtSprite
- if n >= x then
- go(the frame + 1)
- else
- holding()
- end if
- end
-
- on beginsegtime
- global inittime
- set inittime to the ticks
- unLoad()
- end
-
- on count x
- global inittime
- if the ticks > (inittime + (x * 60)) then
- go(the frame + 1)
- else
- holding()
- end if
- end
-
- on holduntil x
- global inittime
- whatcurs()
- if the soundBusy of 1 then
- if the ticks > (inittime + (x * 60)) then
- go(the frame + 1)
- else
- holding()
- end if
- end if
- end
-
- on presetQT fr
- global qtSprite
- set the movieTime of sprite qtSprite to fr
- set the movieRate of sprite qtSprite to 0
- end
-
- on playQT
- global qtSprite
- set the movieRate of sprite qtSprite to 1
- end
-
- on playQTuntil nn
- global qtSprite
- set the movieRate of sprite qtSprite to 1
- set the stopTime of sprite qtSprite to nn
- end
-
- on initQTmousecoords Vcor, Hcor
- global SH, SV, BH, BV, HL, HR, Vu, Vd, qtSprite
- put "AT initQTmousecoords"
- set SH to the left of sprite qtSprite
- set SV to the top of sprite qtSprite
- set BV to the bottom of sprite qtSprite
- set BH to the right of sprite qtSprite
- set HL to SH + Hcor
- set HR to BH - Hcor
- set Vu to SV + Vcor
- set Vd to BV - Vcor
- end
-
- on cursover
- global Xguy, Yang, SH, SV, BH, BV, HL, HR, Vu, Vd
- set MH to the mouseH
- set MV to the mouseV
- if MH < HL then
- if MV < Vu then
- showNW()
- end if
- if MV > Vd then
- showSW()
- end if
- if (MV > Vu) and (MV < Vd) then
- showLEFT()
- end if
- end if
- if MH > HR then
- if MV < Vu then
- showNE()
- end if
- if MV > Vd then
- showSE()
- end if
- if (MV > Vu) and (MV < Vd) then
- showRIGHT()
- end if
- end if
- if (MH > HL) and (MH < HR) then
- if MV < Vu then
- showUP()
- end if
- if MV > Vd then
- showDOWN()
- end if
- if (MV > Vu) and (MV < Vd) then
- cursor(209)
- end if
- end if
- end
-
- on whatcursqtPan
- global sndlvl
- set nameodacm to the mouseCast
- if nameodacm = -1 then
- exit
- end if
- if (nameodacm >= 1) and (nameodacm <= 999) then
- if the name of cast nameodacm starts "Bullet" then
- if the mouseUp then
- cursor(128)
- else
- cursor(136)
- end if
- else
- if the name of cast nameodacm starts "QT" then
- cursover()
- else
- if the name of cast nameodacm = "Ahead" then
- if the mouseUp then
- cursor(132)
- else
- cursor(133)
- end if
- else
- if the name of cast nameodacm = "Reverse" then
- if the mouseUp then
- cursor(130)
- else
- cursor(131)
- end if
- else
- if the name of cast nameodacm = "PathZone" then
- if the mouseUp then
- if char the mouseChar of field "PathZone" <> RETURN then
- cursor(128)
- else
- cursor(209)
- end if
- else
- cursor(136)
- end if
- else
- cursor(209)
- end if
- end if
- end if
- end if
- end if
- end if
- end
-
- on showUP
- if the mouseUp then
- cursor(206)
- else
- cursor(205)
- GoUp()
- end if
- end
-
- on showDOWN
- if the mouseUp then
- cursor(202)
- else
- cursor(204)
- GoDown()
- end if
- end
-
- on showLEFT
- if the mouseUp then
- cursor(196)
- else
- cursor(199)
- GoLeft()
- end if
- end
-
- on showRIGHT
- if the mouseUp then
- cursor(190)
- else
- cursor(193)
- GoRight()
- end if
- end
-
- on showNW
- if the mouseUp then
- cursor(144)
- else
- cursor(145)
- GoNW()
- end if
- end
-
- on showSW
- if the mouseUp then
- cursor(146)
- else
- cursor(147)
- GoSW()
- end if
- end
-
- on showNE
- if the mouseUp then
- cursor(142)
- else
- cursor(143)
- GoNE()
- end if
- end
-
- on showSE
- if the mouseUp then
- cursor(140)
- else
- cursor(141)
- GoSE()
- end if
- end
-
- on initQTselfRot xmax, ymax, ticked, sttick
- global xtotal, ytotal, tperf, qtSprite, Xguy, Yang
- put "AT initQTselfRot"
- set xtotal to xmax - 1
- set ytotal to ymax - 1
- set tperf to ticked
- set the movieRate of sprite qtSprite to 1
- set the movieTime of sprite qtSprite to sttick
- set Yang to ytotal / 3
- set Xguy to 2
- end
-
- on initQTrot xmax, ymax, ticked
- global xtotal, ytotal, tperf, qtSprite, Xguy, Yang
- put "AT initQTrot"
- set xtotal to xmax - 1
- set ytotal to ymax - 1
- set tperf to ticked
- set the movieRate of sprite qtSprite to 0
- set Yang to ytotal / 3
- set Xguy to 2
- refresh()
- end
-
- on alignQT x, y
- global Xguy, Yang
- set Xguy to x
- set Yang to y
- refresh()
- end
-
- on GoRight
- global Xguy, xtotal, qtSprite
- if the movieRate of sprite qtSprite = 1 then
- set the movieRate of sprite qtSprite to 0
- end if
- set Xguy to Xguy + 1
- if Xguy > xtotal then
- set Xguy to 0
- end if
- refresh()
- end
-
- on GoLeft
- global Xguy, xtotal, qtSprite
- if the movieRate of sprite qtSprite = 1 then
- set the movieRate of sprite qtSprite to 0
- end if
- set Xguy to Xguy - 1
- if Xguy < 0 then
- set Xguy to xtotal
- end if
- refresh()
- end
-
- on GoDown
- global Yang, ytotal, qtSprite
- if the movieRate of sprite qtSprite = 1 then
- set the movieRate of sprite qtSprite to 0
- end if
- set Yang to Yang + 1
- if Yang > ytotal then
- set Yang to ytotal
- end if
- refresh()
- end
-
- on GoUp
- global Yang, qtSprite
- if the movieRate of sprite qtSprite = 1 then
- set the movieRate of sprite qtSprite to 0
- end if
- set Yang to Yang - 1
- if Yang < 0 then
- set Yang to 0
- end if
- refresh()
- end
-
- on GoNE
- global Yang, Xguy, xtotal, qtSprite
- if the movieRate of sprite qtSprite = 1 then
- set the movieRate of sprite qtSprite to 0
- end if
- set Yang to Yang - 1
- if Yang < 0 then
- set Yang to 0
- end if
- set Xguy to Xguy + 1
- if Xguy > xtotal then
- set Xguy to 0
- end if
- refresh()
- end
-
- on GoSE
- global Yang, ytotal, Xguy, xtotal, qtSprite
- if the movieRate of sprite qtSprite = 1 then
- set the movieRate of sprite qtSprite to 0
- end if
- set Yang to Yang + 1
- if Yang > ytotal then
- set Yang to ytotal
- end if
- set Xguy to Xguy + 1
- if Xguy > xtotal then
- set Xguy to 0
- end if
- refresh()
- end
-
- on GoNW
- global Xguy, xtotal, Yang, qtSprite
- if the movieRate of sprite qtSprite = 1 then
- set the movieRate of sprite qtSprite to 0
- end if
- set Yang to Yang - 1
- set Xguy to Xguy - 1
- if Xguy < 0 then
- set Xguy to xtotal
- end if
- if Yang < 0 then
- set Yang to 0
- end if
- refresh()
- end
-
- on GoSW
- global Xguy, xtotal, Yang, ytotal, qtSprite
- if the movieRate of sprite qtSprite = 1 then
- set the movieRate of sprite qtSprite to 0
- end if
- set Yang to Yang + 1
- set Xguy to Xguy - 1
- if Xguy < 0 then
- set Xguy to xtotal
- end if
- if Yang > ytotal then
- set Yang to ytotal
- end if
- refresh()
- end
-
- on refresh
- global Xguy, Yang, tperf, xtotal, qtSprite
- set temp to Xguy + (Yang * (xtotal + 1))
- set the movieTime of sprite qtSprite to temp * tperf
- end
-
- on spinguy
- global gospot, xstop, ystop, lablname, Xguy, Yang, detectOK, xtotal, allowclick, tperf, qtSprite
- if gospot then
- set diffspot to Xguy - xstop
- if abs(diffspot) > (xtotal / 2) then
- set diffspot to -diffspot
- end if
- if diffspot > 0 then
- GoLeft()
- end if
- if diffspot < 0 then
- GoRight()
- end if
- if Yang > ystop then
- GoUp()
- end if
- if Yang < ystop then
- GoDown()
- end if
- if (Yang = ystop) and (Xguy = xstop) then
- go(lablname)
- set gospot to 0
- set detectOK to 1
- set allowclick to 1
- end if
- end if
- end
-
- on rotme placename
- global wherearewe, allowclick
- set wherearewe to placename
- spinguy()
- go(the frame)
- whatcursqtPan()
- set allowclick to 1
- end
-
- on goplace x, y, wh
- global gospot, ystop, xstop, lablname, detectOK, allowclick
- set allowclick to 0
- set gospot to 1
- set ystop to y
- set xstop to x
- set lablname to wh
- set detectOK to 0
- hearit("readout 2")
- end
-
- on holding
- global allowclick
- set allowclick to 1
- whatcurs()
- go(the frame)
- end
-
- on whatcurs
- global sndlvl
- set nameodacm to the mouseCast
- if nameodacm = -1 then
- exit
- end if
- if (nameodacm >= 1) and (nameodacm <= 999) then
- if the name of cast nameodacm = "Bullet" then
- if the mouseUp then
- cursor(128)
- else
- cursor(136)
- end if
- else
- if the name of cast nameodacm = "Ahead" then
- if the mouseUp then
- cursor(132)
- else
- cursor(133)
- end if
- else
- if the name of cast nameodacm = "Reverse" then
- if the mouseUp then
- cursor(130)
- else
- cursor(131)
- end if
- else
- if the name of cast nameodacm = "PathZone" then
- if the mouseUp then
- if char the mouseChar of field "PathZone" <> RETURN then
- cursor(128)
- else
- cursor(209)
- end if
- else
- cursor(136)
- end if
- else
- if sndlvl then
- set sndlvl to 0
- else
- cursor(209)
- end if
- end if
- end if
- end if
- end if
- end if
- end
-
- on moveahead
- global allowclick
- if not allowclick then
- exit
- end if
- cursor(209)
- set allowclick to 0
- go(marker(1))
- end
-
- on movereverse
- global allowclick
- if not allowclick then
- exit
- end if
- cursor(209)
- set allowclick to 0
- go(marker(0) - 2)
- end
-
- on moverevTo nn
- global allowclick
- if not allowclick then
- exit
- end if
- cursor(209)
- set allowclick to 0
- go(nn)
- end
-
- on textclick ln1mrkr, lnBmrkr, lnCmrkr
- if the mouseLine = 1 then
- go(ln1mrkr)
- end if
- if the mouseLine = 2 then
- go(lnBmrkr)
- end if
- if the mouseLine = 3 then
- go(lnCmrkr)
- end if
- end
-
- on morestarters
- global babbleOK, clickok, sndlvl, theTextSprite, scrollincrement
- put "AT MoreStarters"
- initJibberish()
- set babbleOK to 1
- set clickok to 1
- set scrollincrement to 5
- end
-
- on stopMovie
- global theTextSprite
- end
-
- on babbleOFF
- global babbleOK
- set babbleOK to 0
- end
-
- on babbleON
- global babbleOK
- set babbleOK to 1
- end
-
- on initJibberish
- global babblelength, gobbledygook
- set gobbledygook to "444┬╗ LocH:72464 LocV:43454 Deck 5-1655-0727 LCARS Index 5502 55696 Frame:30.38.5.03 313202 Access 701154 2"
- set babblelength to length(gobbledygook)
- put gobbledygook into field "infobabbleSQ"
- put gobbledygook into field "infobabbleLN"
- put gobbledygook into field "infobabbleLN2"
- put "Finished with initjibberish"
- end
-
- on blinker
- global blinkstate
- if blinkstate then
- set the ink of sprite 15 to 33
- set blinkstate to 0
- else
- set the ink of sprite 15 to 0
- set blinkstate to 1
- end if
- updateStage()
- end
-
- on jibberish
- global babbleOK, babblelength, gobbledygook
- if babbleOK then
- set thetext to field "infobabbleSQ"
- set seed to char babblelength of thetext
- put " " into char babblelength of thetext
- put seed before thetext
- put thetext into field "infobabbleSQ"
- put thetext into field "infobabbleLN"
- put thetext into field "infobabbleLN2"
- blinker()
- end if
- end
-
- on LoadText fileName, castholder
- global theProblem
- put "AT LoadText"
- set TxtReader to FileIO(mnew, "read", the pathName & fileName)
- if not objectp(TxtReader) then
- set theProblem to string(TxtReader)
- tellerror("Text:" && fileName)
- exit
- end if
- set the text of cast castholder to TxtReader(mReadFile)
- TxtReader(mdispose)
- end
-
- on PrepTxtScroll srctxt, Lnsz, Lh, Lv
- global currentTxtWind, stndbyTxtWind, maxLines, sourceText, linesize, wordsSprite, scrollBar
- put "AT PrepTxtScroll"
- puppetSound("readout 2")
- set sourceText to srctxt
- set linesize to Lnsz
- set currentTxtWind to "TxtWinA" & string(linesize)
- set stndbyTxtWind to "TxtWinB" & string(linesize)
- set scrollBar to 17
- PrepScrollArrows()
- set wordsSprite to 18
- puppetSprite(wordsSprite, 1)
- set the castNum of sprite wordsSprite to the number of cast currentTxtWind
- set the locH of sprite wordsSprite to Lh
- set the locV of sprite wordsSprite to Lv
- updateStage()
- FillTextWindow(1)
- set maxLines to the number of lines in field sourceText
- puppetSound(0)
- end
-
- on cleartxtpuppets
- global wordsSprite, upArrSprite, dwnArrSprite
- puppetSprite(upArrSprite, 0)
- puppetSprite(dwnArrSprite, 0)
- puppetSprite(wordsSprite, 0)
- updateStage()
- end
-
- on FillTextWindow firstLine
- global topLineNow, currentTxtWind, stndbyTxtWind, linesize, sourceText
- set topLineNow to firstLine
- put " " into field currentTxtWind
- repeat with n = 0 to linesize - 1
- put line firstLine + n of field sourceText into line n + 1 of field currentTxtWind
- end repeat
- put field currentTxtWind into field stndbyTxtWind
- end
-
- on PrepScrollArrows
- global upArrSprite, dwnArrSprite, scrollBar
- set upArrSprite to 19
- set dwnArrSprite to 20
- puppetSprite(upArrSprite, 1)
- puppetSprite(dwnArrSprite, 1)
- set the castNum of sprite upArrSprite to the number of cast "UpDullS"
- set the locH of sprite upArrSprite to the locH of sprite scrollBar
- set the locV of sprite upArrSprite to the locV of sprite scrollBar - 21
- set the castNum of sprite dwnArrSprite to the number of cast "ButtonDownS"
- set the locH of sprite dwnArrSprite to the locH of sprite scrollBar
- set the locV of sprite dwnArrSprite to the locV of sprite scrollBar + 21
- updateStage()
- end
-
- on shuffleUp
- global topLineNow, currentTxtWind, stndbyTxtWind, maxLines, sourceText, linesize
- if topLineNow > (maxLines - linesize) then
- CheckScrollPos()
- return
- end if
- set start to topLineNow
- repeat with n = 1 to linesize
- put line start + n of field sourceText into line n of field stndbyTxtWind
- end repeat
- SwapTxtWindows()
- set topLineNow to start + 1
- CheckScrollPos()
- end
-
- on CheckScrollPos
- global topLineNow, maxLines, upArrSprite, dwnArrSprite, linesize
- if topLineNow > (maxLines - linesize) then
- set the castNum of sprite dwnArrSprite to the number of cast "DownDullS"
- updateStage()
- else
- set the castNum of sprite dwnArrSprite to the number of cast "ButtonDownS"
- updateStage()
- if topLineNow < 1 then
- set the castNum of sprite upArrSprite to the number of cast "UpDullS"
- updateStage()
- else
- set the castNum of sprite upArrSprite to the number of cast "ButtonUpS"
- updateStage()
- end if
- end if
- end
-
- on shuffleDown
- global topLineNow, currentTxtWind, stndbyTxtWind, sourceText, linesize
- if topLineNow < 1 then
- CheckScrollPos()
- return
- end if
- set k to -1
- set start to topLineNow
- repeat with n = 1 to linesize
- put line start + k + n of field sourceText into line n of field stndbyTxtWind
- end repeat
- SwapTxtWindows()
- set topLineNow to start + k
- CheckScrollPos()
- end
-
- on SwapTxtWindows
- global currentTxtWind, stndbyTxtWind, wordsSprite, linesize
- puppetSound("Chirlip 1")
- if currentTxtWind = ("TxtWinA" & string(linesize)) then
- set currentTxtWind to "TxtWinB" & string(linesize)
- set stndbyTxtWind to "TxtWinA" & string(linesize)
- else
- set currentTxtWind to "TxtWinA" & string(linesize)
- set stndbyTxtWind to "TxtWinB" & string(linesize)
- end if
- set the castNum of sprite wordsSprite to the number of cast currentTxtWind
- updateStage()
- puppetSound(0)
- end
-