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

  1. on initLesson
  2.   setRollName(EMPTY)
  3.   set the visible of sprite 48 to 0
  4.   Set_HelpSprite(45)
  5.   Set_SoundSprite(44)
  6.   Set_NOTEPADSprite(43)
  7.   Set_GLOSSARYSprite(42)
  8.   Set_NavigatorHL(5)
  9.   Set_MainSprite(6)
  10.   Set_IndexSprite(7)
  11.   Set_FindSprite(9)
  12.   Set_TagWDSprite(8)
  13.   repeat with i = 42 to 45
  14.     set the immediate of sprite i to 1
  15.     set the puppet of sprite i to 1
  16.   end repeat
  17.   set the puppet of sprite get_NavigatorHL() to 1
  18.   set the mouseDownScript to "CheckOpenWindow"
  19. end
  20.  
  21. on GoMain
  22.   go(1, "NC_MM010.GEO")
  23. end
  24.  
  25. on CheckForTagWd
  26.   global TagWD, IndexWD, FindWD, WordWD, Find2WD
  27.   if objectp(TagWD) or objectp(IndexWD) or objectp(FindWD) or objectp(Find2WD) or objectp(WordWD) then
  28.     set the cursor of sprite 48 to [400, 401]
  29.   end if
  30. end
  31.  
  32. on PlaySound theSnd
  33.   if Get_PlayDub() then
  34.     sound playFile 2, theSnd
  35.   end if
  36. end
  37.  
  38. on Get_PlayDub
  39.   global PlayDub
  40.   return PlayDub
  41. end
  42.  
  43. on GoFind
  44.   global FindWD, CDfilePath, PCDEL
  45.   if objectp(FindWD) then
  46.     forget(FindWD)
  47.   end if
  48.   set the cursor of sprite 48 to [400, 401]
  49.   set FindWD to window (CDfilePath & "WDS" & PCDEL & "NC_FIND.GEO")
  50.   set the rect of FindWD to rect(the stageLeft + 221, the stageTop + 4, the stageLeft + 541, the stageTop + 164)
  51.   set the titleVisible of FindWD to 0
  52.   set the modal of FindWD to 1
  53.   open(FindWD)
  54. end
  55.  
  56. on HideFINDWindow
  57.   global FindWD
  58.   if objectp(FindWD) then
  59.     forget(FindWD)
  60.   end if
  61. end
  62.  
  63. on closeFindWindow
  64.   global FindWD
  65.   if objectp(FindWD) then
  66.     forget(FindWD)
  67.   end if
  68.   set the cursor of sprite 48 to 0
  69.   tell the stage
  70.     continue()
  71.   end tell
  72. end
  73.  
  74. on OpenFind2WD theData
  75.   global Find2WD, CDfilePath, PCDEL
  76.   HideFINDWindow()
  77.   set Find2WD to window (CDfilePath & "WDS" & PCDEL & "NC_FIND2.GEO")
  78.   set the rect of Find2WD to rect(the stageLeft + 48, the stageTop + 4, the stageLeft + 541, the stageTop + 212)
  79.   set the titleVisible of Find2WD to 0
  80.   set the modal of Find2WD to 1
  81.   tell Find2WD
  82.     UpdateSelection(theData)
  83.   end tell
  84.   open(Find2WD)
  85. end
  86.  
  87. on CloseFind2Window
  88.   global Find2WD
  89.   if objectp(Find2WD) then
  90.     forget(Find2WD)
  91.   end if
  92.   set the cursor of sprite 48 to 0
  93.   tell the stage
  94.     continue()
  95.   end tell
  96. end
  97.  
  98. on GoIndex
  99.   global IndexWD, CDfilePath, PCDEL
  100.   if objectp(IndexWD) then
  101.     forget(IndexWD)
  102.   end if
  103.   set the cursor of sprite 48 to [400, 401]
  104.   set IndexWD to window (CDfilePath & "WDS" & PCDEL & "NC_INDEX.GEO")
  105.   set the rect of IndexWD to rect(the stageLeft + 220, the stageTop + 4, the stageLeft + 541, the stageTop + 276)
  106.   set the titleVisible of IndexWD to 0
  107.   set the modal of IndexWD to 1
  108.   tell IndexWD
  109.     RonenInit()
  110.   end tell
  111.   open(IndexWD)
  112. end
  113.  
  114. on OpenWordWD theData
  115.   global WordWD, CDfilePath, PCDEL
  116.   HIdeIndexWindow()
  117.   set WordWD to window (CDfilePath & "WDS" & PCDEL & "NC_WORD.GEO")
  118.   set the rect of WordWD to rect(the stageLeft + 48, the stageTop + 4, the stageLeft + 541, the stageTop + 212)
  119.   set the titleVisible of WordWD to 0
  120.   set the modal of WordWD to 1
  121.   tell WordWD
  122.     UpdateSelection(theData)
  123.   end tell
  124.   open(WordWD)
  125. end
  126.  
  127. on CloseWordWindow
  128.   global WordWD
  129.   if objectp(WordWD) then
  130.     forget(WordWD)
  131.   end if
  132.   set the cursor of sprite 48 to 0
  133.   tell the stage
  134.     continue()
  135.   end tell
  136. end
  137.  
  138. on HIdeIndexWindow
  139.   global IndexWD
  140.   if objectp(IndexWD) then
  141.     forget(IndexWD)
  142.   end if
  143. end
  144.  
  145. on CloseIndexWindow
  146.   global IndexWD
  147.   if objectp(IndexWD) then
  148.     forget(IndexWD)
  149.   end if
  150.   set the cursor of sprite 48 to 0
  151.   tell the stage
  152.     continue()
  153.   end tell
  154. end
  155.  
  156. on GoIndexMovie thekind
  157.   if thekind = "tool" then
  158.     go("Init" & Get_ScreenSubject(), Get_IndexMovie())
  159.   else
  160.     go(1, Get_IndexMovie())
  161.   end if
  162. end
  163.  
  164. on set_IndexMovie theMoov
  165.   global IndexMovie
  166.   set IndexMovie to theMoov
  167. end
  168.  
  169. on Get_IndexMovie theMoov
  170.   global IndexMovie
  171.   return IndexMovie
  172. end
  173.  
  174. on GoTags
  175.   global TagWD, TAGS_DATA, TAGS_TITLES, TAGS_LIST, CDfilePath, PCDEL
  176.   if objectp(TagWD) then
  177.     forget(TagWD)
  178.   end if
  179.   set the cursor of sprite 48 to [400, 401]
  180.   set TagWD to window (CDfilePath & "WDS" & PCDEL & "NC_TAGS.GEO")
  181.   set the rect of TagWD to rect(the stageLeft + 274, the stageTop + 4, the stageLeft + 539, the stageTop + 249)
  182.   set the titleVisible of TagWD to 0
  183.   set the modal of TagWD to 1
  184.   tell TagWD
  185.     UpdateFields()
  186.     PlaceMySlider()
  187.     init()
  188.   end tell
  189.   open(TagWD)
  190. end
  191.  
  192. on OpenRenameWD theLine
  193.   global RenameWD, CDfilePath, PCDEL
  194.   set RenameWD to window (CDfilePath & "WDS" & PCDEL & "NC_RNAME.GEO")
  195.   set the rect of RenameWD to rect(the stageLeft + 286, the stageTop + 87, the stageLeft + 526, the stageTop + 199)
  196.   set the titleVisible of RenameWD to 0
  197.   set the modal of RenameWD to 1
  198.   tell RenameWD
  199.     UpdateLine(theLine)
  200.   end tell
  201.   open(RenameWD)
  202. end
  203.  
  204. on UpdateRenameWD theText
  205.   global TagWD
  206.   tell TagWD
  207.     UpdateRename(theText)
  208.   end tell
  209.   CloseRenameWD()
  210. end
  211.  
  212. on CloseRenameWD
  213.   global RenameWD
  214.   if objectp(RenameWD) then
  215.     forget(RenameWD)
  216.   end if
  217. end
  218.  
  219. on OpenSureWD
  220.   global SureWD, CDfilePath, PCDEL
  221.   set SureWD to window (CDfilePath & "WDS" & PCDEL & "NC_SURE.GEO")
  222.   set the rect of SureWD to rect(the stageLeft + 286, the stageTop + 87, the stageLeft + 526, the stageTop + 199)
  223.   set the titleVisible of SureWD to 0
  224.   set the modal of SureWD to 1
  225.   open(SureWD)
  226. end
  227.  
  228. on CloseSureWD
  229.   global SureWD
  230.   if objectp(SureWD) then
  231.     forget(SureWD)
  232.   end if
  233. end
  234.  
  235. on ClearAllTags
  236.   global CardTitles, TAGS_DATA, TAGS_TITLES, TAGS_LIST, TagWD
  237.   CloseSureWD()
  238.   set TAGS_LIST to []
  239.   set TAGS_TITLES to EMPTY
  240.   set TAGS_DATA to EMPTY
  241.   tell TagWD
  242.     UpdateFields()
  243.     PlaceMySlider()
  244.     init()
  245.   end tell
  246.   updateStage()
  247. end
  248.  
  249. on CloseTagWindow
  250.   global TagWD
  251.   if objectp(TagWD) then
  252.     forget(TagWD)
  253.   end if
  254.   set the cursor of sprite 48 to 0
  255.   tell the stage
  256.     continue()
  257.   end tell
  258. end
  259.  
  260. on GoTagMovie
  261.   go("Init" & Get_ScreenSubject(), Get_TagMovie())
  262. end
  263.  
  264. on Set_TagMovie theMovie
  265.   global TagMovie
  266.   set TagMovie to theMovie
  267. end
  268.  
  269. on Get_TagMovie
  270.   global TagMovie
  271.   return TagMovie
  272. end
  273.  
  274. on MarkScreen toMark
  275. end
  276.  
  277. on UpdateMark
  278.   global TAGS_LIST
  279.   set movieName to the movieName
  280.   if getOne(TAGS_LIST, movieName) then
  281.   end if
  282. end
  283.  
  284. on SaveSeenScreens
  285. end
  286.  
  287. on HandleSound
  288.   global volumeWindow, CDfilePath, PCDEL
  289.   if objectp(volumeWindow) then
  290.     forget(volumeWindow)
  291.   end if
  292.   EnableBtn("SOUND", get_SOUNDSprite())
  293.   set volumeWindow to window (CDfilePath & "WDS" & PCDEL & "NC_VOL.GEO")
  294.   set the rect of volumeWindow to rect(the stageLeft + 445, the stageTop + 63, the stageLeft + 574, the stageTop + 126)
  295.   set the titleVisible of volumeWindow to 0
  296.   tell volumeWindow
  297.     RestoreSoundStatus()
  298.   end tell
  299.   open(volumeWindow)
  300. end
  301.  
  302. on handleQuit
  303.   global QuitWindow, CDfilePath, PCDEL
  304.   cursor(4)
  305.   if objectp(QuitWindow) then
  306.     forget(QuitWindow)
  307.   end if
  308.   set the cursor of sprite 48 to [400, 401]
  309.   set QuitWindow to window (CDfilePath & "WDS" & PCDEL & "NC_QUIT.GEO")
  310.   set the rect of QuitWindow to rect(the stageLeft + 162, the stageTop + 122, the stageLeft + 478, the stageTop + 358)
  311.   set the titleVisible of QuitWindow to 0
  312.   set the modal of QuitWindow to 1
  313.   open(QuitWindow)
  314. end
  315.  
  316. on handleHELP
  317.   EnableBtn("HELP", get_HELPSprite())
  318.   openHelpWd()
  319. end
  320.  
  321. on openHelpWd
  322.   global helpWD, lastFrame, CDfilePath, PCDEL
  323.   set the cursor of sprite 48 to [400, 401]
  324.   set helpWD to window (CDfilePath & "WDS" & PCDEL & "NC_HLP.GEO")
  325.   set the rect of helpWD to rect(the stageLeft + 62, the stageTop + 28, the stageLeft + 586, the stageTop + 444)
  326.   set the titleVisible of helpWD to 0
  327.   set the modal of helpWD to 1
  328.   open(helpWD)
  329.   set lastFrame to the frame
  330.   go("helpLoop")
  331. end
  332.  
  333. on closeHelpWd
  334.   global helpWD, lastFrame
  335.   set the cursor of sprite 48 to 0
  336.   forget(helpWD)
  337.   go(lastFrame)
  338. end
  339.  
  340. on HandleGLOSSARY
  341.   global DicWindow
  342.   EnableBtn("GLOSSARY", Get_GLOSSARYSprite())
  343.   set the cursor of sprite 48 to [400, 401]
  344.   open(DicWindow)
  345.   tell the stage
  346.     pause()
  347.   end tell
  348.   tell DicWindow
  349.     go(2)
  350.   end tell
  351. end
  352.  
  353. on closeGLOSSARYwindow
  354.   set the cursor of sprite 48 to 0
  355.   continue()
  356. end
  357.  
  358. on closeNotePadWindow
  359.   set the cursor of sprite 48 to 0
  360.   continue()
  361. end
  362.  
  363. on HandleNOTEPAD
  364.   global NoteBookWindow, CDfilePath, PCDEL
  365.   EnableBtn("NOTEPAD", Get_NOTEPADSprite())
  366.   set the cursor of sprite 48 to [400, 401]
  367.   if objectp(NoteBookWindow) then
  368.     forget(NoteBookWindow)
  369.   end if
  370.   set NoteBookWindow to window (CDfilePath & "WDS" & PCDEL & "NC_PAD.GEO")
  371.   set the rect of NoteBookWindow to rect(the stageLeft + 7, the stageTop + 247, the stageLeft + 209, the stageTop + 419)
  372.   set NBRect to the rect of NoteBookWindow
  373.   set x1 to getAt(NBRect, 1)
  374.   set y1 to getAt(NBRect, 2)
  375.   set x2 to getAt(NBRect, 3)
  376.   set y2 to getAt(NBRect, 4)
  377.   set the modal of NoteBookWindow to 1
  378.   set the windowType of NoteBookWindow to 2
  379.   set the titleVisible of window "NoteBook" to 0
  380.   open(NoteBookWindow)
  381. end
  382.  
  383. on createNoteBook
  384.   global NBPrintWindow, CDfilePath, PCDEL
  385.   if objectp(NBPrintWindow) then
  386.     forget(NBPrintWindow)
  387.   end if
  388.   set NBPrintWindow to window (CDfilePath & "WDS" & PCDEL & "NC_PRINT.GEO")
  389.   set StageRect to the rect of the stage
  390.   set x1 to getAt(StageRect, 1)
  391.   set y1 to getAt(StageRect, 2)
  392.   set x2 to getAt(StageRect, 3)
  393.   set y2 to getAt(StageRect, 4)
  394.   set the rect of NBPrintWindow to rect(x1, y1, x1 + 640, y1 + 480)
  395.   set NBRect to the rect of NBPrintWindow
  396.   set the fileName of NBPrintWindow to "Auto Page SetUp"
  397.   set the windowType of NBPrintWindow to 2
  398.   open(NBPrintWindow)
  399. end
  400.  
  401. on closePrintWindow
  402. end
  403.  
  404. on closeQuitWindow
  405.   global QuitWindow
  406.   set the visible of sprite 48 to 0
  407.   set the cursor of sprite 48 to 0
  408.   forget(QuitWindow)
  409.   continue()
  410. end
  411.  
  412. on leaveApplication
  413.   global QuitWindow, UsersData, TheBackWindow
  414.   forget(QuitWindow)
  415.   if the machineType <> 256 then
  416.   end if
  417.   quit()
  418. end
  419.  
  420. on CheckRollOver
  421.   if rollOver(get_MainSprite()) then
  422.     set the castNum of sprite get_NavigatorHL() to the number of cast "main-HL"
  423.     set Hloc to the locH of sprite get_MainSprite()
  424.     set Vloc to the locV of sprite get_MainSprite()
  425.   else
  426.     if rollOver(get_IndexSprite()) then
  427.       set the castNum of sprite get_NavigatorHL() to the number of cast "Index-HL"
  428.       set Hloc to the locH of sprite get_IndexSprite()
  429.       set Vloc to the locV of sprite get_IndexSprite()
  430.     else
  431.       if rollOver(get_FindSprite()) then
  432.         set the castNum of sprite get_NavigatorHL() to the number of cast "Find-HL"
  433.         set Hloc to the locH of sprite get_FindSprite()
  434.         set Vloc to the locV of sprite get_FindSprite()
  435.       else
  436.         if rollOver(Get_TagWdSprite()) then
  437.           set the castNum of sprite get_NavigatorHL() to the number of cast "TagWD-HL"
  438.           set Hloc to the locH of sprite Get_TagWdSprite()
  439.           set Vloc to the locV of sprite Get_TagWdSprite()
  440.         else
  441.           set Hloc to EMPTY
  442.         end if
  443.       end if
  444.     end if
  445.   end if
  446.   if Hloc <> EMPTY then
  447.     set the locH of sprite get_NavigatorHL() to Hloc
  448.     set the locV of sprite get_NavigatorHL() to Vloc
  449.     set the visible of sprite get_NavigatorHL() to 1
  450.     updateStage()
  451.   else
  452.     set the visible of sprite get_NavigatorHL() to 0
  453.     updateStage()
  454.   end if
  455. end
  456.  
  457. on keyDown
  458.   if the commandDown and ((the key = "q") or (the key = ".")) then
  459.     handleQuit()
  460.   end if
  461. end
  462.  
  463. on CheckOpenWindow
  464.   global volumeWindow
  465.   if objectp(volumeWindow) then
  466.     forget(volumeWindow)
  467.     continue()
  468.   end if
  469. end
  470.  
  471. on setDefaultCursor
  472.   set cursorList to getCursorList()
  473.   set counter to count(cursorList)
  474.   repeat with i = 1 to counter
  475.     set currItem to getAt(cursorList, i)
  476.     if currItem <> 0 then
  477.       set CursorCastNum to getCursor(currItem)
  478.       set the cursor of sprite i to [CursorCastNum, CursorCastNum + 1]
  479.     end if
  480.   end repeat
  481. end
  482.  
  483. on setEmptyCursor
  484.   set cursorList to getCursorList()
  485.   set counter to count(cursorList)
  486.   repeat with i = 1 to counter
  487.     set currItem to getAt(cursorList, i)
  488.     if currItem <> 0 then
  489.       set the cursor of sprite i to 0
  490.       setAt(cursorList, i, 0)
  491.     end if
  492.   end repeat
  493. end
  494.  
  495. on setCursorTool int
  496.   global CursorTool
  497.   set CursorTool to int
  498. end
  499.  
  500. on initCursorCastNum
  501.   global CursorCastNum
  502.   set CursorCastNum to "400,402,404,406"
  503. end
  504.  
  505. on getCursor cursorNum
  506.   global CursorCastNum
  507.   return integer(item cursorNum of CursorCastNum)
  508. end
  509.  
  510. on initCursorList list
  511.   global cursorList
  512.   if list = 1 then
  513.     set cursorList to [2, 0, 0, 0, 0, 4, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3]
  514.   end if
  515.   setDefaultCursor()
  516. end
  517.  
  518. on getCursorList
  519.   global cursorList
  520.   return cursorList
  521. end
  522.  
  523. on ___BTNS_HANDLERS___
  524. end
  525.  
  526. on switchButt spriteNum, castDown, macroName
  527.   if getRollName() <> EMPTY then
  528.     set spNum to EMPTY
  529.     do("put get_" & getRollName() & "Sprite() into spNum")
  530.     set the castNum of sprite spNum to the number of cast getRollName()
  531.     setRollName(EMPTY)
  532.   end if
  533.   set flag to 0
  534.   set SaveCast to the castNum of sprite spriteNum
  535.   set flag to swapCast(spriteNum, SaveCast, castDown)
  536.   repeat while the stillDown
  537.     set flag to swapCast(spriteNum, SaveCast, castDown)
  538.   end repeat
  539.   if flag = 1 then
  540.     sound stop 1
  541.     do(macroName)
  542.   end if
  543. end
  544.  
  545. on swapCast spriteNum, SaveCast, castDown
  546.   if rollOver(spriteNum) then
  547.     set the castNum of sprite spriteNum to the number of cast castDown
  548.     updateStage()
  549.     return 1
  550.   else
  551.     set the castNum of sprite spriteNum to the number of cast SaveCast
  552.     updateStage()
  553.     return 0
  554.   end if
  555. end
  556.  
  557. on DisableBtn btnName, btnSprite
  558.   set the castNum of sprite btnSprite to the number of cast (btnName & "_F")
  559. end
  560.  
  561. on EnableBtn btnName, btnSprite
  562.   set the castNum of sprite btnSprite to the number of cast btnName
  563. end
  564.  
  565. on setRollName theName
  566.   global RollName
  567.   set RollName to theName
  568. end
  569.  
  570. on getRollName
  571.   global RollName
  572.   return RollName
  573. end
  574.  
  575. on Set_NOTEPADSprite theSp
  576.   global NOTEPADSprite
  577.   set NOTEPADSprite to theSp
  578. end
  579.  
  580. on Get_NOTEPADSprite
  581.   global NOTEPADSprite
  582.   return NOTEPADSprite
  583. end
  584.  
  585. on Set_GLOSSARYSprite theSp
  586.   global GLOSSARYSprite
  587.   set GLOSSARYSprite to theSp
  588. end
  589.  
  590. on Get_GLOSSARYSprite
  591.   global GLOSSARYSprite
  592.   return GLOSSARYSprite
  593. end
  594.  
  595. on Set_SoundSprite theSp
  596.   global SoundSprite
  597.   set SoundSprite to theSp
  598. end
  599.  
  600. on get_SOUNDSprite
  601.   global SoundSprite
  602.   return SoundSprite
  603. end
  604.  
  605. on Set_HelpSprite theSp
  606.   global HelpSprite
  607.   set HelpSprite to theSp
  608. end
  609.  
  610. on get_HELPSprite
  611.   global HelpSprite
  612.   return HelpSprite
  613. end
  614.  
  615. on Set_NavigatorHL theSp
  616.   global NavigatorHL
  617.   set NavigatorHL to theSp
  618. end
  619.  
  620. on get_NavigatorHL
  621.   global NavigatorHL
  622.   return NavigatorHL
  623. end
  624.  
  625. on Set_IndexSprite theSp
  626.   global IndexSprite
  627.   set IndexSprite to theSp
  628. end
  629.  
  630. on get_IndexSprite
  631.   global IndexSprite
  632.   return IndexSprite
  633. end
  634.  
  635. on Set_TagWDSprite theSp
  636.   global TagWdSprite
  637.   set TagWdSprite to theSp
  638. end
  639.  
  640. on Get_TagWdSprite
  641.   global TagWdSprite
  642.   return TagWdSprite
  643. end
  644.  
  645. on Set_FindSprite theSp
  646.   global FindSprite
  647.   set FindSprite to theSp
  648. end
  649.  
  650. on get_FindSprite
  651.   global FindSprite
  652.   return FindSprite
  653. end
  654.  
  655. on Set_MainSprite theSp
  656.   global MainSprite
  657.   set MainSprite to theSp
  658. end
  659.  
  660. on get_MainSprite
  661.   global MainSprite
  662.   return MainSprite
  663. end
  664.