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

  1. on initLesson
  2.   setRollName(EMPTY)
  3.   set the visible of sprite 48 to 0
  4.   InitSnakelogic()
  5.   RestoreHilites()
  6.   Set_BACKSprite(47)
  7.   Set_NEXTSprite(46)
  8.   Set_HelpSprite(45)
  9.   Set_SoundSprite(44)
  10.   Set_NOTEPADSprite(43)
  11.   Set_GLOSSARYSprite(42)
  12.   set_MarkSprite(2)
  13.   Set_NavigatorHL(5)
  14.   Set_MainSprite(6)
  15.   Set_IndexSprite(7)
  16.   Set_FindSprite(9)
  17.   Set_TagWDSprite(8)
  18.   repeat with i = 42 to 47
  19.     set the immediate of sprite i to 1
  20.     set the puppet of sprite i to 1
  21.   end repeat
  22.   set the puppet of sprite get_NavigatorHL() to 1
  23.   set the puppet of sprite Get_MarkSprite() to 1
  24.   set the mouseDownScript to "CheckOpenWindow"
  25. end
  26.  
  27. on CheckForTagWd
  28.   global TagWD
  29.   if objectp(TagWD) then
  30.     set the cursor of sprite 48 to [400, 401]
  31.   end if
  32. end
  33.  
  34. on PlaySound theSnd
  35.   if Get_PlayDub() then
  36.     sound playFile 2, theSnd
  37.   end if
  38. end
  39.  
  40. on GoMain
  41.   SaveSeenScreens()
  42.   go(1, "NC_MM010.GEO")
  43. end
  44.  
  45. on GoFind
  46. end
  47.  
  48. on GoIndex
  49. end
  50.  
  51. on GoTags
  52.   global TagWD
  53.   if objectp(TagWD) then
  54.     forget(TagWD)
  55.   end if
  56.   set the cursor of sprite 48 to [400, 401]
  57.   set TagWD to window "NC_TAGS.GEO"
  58.   set the rect of TagWD to rect(the stageLeft + 220, the stageTop + 116, the stageLeft + 444, the stageTop + 361)
  59.   set the titleVisible of TagWD to 0
  60.   set the modal of TagWD to 1
  61.   tell TagWD
  62.     PlaceMySlider()
  63.   end tell
  64.   open(TagWD)
  65. end
  66.  
  67. on CloseTagWindow
  68.   global TagWD
  69.   if objectp(TagWD) then
  70.     forget(TagWD)
  71.   end if
  72.   set the cursor of sprite 48 to 0
  73. end
  74.  
  75. on GoTagMovie
  76.   go("Init" & Get_ScreenSubject(), Get_TagMovie())
  77. end
  78.  
  79. on Set_TagMovie theMovie
  80.   global TagMovie
  81.   set TagMovie to theMovie
  82. end
  83.  
  84. on Get_TagMovie
  85.   global TagMovie
  86.   return TagMovie
  87. end
  88.  
  89. on MarkScreen toMark
  90.   set the castNum of sprite Get_MarkSprite() to the number of cast ("V_" & toMark)
  91.   updateStage()
  92. end
  93.  
  94. on HandleSound
  95.   global volumeWindow
  96.   if objectp(volumeWindow) then
  97.     forget(volumeWindow)
  98.   end if
  99.   EnableBtn("SOUND", get_SOUNDSprite())
  100.   set volumeWindow to window "NC_VOL.GEO"
  101.   set the rect of volumeWindow to rect(the stageLeft + 66, the stageTop + 374, the stageLeft + 195, the stageTop + 422)
  102.   set the titleVisible of volumeWindow to 0
  103.   tell volumeWindow
  104.     RestoreSoundStatus()
  105.   end tell
  106.   open(volumeWindow)
  107. end
  108.  
  109. on handleQuit
  110.   global QuitWindow, CDfilePath, PCDEL
  111.   cursor(4)
  112.   if objectp(QuitWindow) then
  113.     forget(QuitWindow)
  114.   end if
  115.   set the cursor of sprite 48 to [400, 401]
  116.   set QuitWindow to window (CDfilePath & "WDS" & PCDEL & "NC_QUIT.GEO")
  117.   set the rect of QuitWindow to rect(the stageLeft + 162, the stageTop + 122, the stageLeft + 478, the stageTop + 358)
  118.   set the titleVisible of QuitWindow to 0
  119.   set the modal of QuitWindow to 1
  120.   open(QuitWindow)
  121. end
  122.  
  123. on closeQuitWindow
  124.   global QuitWindow
  125.   updateStage()
  126.   set the visible of sprite 48 to 0
  127.   set the cursor of sprite 48 to 0
  128.   forget(QuitWindow)
  129.   continue()
  130. end
  131.  
  132. on leaveApplication
  133.   global QuitWindow, UsersData, TheBackWindow
  134.   forget(QuitWindow)
  135.   if the machineType <> 256 then
  136.   end if
  137.   quit()
  138. end
  139.  
  140. on handleHELP
  141.   EnableBtn("HELP", get_HELPSprite())
  142. end
  143.  
  144. on HandleNEXT
  145.   GoNext()
  146.   EnableBtn("NEXT", get_NEXTSprite())
  147. end
  148.  
  149. on HandleBACK
  150.   EnableBtn("BACK", get_BACKSprite())
  151.   Set_NEXT(1)
  152.   sound stop 2
  153.   setEmptyCursor()
  154.   go("start")
  155. end
  156.  
  157. on HandleGLOSSARY
  158.   global DicWindow
  159.   EnableBtn("GLOSSARY", Get_GLOSSARYSprite())
  160.   set the cursor of sprite 48 to [400, 401]
  161.   open(DicWindow)
  162.   tell DicWindow
  163.     go(2)
  164.   end tell
  165. end
  166.  
  167. on closeGLOSSARYwindow
  168.   set the cursor of sprite 48 to 0
  169. end
  170.  
  171. on closeNotePadWindow
  172.   set the cursor of sprite 48 to 0
  173. end
  174.  
  175. on HandleNOTEPAD
  176.   global NoteBookWindow
  177.   EnableBtn("NOTEPAD", Get_NOTEPADSprite())
  178.   set the cursor of sprite 48 to [400, 401]
  179.   if objectp(NoteBookWindow) then
  180.     forget(NoteBookWindow)
  181.   end if
  182.   set NoteBookWindow to window "NC_PAD.GEO"
  183.   set the rect of NoteBookWindow to rect(the stageLeft + 7, the stageTop + 247, the stageLeft + 209, the stageTop + 419)
  184.   set NBRect to the rect of NoteBookWindow
  185.   set x1 to getAt(NBRect, 1)
  186.   set y1 to getAt(NBRect, 2)
  187.   set x2 to getAt(NBRect, 3)
  188.   set y2 to getAt(NBRect, 4)
  189.   set the fileName of NoteBookWindow to "NC_PAD.GEO"
  190.   set the modal of NoteBookWindow to 1
  191.   set the windowType of NoteBookWindow to 2
  192.   set the titleVisible of window "NoteBook" to 0
  193.   open(NoteBookWindow)
  194. end
  195.  
  196. on createNoteBook
  197.   global NBPrintWindow
  198.   if objectp(NBPrintWindow) then
  199.     forget(NBPrintWindow)
  200.   end if
  201.   set NBPrintWindow to window "NC_PRINT.GEO"
  202.   set StageRect to the rect of the stage
  203.   set x1 to getAt(StageRect, 1)
  204.   set y1 to getAt(StageRect, 2)
  205.   set x2 to getAt(StageRect, 3)
  206.   set y2 to getAt(StageRect, 4)
  207.   set the rect of NBPrintWindow to rect(x1, y1, x1 + 640, y1 + 480)
  208.   set NBRect to the rect of NBPrintWindow
  209.   set the fileName of NBPrintWindow to "Auto Page SetUp"
  210.   set the windowType of NBPrintWindow to 2
  211.   open(NBPrintWindow)
  212. end
  213.  
  214. on keyDown
  215.   if the commandDown and ((the key = "q") or (the key = ".")) then
  216.     handleQuit()
  217.   else
  218.     if (the keyCode = 76) or (the keyCode = 36) then
  219.       if get_CurrLogic() = "nameStroke" then
  220.         OK_NewName()
  221.       else
  222.         if get_CurrLogic() = "nameScroll" then
  223.           OK_NameScroll()
  224.         end if
  225.       end if
  226.     else
  227.       pass()
  228.     end if
  229.   end if
  230. end
  231.  
  232. on CheckOpenWindow
  233.   global volumeWindow
  234.   if objectp(volumeWindow) then
  235.     forget(volumeWindow)
  236.   end if
  237. end
  238.  
  239. on CheckRollOver
  240.   if rollOver(get_IndexSprite()) then
  241.     set the castNum of sprite get_NavigatorHL() to the number of cast "Index-HL"
  242.     set Hloc to the locH of sprite get_IndexSprite()
  243.     set Vloc to the locV of sprite get_IndexSprite()
  244.   else
  245.     if rollOver(get_FindSprite()) then
  246.       set the castNum of sprite get_NavigatorHL() to the number of cast "Find-HL"
  247.       set Hloc to the locH of sprite get_FindSprite()
  248.       set Vloc to the locV of sprite get_FindSprite()
  249.     else
  250.       if rollOver(Get_TagWdSprite()) then
  251.         set the castNum of sprite get_NavigatorHL() to the number of cast "TagWD-HL"
  252.         set Hloc to the locH of sprite Get_TagWdSprite()
  253.         set Vloc to the locV of sprite Get_TagWdSprite()
  254.       else
  255.         set Hloc to EMPTY
  256.       end if
  257.     end if
  258.   end if
  259.   if Hloc <> EMPTY then
  260.     set the locH of sprite get_NavigatorHL() to Hloc
  261.     set the locV of sprite get_NavigatorHL() to Vloc
  262.     set the visible of sprite get_NavigatorHL() to 1
  263.     updateStage()
  264.   else
  265.     set the visible of sprite get_NavigatorHL() to 0
  266.     updateStage()
  267.   end if
  268. end
  269.  
  270. on setDefaultCursor
  271.   set cursorList to getCursorList()
  272.   set counter to count(cursorList)
  273.   repeat with i = 1 to counter
  274.     set currItem to getAt(cursorList, i)
  275.     if currItem <> 0 then
  276.       set CursorCastNum to getCursor(currItem)
  277.       set the cursor of sprite i to [CursorCastNum, CursorCastNum + 1]
  278.     end if
  279.   end repeat
  280. end
  281.  
  282. on UpdateCursors theSp, theCursor
  283.   global cursorList
  284.   setAt(cursorList, theSp, theCursor)
  285.   if theCursor = 0 then
  286.     set the cursor of sprite theSp to theCursor
  287.   else
  288.     set CursorCastNum to getCursor(theCursor)
  289.     set the cursor of sprite theSp to [CursorCastNum, CursorCastNum + 1]
  290.   end if
  291. end
  292.  
  293. on setEmptyCursor
  294.   set cursorList to getCursorList()
  295.   set counter to count(cursorList)
  296.   repeat with i = 1 to counter
  297.     set currItem to getAt(cursorList, i)
  298.     if currItem <> 0 then
  299.       set the cursor of sprite i to 0
  300.       setAt(cursorList, i, 0)
  301.     end if
  302.   end repeat
  303. end
  304.  
  305. on setCursorTool int
  306.   global CursorTool
  307.   set CursorTool to int
  308. end
  309.  
  310. on initCursorCastNum
  311.   global CursorCastNum
  312.   set CursorCastNum to "400,402,404,406"
  313. end
  314.  
  315. on getCursor cursorNum
  316.   global CursorCastNum
  317.   return integer(item cursorNum of CursorCastNum)
  318. end
  319.  
  320. on initCursorList list
  321.   global cursorList, NumOfUsers
  322.   if list = 1 then
  323.     set cursorList to [0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  324.   else
  325.     if list = 2 then
  326.       setEmptyCursor()
  327.       set cursorList to [0, 0, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  328.     else
  329.       if list = 3 then
  330.         setEmptyCursor()
  331.         set cursorList to [0, 0, 3, 3, 0, 0, 3, 3, 3, 0, 3, 3, 3, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  332.       end if
  333.     end if
  334.   end if
  335.   setDefaultCursor()
  336.   if (NumOfUsers = 0) or (field "complete" = EMPTY) then
  337.     UpdateCursors(4, 1)
  338.   end if
  339. end
  340.  
  341. on getCursorList
  342.   global cursorList
  343.   return cursorList
  344. end
  345.  
  346. on ___BTNS_HANDLERS___
  347. end
  348.  
  349. on switchButt spriteNum, castDown, macroName
  350.   set flag to 0
  351.   set SaveCast to the castNum of sprite spriteNum
  352.   set flag to swapCast(spriteNum, SaveCast, castDown)
  353.   repeat while the stillDown
  354.     set flag to swapCast(spriteNum, SaveCast, castDown)
  355.   end repeat
  356.   if flag = 1 then
  357.     sound stop 2
  358.     do(macroName)
  359.   end if
  360. end
  361.  
  362. on swapCast spriteNum, SaveCast, castDown
  363.   if rollOver(spriteNum) then
  364.     set the castNum of sprite spriteNum to the number of cast castDown
  365.     updateStage()
  366.     return 1
  367.   else
  368.     set the castNum of sprite spriteNum to the number of cast SaveCast
  369.     updateStage()
  370.     return 0
  371.   end if
  372. end
  373.  
  374. on DisableBtn btnName, btnSprite
  375.   set the castNum of sprite btnSprite to the number of cast (btnName & "_F")
  376. end
  377.  
  378. on EnableBtn btnName, btnSprite
  379.   set the castNum of sprite btnSprite to the number of cast btnName
  380. end
  381.  
  382. on setRollName theName
  383.   global RollName
  384.   set RollName to theName
  385. end
  386.  
  387. on getRollName
  388.   global RollName
  389.   return RollName
  390. end
  391.  
  392. on Set_NOTEPADSprite theSp
  393.   global NOTEPADSprite
  394.   set NOTEPADSprite to theSp
  395. end
  396.  
  397. on Get_NOTEPADSprite
  398.   global NOTEPADSprite
  399.   return NOTEPADSprite
  400. end
  401.  
  402. on Set_GLOSSARYSprite theSp
  403.   global GLOSSARYSprite
  404.   set GLOSSARYSprite to theSp
  405. end
  406.  
  407. on Get_GLOSSARYSprite
  408.   global GLOSSARYSprite
  409.   return GLOSSARYSprite
  410. end
  411.  
  412. on Set_SoundSprite theSp
  413.   global SoundSprite
  414.   set SoundSprite to theSp
  415. end
  416.  
  417. on get_SOUNDSprite
  418.   global SoundSprite
  419.   return SoundSprite
  420. end
  421.  
  422. on Set_HelpSprite theSp
  423.   global HelpSprite
  424.   set HelpSprite to theSp
  425. end
  426.  
  427. on get_HELPSprite
  428.   global HelpSprite
  429.   return HelpSprite
  430. end
  431.  
  432. on Set_NEXTSprite theSp
  433.   global NEXTSprite
  434.   set NEXTSprite to theSp
  435. end
  436.  
  437. on get_NEXTSprite
  438.   global NEXTSprite
  439.   return NEXTSprite
  440. end
  441.  
  442. on Set_BACKSprite theSp
  443.   global BACKSprite
  444.   set BACKSprite to theSp
  445. end
  446.  
  447. on get_BACKSprite
  448.   global BACKSprite
  449.   return BACKSprite
  450. end
  451.  
  452. on Set_NavigatorHL theSp
  453.   global NavigatorHL
  454.   set NavigatorHL to theSp
  455. end
  456.  
  457. on get_NavigatorHL
  458.   global NavigatorHL
  459.   return NavigatorHL
  460. end
  461.  
  462. on Set_IndexSprite theSp
  463.   global IndexSprite
  464.   set IndexSprite to theSp
  465. end
  466.  
  467. on get_IndexSprite
  468.   global IndexSprite
  469.   return IndexSprite
  470. end
  471.  
  472. on Set_TagWDSprite theSp
  473.   global TagWdSprite
  474.   set TagWdSprite to theSp
  475. end
  476.  
  477. on Get_TagWdSprite
  478.   global TagWdSprite
  479.   return TagWdSprite
  480. end
  481.  
  482. on Set_FindSprite theSp
  483.   global FindSprite
  484.   set FindSprite to theSp
  485. end
  486.  
  487. on get_FindSprite
  488.   global FindSprite
  489.   return FindSprite
  490. end
  491.  
  492. on Set_MainSprite theSp
  493.   global MainSprite
  494.   set MainSprite to theSp
  495. end
  496.  
  497. on get_MainSprite
  498.   global MainSprite
  499.   return MainSprite
  500. end
  501.  
  502. on Set_NEXT theSp
  503.   global next
  504.   set next to theSp
  505. end
  506.  
  507. on Get_NEXT
  508.   global next
  509.   return next
  510. end
  511.  
  512. on Set_PlayDub theMode
  513.   global PlayDub
  514.   set PlayDub to theMode
  515. end
  516.  
  517. on Get_PlayDub
  518.   global PlayDub
  519.   return PlayDub
  520. end
  521.  
  522. on Set_ScreenSubject theNum
  523.   global ScreenSubject
  524.   set ScreenSubject to theNum
  525. end
  526.  
  527. on Get_ScreenSubject
  528.   global ScreenSubject
  529.   return ScreenSubject
  530. end
  531.  
  532. on set_MarkSprite theNum
  533.   global MarkSprite
  534.   set MarkSprite to theNum
  535. end
  536.  
  537. on Get_MarkSprite
  538.   global MarkSprite
  539.   return MarkSprite
  540. end
  541.