home *** CD-ROM | disk | FTP | other *** search
/ Painter Bear's Language Bridge — Italian / Bridge_ponte_itialian.iso / pc / helpers / open.dxr / 00001_basic.ls next >
Encoding:
Text File  |  2001-02-22  |  3.2 KB  |  122 lines

  1. on startMovie
  2.   global gMusOn
  3.   cursor(4)
  4.   clearGlobals()
  5.   registerXtras()
  6.   puppetSound(3, "loopLoud")
  7.   set gMusOn to 1
  8.   definegFileDelimiter()
  9.   initPuppets()
  10.   initLang()
  11.   initMovie()
  12.   initQandA()
  13.   cursor(-1)
  14. end
  15.  
  16. on stopMovie
  17.   global gDB, gDBTable
  18.   put "**" into field "text display"
  19.   put "**" into field "wordFind"
  20.   put "**" into field "possWords"
  21.   put "**" into field "wordFound"
  22.   repeat with X = 1 to 4
  23.     put "**" into field (X && "answer")
  24.   end repeat
  25.   set gDBTable to 0
  26.   set gDB to 0
  27. end
  28.  
  29. on initLang
  30.   global gLangSelect, gLangName, gPopNo, gPopBox, gPopYes
  31.   set gLangSelect to chars(getNthFileNameInFolder(the moviePath & "id", 1), 1, 1)
  32.   case gLangSelect of
  33.     "f":
  34.       set gLangName to "French"
  35.     "s":
  36.       set gLangName to "Spanish"
  37.     "g":
  38.       set gLangName to "German"
  39.     "i":
  40.       set gLangName to "Italian"
  41.   end case
  42.   go(gLangSelect & " title")
  43. end
  44.  
  45. on registerXtras
  46.   if the machineType = 256 then
  47.     dosRegister(106507129)
  48.   else
  49.     dosRegister(21300023)
  50.   end if
  51.   register(xtra("PrintOMatic"), "PMAT162-166-35058")
  52. end
  53.  
  54. on initMovie
  55.   global gCurrSndList, gSndPath, gFileDelimiter, gScore, gCurrAnimaList, gBridgeLst, gRaceTimer, gFlashTimer, gMusOn
  56.   initializeBtnHilites()
  57.   put EMPTY into field "text display"
  58.   put EMPTY into field "wordFind"
  59.   put EMPTY into field "possWords"
  60.   put EMPTY into field "wordFound"
  61.   repeat with X = 1 to 4
  62.     put EMPTY into field (X && "answer")
  63.   end repeat
  64.   set gCurrSndList to []
  65.   set gCurrAnimaList to []
  66.   set gBridgeLst to []
  67.   set gSndPath to the moviePath & "sounds" & gFileDelimiter
  68.   set gScore to 0
  69.   set gMusOn to 1
  70.   set gRaceTimer to new(script "Parent for Timer")
  71.   set gFlashTimer to new(script "Parent for Timer")
  72. end
  73.  
  74. on initQandA
  75.   global gLangSelect, gWhichQuest, gLangName, gCat, gLangDirect, gPastQwestLst, gBridgeParts
  76.   set gWhichQuest to 1
  77.   set gPastQwestLst to []
  78.   set gBridgeParts to 0
  79.   StampTrackingAtBegining()
  80. end
  81.  
  82. on definegFileDelimiter
  83.   global gFileDelimiter
  84.   if the machineType = 256 then
  85.     set gFileDelimiter to "\"
  86.   else
  87.     set gFileDelimiter to ":"
  88.   end if
  89.   set the itemDelimiter to ","
  90. end
  91.  
  92. on popUp whichPop, whichWay
  93.   global gPopBox, gPopYes, gPopNo, gPopped, gCurrPop, gLangDirect, gLangSelect
  94.   set gCurrPop to whichPop
  95.   if gLangDirect = 1 then
  96.     set langPrefix to "e"
  97.   else
  98.     set langPrefix to gLangSelect
  99.   end if
  100.   set the memberNum of sprite gPopBox to the number of member (langPrefix & " popUp " & whichPop)
  101.   set the loc of sprite gPopBox to point(320, 240)
  102.   case whichWay of
  103.     "y/n":
  104.       set the memberNum of sprite gPopYes to the number of member "popUp yes up"
  105.       set the loc of sprite gPopYes to point(532, 351)
  106.       set the memberNum of sprite gPopNo to the number of member "popUp no up"
  107.       set the loc of sprite gPopNo to point(109, 352)
  108.     "ok":
  109.       set the memberNum of sprite gPopYes to the number of member "popUp ok up"
  110.       set the loc of sprite gPopYes to point(320, 351)
  111.   end case
  112.   set gPopped to 1
  113. end
  114.  
  115. on disappearPop whichPop
  116.   global gPopBox, gPopYes, gPopNo, gPopped, gBlkBoxSprt
  117.   set the loc of sprite gPopBox to point(-999, -999)
  118.   set the loc of sprite gPopYes to point(-999, -999)
  119.   set the loc of sprite gPopNo to point(-999, -999)
  120.   set gPopped to 0
  121. end
  122.