home *** CD-ROM | disk | FTP | other *** search
- global moused, gAct, txFront, txBackSin, txBackDbl, gtxtSw1, gtxtSw2, gLang1, gLang2, txFrSmall, txFrMed, txFrBig, l1Text, gFlash, gvpointer, gPrompt, wSprite, gfDelim, gRoot, gBox, gwaLanLst, glObj, gCursor
-
- on enterFrame
- global gAct, gLastSp
- repeat with i = 2 to 7
- set the ink of sprite i to 0
- end repeat
- if gFlash > 0 then
- if gFlash = 1 then
- playWave(getAt(gwaLanLst, 1), "m")
- end if
- set sp to wSprite + 6
- set the ink of sprite sp to 2
- set the visible of sprite sp to 1
- updateStage()
- waitTicks(60)
- set the visible of sprite sp to 0
- updateStage()
- waitTicks(60)
- set gFlash to gFlash - 1
- else
- if gPrompt = 2 then
- set gPrompt to 1
- set gpromptObj to 0
- RndWord()
- playWave(getAt(gwaLanLst, 1), "p")
- else
- if gPrompt = 1 then
- set gPrompt to 0
- playWave(getAt(gwaLanLst, 1), "p")
- end if
- end if
- end if
- end
-
- on exitFrame
- go(the frame)
- end
-
- on mouseDown
- global HDdir, gRoot, gfDelim
- if gCursor = 0 then
- exit
- end if
- set vLang to gLang2
- set gLang2 to 3
- if the mouseCast = 32 then
- set the visible of sprite 38 to 1
- set the ink of sprite 38 to 2
- updateStage()
- waitTicks(15)
- set the visible of sprite 38 to 0
- updateStage()
- sound playFile 1, gRoot & "0" & gfDelim & "onethou"
- end if
- if the mouseCast = 33 then
- set the visible of sprite 39 to 1
- set the ink of sprite 39 to 2
- updateStage()
- waitTicks(15)
- set the visible of sprite 39 to 0
- updateStage()
- sound playFile 1, gRoot & "0" & gfDelim & "tenthou"
- end if
- if the mouseCast = 34 then
- set the visible of sprite 40 to 1
- set the ink of sprite 40 to 2
- updateStage()
- waitTicks(15)
- set the visible of sprite 40 to 0
- updateStage()
- sound playFile 1, gRoot & "0" & gfDelim & "onehuth"
- end if
- if the mouseCast = 35 then
- set the visible of sprite 41 to 1
- set the ink of sprite 41 to 2
- updateStage()
- waitTicks(15)
- set the visible of sprite 41 to 0
- updateStage()
- sound playFile 1, gRoot & "0" & gfDelim & "onemill"
- end if
- if the mouseCast = 36 then
- set the visible of sprite 42 to 1
- set the ink of sprite 42 to 2
- updateStage()
- waitTicks(15)
- set the visible of sprite 42 to 0
- updateStage()
- sound playFile 1, gRoot & "0" & gfDelim & "zero"
- end if
- set mV to the mouseV
- set mH to the mouseH
- set moused to the mouseCast + 6
- if (the mouseCast < 2) or (the mouseCast > 31) then
- set gLang2 to vLang
- exit
- end if
- set the ink of sprite moused to 2
- set the visible of sprite moused to 1
- updateStage()
- waitTicks(15)
- set the visible of sprite moused to 0
- updateStage()
- if gAct = "f" then
- else
- set gCursor to 0
- cursor(4)
- repeat with i = 8 to 45
- set the cursor of sprite i to 4
- end repeat
- updateStage()
- if ((moused - 8) > 0) and ((moused - 8) <= count(glObj)) then
- set thePointer to getAt(glObj, moused - 8)
- put "pointer" && thePointer
- else
- set thePointer to 0
- if the mouseCast = 2 then
- puppetSound("zero")
- end if
- end if
- if thePointer > 0 then
- if objectp(gLanDta) then
- gLanDta(mdispose)
- end if
- set gLanDta to FileIO(mnew, "read", HDdir & "wa_lan.dta")
- set g to gLanDta(mSetPosition, getAt(gwaLanDp, thePointer))
- set gwaLanLst to []
- repeat with i = 1 to 5
- set theText to gLanDta(mReadToken, "|", "|")
- append(gwaLanLst, theText)
- end repeat
- set the regPoint of cast txBackSin to point(0, 0)
- set the regPoint of cast txBackDbl to point(0, 0)
- set words1 to getAt(gwaLanLst, gLang1 + 2)
- set words2 to getAt(gwaLanLst, gLang2 + 2)
- if gtxtSw1 and gtxtSw2 then
- if length(words1) > length(words2) then
- set bigger to length(words1)
- else
- set bigger to length(words2)
- end if
- set the castNum of sprite 46 to txBackDbl
- if bigger < 13 then
- set the text of cast txFrSmall to words1 & RETURN & words2
- set the castNum of sprite 47 to txFrSmall
- set the rect of sprite 46 to the rect of cast txFrSmall
- else
- if bigger < 25 then
- set the text of cast txFrMed to words1 & RETURN & words2
- set the castNum of sprite 47 to txFrMed
- set the rect of sprite 46 to the rect of cast txFrMed
- else
- set the text of cast txFrBig to words1 & RETURN & words2
- set the castNum of sprite 47 to txFrBig
- set the rect of sprite 46 to the rect of cast txFrBig
- end if
- end if
- else
- if gtxtSw1 then
- set bigger to length(words1)
- set the castNum of sprite 46 to txBackSin
- if bigger < 13 then
- set the text of cast txFrSmall to words1
- set the castNum of sprite 47 to txFrSmall
- set the rect of sprite 46 to the rect of cast txFrSmall
- else
- if bigger < 25 then
- set the text of cast txFrMed to words1
- set the castNum of sprite 47 to txFrMed
- set the rect of sprite 46 to the rect of cast txFrMed
- else
- set the text of cast txFrBig to words1
- set the castNum of sprite 47 to txFrBig
- set the rect of sprite 46 to the rect of cast txFrBig
- end if
- end if
- else
- if gtxtSw2 then
- set bigger to length(words2)
- set the castNum of sprite 46 to txBackSin
- if bigger < 13 then
- set the text of cast txFrSmall to words2
- set the castNum of sprite 47 to txFrSmall
- set the rect of sprite 46 to the rect of cast txFrSmall
- else
- if bigger < 25 then
- set the text of cast txFrMed to words2
- set the castNum of sprite 47 to txFrMed
- set the rect of sprite 46 to the rect of cast txFrMed
- else
- set the text of cast txFrBig to words2
- set the castNum of sprite 47 to txFrBig
- set the rect of sprite 46 to the rect of cast txFrBig
- end if
- end if
- end if
- end if
- end if
- if mH > 320 then
- set a to mH - the width of sprite 46
- if a < 0 then
- set the locH of sprite 46 to 0
- else
- set the locH of sprite 46 to a
- end if
- else
- set a to mH
- if (mH + the width of sprite 46) > 640 then
- set the locH of sprite 46 to 640 - the width of sprite 46
- else
- set the locH of sprite 46 to a
- end if
- end if
- if mV > 240 then
- set the locV of sprite 46 to mV - the height of sprite 46
- else
- set the locV of sprite 46 to mV
- end if
- if gtxtSw1 or gtxtSw2 then
- set the locH of sprite 47 to the locH of sprite 46
- set the locV of sprite 47 to the locV of sprite 46
- end if
- updateStage()
- if objectp(gLanDta) then
- gLanDta(mdispose)
- end if
- playWave(getAt(gwaLanLst, 1), "p")
- end if
- end if
- updateStage()
- cursor(-1)
- repeat with i = 8 to 44
- if the castNum of sprite i > 0 then
- set the cursor of sprite i to 3
- next repeat
- end if
- set the cursor of sprite i to -1
- end repeat
- set gCursor to 1
- set gLang2 to vLang
- end
-