home *** CD-ROM | disk | FTP | other *** search
/ Pro One: Netcracker Netscape Navigator / ProOne: Netcracker Netscape Navigator.iso / pc / nc / nct07005.geo / 00260.ls < prev    next >
Encoding:
Text File  |  1997-03-19  |  4.5 KB  |  207 lines

  1. on startMovie
  2.   Set_CDcounter(1)
  3.   initLesson()
  4.   CheckForTagWd()
  5. end
  6.  
  7. on HideLastStep
  8.   unLoadCast()
  9. end
  10.  
  11. on TheinitCursor
  12.   initCursorCastNum()
  13.   initCursorList(1)
  14.   set CursorCastNum to getCursor(2)
  15.   cursor([CursorCastNum, CursorCastNum + 1])
  16. end
  17.  
  18. on checkScreenStatus
  19.   CheckRollOver()
  20.   CheckSnakeStatus()
  21.   go(the frame)
  22. end
  23.  
  24. on BlinkNext
  25.   if (the timer > getTimer()) and not soundBusy(2) then
  26.     startTimer()
  27.     if the name of cast the castNum of sprite get_NEXTSprite() = "NEXT" then
  28.       set the castNum of sprite get_NEXTSprite() to the number of cast "NEXT_E"
  29.     else
  30.       set the castNum of sprite get_NEXTSprite() to the number of cast "NEXT"
  31.     end if
  32.   end if
  33. end
  34.  
  35. on GoNext
  36.   if not get_Disabled() then
  37.     sound stop 2
  38.     if Get_NEXT() = 2 then
  39.       unLoadCast(29, 55)
  40.     end if
  41.     if Get_NEXT() = 8 then
  42.       unLoadCast(177, 189)
  43.     end if
  44.     if Get_NEXT() = 4 then
  45.       unLoadCast(137, 174)
  46.     end if
  47.     if Get_NEXT() = 9 then
  48.       repeat with i = 12 to 20
  49.         UpdateCursors(i, 0)
  50.       end repeat
  51.     end if
  52.     if Get_NEXT() > 12 then
  53.       GoNextMovie()
  54.     else
  55.       go("t" & Get_NEXT())
  56.     end if
  57.     Set_NEXT(Get_NEXT() + 1)
  58.   end if
  59. end
  60.  
  61. on stopMovie
  62.   sound stop 1
  63.   unLoad()
  64.   setEmptyCursor()
  65. end
  66.  
  67. on GoNextMovie
  68.   PlaySound("GOSOUND.SO1")
  69.   SaveHilite()
  70.   Add_CDcounter(1)
  71.   set cdNum to Get_CDcounter()
  72.   set movieName to item cdNum of Get_CurrentSnakeScreens()
  73.   go("INIT" & Get_ScreenSubject(), movieName & ".GEO")
  74. end
  75.  
  76. on playTheTSound theTSnd
  77.   if theTSnd > 9 then
  78.     PlaySound("NCT07005.s" & theTSnd)
  79.   else
  80.     PlaySound("NCT07005.s0" & theTSnd)
  81.   end if
  82. end
  83.  
  84. on InitLamp
  85.   visLamp(0)
  86.   UpdateCursors(34, 0)
  87.   set the castNum of sprite 32 to the number of cast "lamp_Off"
  88.   UpdateCursors(32, 3)
  89. end
  90.  
  91. on visLamp bool
  92.   set the visible of sprite 33 to bool
  93.   set the visible of sprite 34 to bool
  94. end
  95.  
  96. on unSetMouseEvents
  97.   global puppetList
  98.   set puppetList to []
  99.   repeat with i = 1 to 48
  100.     add(puppetList, the puppet of sprite i)
  101.     if not (the puppet of sprite i) then
  102.       set the puppet of sprite i to 1
  103.     end if
  104.   end repeat
  105.   play frame "outLamp"
  106. end
  107.  
  108. on setMouseEvents
  109.   global puppetList
  110.   set the mouseDownScript to EMPTY
  111.   set the mouseUpScript to EMPTY
  112.   set the keyDownScript to EMPTY
  113.   set the keyUpScript to EMPTY
  114.   repeat with i = 1 to 48
  115.     if getAt(puppetList, i) = 0 then
  116.       set the puppet of sprite i to 0
  117.     end if
  118.   end repeat
  119.   play done
  120. end
  121.  
  122. on dont
  123.   dontPassEvent()
  124. end
  125.  
  126. on HandleLamp
  127.   sound stop 1
  128.   sound stop 2
  129.   if the name of cast the castNum of sprite 32 = "lamp_On" then
  130.     set the castNum of sprite 32 to the number of cast "lamp_Off"
  131.     set the visible of sprite 33 to 0
  132.     set the visible of sprite 34 to 0
  133.     UpdateCursors(34, 0)
  134.     set the castNum of sprite 34 to the number of cast "EXITLAMP"
  135.     updateStage()
  136.     unSetMouseEvents()
  137.   else
  138.     set the castNum of sprite 32 to the number of cast "lamp_On"
  139.     UpdateCursors(34, 3)
  140.     set the visible of sprite 33 to 1
  141.     set the visible of sprite 34 to 1
  142.     updateStage()
  143.     PlaySound("NCT07005.T01")
  144.     displayTip(34)
  145.   end if
  146.   updateStage()
  147. end
  148.  
  149. on displayTip theExitBtnSp
  150.   global exitTheLoop
  151.   set exitTheLoop to 0
  152.   set the mouseDownScript to "dont"
  153.   set the mouseUpScript to "dont"
  154.   set the keyDownScript to "dont"
  155.   set the keyUpScript to "dont"
  156.   set the exitLock to 0
  157.   repeat while not exitTheLoop
  158.     if the mouseCast = the number of cast "EXITLAMP" then
  159.       set the cursor of sprite 48 to [404, 405]
  160.     else
  161.       set the cursor of sprite 48 to [400, 401]
  162.     end if
  163.     if the mouseDown and (the mouseCast = the number of cast "EXITLAMP") then
  164.       switchExitLampButt(theExitBtnSp, "EXITLAMP_D")
  165.     end if
  166.   end repeat
  167.   set the exitLock to 1
  168.   set the cursor of sprite 48 to 0
  169.   HandleLamp()
  170. end
  171.  
  172. on switchExitLampButt spriteNum, castDown
  173.   global exitTheLoop
  174.   set flag to 0
  175.   set SaveCast to the castNum of sprite spriteNum
  176.   set flag to swapExitLampCast(spriteNum, SaveCast, castDown)
  177.   repeat while the mouseDown
  178.     set flag to swapExitLampCast(spriteNum, SaveCast, castDown)
  179.   end repeat
  180.   if flag = 1 then
  181.     set exitTheLoop to 1
  182.   end if
  183. end
  184.  
  185. on swapExitLampCast spriteNum, SaveCast, castDown
  186.   if rollOver(spriteNum) then
  187.     set the castNum of sprite spriteNum to the number of cast castDown
  188.     updateStage()
  189.     return 1
  190.   else
  191.     set the castNum of sprite spriteNum to the number of cast SaveCast
  192.     updateStage()
  193.     return 0
  194.   end if
  195. end
  196.  
  197. on waitAsecond
  198.   set XXX to 0
  199.   repeat while XXX <> 3
  200.     if the timer > getTimer() then
  201.       startTimer()
  202.       set tempXXX to XXX + 1
  203.       set XXX to tempXXX
  204.     end if
  205.   end repeat
  206. end
  207.