home *** CD-ROM | disk | FTP | other *** search
/ Dictionnaire Multimedia Multilingue (Home PC 42) / dictionarvizual.iso / data / spanalph.dir / 00040.ls < prev    next >
Encoding:
Text File  |  1996-03-13  |  2.8 KB  |  111 lines

  1. global moused, gAct, txFront, txBackSin, txBackDbl, gtxtSw1, gtxtSw2, gLang1, gLang2, txFrSmall, txFrMed, txFrBig, l1Text, gFlash, gvpointer, gPrompt, wSprite, gfDelim, gRoot, gBox, gwaLanLst, glObj, gCursor
  2.  
  3. on enterFrame
  4.   global gAct, gLastSp
  5.   repeat with i = 2 to 7
  6.     set the ink of sprite i to 0
  7.   end repeat
  8.   if gFlash > 0 then
  9.     if gFlash = 1 then
  10.       playWave(getAt(gwaLanLst, 1), "m")
  11.     end if
  12.     set sp to wSprite + 6
  13.     set the ink of sprite sp to 2
  14.     set the visible of sprite sp to 1
  15.     updateStage()
  16.     waitTicks(60)
  17.     set the visible of sprite sp to 0
  18.     updateStage()
  19.     waitTicks(60)
  20.     set gFlash to gFlash - 1
  21.   else
  22.     if gPrompt = 2 then
  23.       set gPrompt to 1
  24.       set gpromptObj to 0
  25.       RndWord()
  26.       playWave(getAt(gwaLanLst, 1), "p")
  27.     else
  28.       if gPrompt = 1 then
  29.         set gPrompt to 0
  30.         playWave(getAt(gwaLanLst, 1), "p")
  31.       end if
  32.     end if
  33.   end if
  34. end
  35.  
  36. on exitFrame
  37.   go(the frame)
  38. end
  39.  
  40. on mouseDown
  41.   global HDdir, gRoot, gfDelim
  42.   set vLang to gLang2
  43.   set gLang2 to 1
  44.   if the mouseCast = 31 then
  45.     set the visible of sprite 37 to 1
  46.     set the ink of sprite 37 to 2
  47.     updateStage()
  48.     waitTicks(15)
  49.     set the visible of sprite 37 to 0
  50.     updateStage()
  51.     sound playFile 1, gRoot & "1" & gfDelim & "n2"
  52.   end if
  53.   set moused to the mouseCast + 6
  54.   if (the mouseCast < 2) or (the mouseCast > 30) then
  55.     set gLang2 to vLang
  56.     exit
  57.   end if
  58.   set the ink of sprite moused to 2
  59.   set the visible of sprite moused to 1
  60.   updateStage()
  61.   waitTicks(15)
  62.   set the visible of sprite moused to 0
  63.   if gAct = "f" then
  64.     set the ink of sprite moused to 8
  65.     set the visible of sprite moused to 0
  66.     updateStage()
  67.     if getAt(glObj, moused - 7) = gvpointer then
  68.       playWave("correct", "i")
  69.       set gPrompt to 2
  70.       exit
  71.     else
  72.       playWave("tryagain", "i")
  73.       exit
  74.     end if
  75.   else
  76.     set gCursor to 0
  77.     cursor(4)
  78.     repeat with i = 8 to 45
  79.       set the cursor of sprite i to 4
  80.     end repeat
  81.     updateStage()
  82.     set thePointer to getAt(glObj, moused - 7)
  83.     if thePointer > -1 then
  84.       if objectp(gLanDta) then
  85.         gLanDta(mdispose)
  86.       end if
  87.       set gLanDta to FileIO(mnew, "read", HDdir & "wa_lan.dta")
  88.       set g to gLanDta(mSetPosition, getAt(gwaLanDp, thePointer))
  89.       set gwaLanLst to []
  90.       repeat with i = 1 to 5
  91.         set theText to gLanDta(mReadToken, "|", "|")
  92.         append(gwaLanLst, theText)
  93.       end repeat
  94.     end if
  95.   end if
  96.   playWave(getAt(gwaLanLst, 1), "p")
  97.   set the locH of sprite 47 to 800
  98.   set the locH of sprite 46 to 800
  99.   updateStage()
  100.   cursor(-1)
  101.   repeat with i = 8 to 44
  102.     if the castNum of sprite i > 0 then
  103.       set the cursor of sprite i to 3
  104.       next repeat
  105.     end if
  106.     set the cursor of sprite i to -1
  107.   end repeat
  108.   set gCursor to 1
  109.   set gLang2 to vLang
  110. end
  111.