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
- set vLang to gLang2
- set gLang2 to 1
- if the mouseCast = 31 then
- set the visible of sprite 37 to 1
- set the ink of sprite 37 to 2
- updateStage()
- waitTicks(15)
- set the visible of sprite 37 to 0
- updateStage()
- sound playFile 1, gRoot & "1" & gfDelim & "n2"
- end if
- set moused to the mouseCast + 6
- if (the mouseCast < 2) or (the mouseCast > 30) 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
- if gAct = "f" then
- set the ink of sprite moused to 8
- set the visible of sprite moused to 0
- updateStage()
- if getAt(glObj, moused - 7) = gvpointer then
- playWave("correct", "i")
- set gPrompt to 2
- exit
- else
- playWave("tryagain", "i")
- exit
- end if
- else
- set gCursor to 0
- cursor(4)
- repeat with i = 8 to 45
- 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
- end if
- end if
- playWave(getAt(gwaLanLst, 1), "p")
- set the locH of sprite 47 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
- set gLang2 to vLang
- end
-