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
- if gCursor = 0 then
- exit
- 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 > 38) then
- 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
- if gAct = "f" then
- else
- set gCursor to 0
- cursor(4)
- repeat with i = 8 to 44
- set the cursor of sprite i to 4
- end repeat
- updateStage()
- set thePointer to getAt(glObj, moused - 7)
- if thePointer > -1 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 45 to txBackDbl
- if bigger < 13 then
- set the text of cast txFrSmall to words1 & RETURN & words2
- set the castNum of sprite 46 to txFrSmall
- set the rect of sprite 45 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 46 to txFrMed
- set the rect of sprite 45 to the rect of cast txFrMed
- else
- set the text of cast txFrBig to words1 & RETURN & words2
- set the castNum of sprite 46 to txFrBig
- set the rect of sprite 45 to the rect of cast txFrBig
- end if
- end if
- else
- if gtxtSw1 then
- set bigger to length(words1)
- set the castNum of sprite 45 to txBackSin
- if bigger < 13 then
- set the text of cast txFrSmall to words1
- set the castNum of sprite 46 to txFrSmall
- set the rect of sprite 45 to the rect of cast txFrSmall
- else
- if bigger < 25 then
- set the text of cast txFrMed to words1
- set the castNum of sprite 46 to txFrMed
- set the rect of sprite 45 to the rect of cast txFrMed
- else
- set the text of cast txFrBig to words1
- set the castNum of sprite 46 to txFrBig
- set the rect of sprite 45 to the rect of cast txFrBig
- end if
- end if
- else
- if gtxtSw2 then
- set bigger to length(words2)
- set the castNum of sprite 45 to txBackSin
- if bigger < 13 then
- set the text of cast txFrSmall to words2
- set the castNum of sprite 46 to txFrSmall
- set the rect of sprite 45 to the rect of cast txFrSmall
- else
- if bigger < 25 then
- set the text of cast txFrMed to words2
- set the castNum of sprite 46 to txFrMed
- set the rect of sprite 45 to the rect of cast txFrMed
- else
- set the text of cast txFrBig to words2
- set the castNum of sprite 46 to txFrBig
- set the rect of sprite 45 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 45
- if a < 0 then
- set the locH of sprite 45 to 0
- else
- set the locH of sprite 45 to a
- end if
- else
- set a to mH
- if (mH + the width of sprite 45) > 640 then
- set the locH of sprite 45 to 640 - the width of sprite 45
- else
- set the locH of sprite 45 to a
- end if
- end if
- if mV > 240 then
- set the locV of sprite 45 to mV - the height of sprite 45
- else
- set the locV of sprite 45 to mV
- end if
- if gtxtSw1 or gtxtSw2 then
- set the locH of sprite 46 to the locH of sprite 45
- set the locV of sprite 46 to the locV of sprite 45
- end if
- updateStage()
- if objectp(gLanDta) then
- gLanDta(mdispose)
- end if
- end if
- end if
- set vLang to gLang2
- set gLang2 to 0
- playWave(getAt(gwaLanLst, 1), "p")
- set gLang2 to vLang
- set the locH of sprite 45 to 800
- set the locH of sprite 46 to 800
- 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
- end
-