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

  1. on startMovie
  2.   global WasIN_MM040
  3.   set WasIN_MM040 to 1
  4.   initLesson()
  5.   cursor([402, 403])
  6.   Set_WindowSp(0)
  7.   Set_ScreenSubject("00")
  8.   Set_CurrentTool("00")
  9. end
  10.  
  11. on stopMovie
  12.   sound stop 2
  13.   setEmptyCursor()
  14. end
  15.  
  16. on TheinitCursor
  17.   initCursorCastNum()
  18.   initCursorList(1)
  19.   set CursorCastNum to getCursor(2)
  20.   cursor([CursorCastNum, CursorCastNum + 1])
  21. end
  22.  
  23. on InitMenu
  24.   set_NumOfAnswers(8)
  25.   Set_AnsSprite(10)
  26.   set_menuSprite(21)
  27.   Set_PressedLast(EMPTY)
  28.   InitBtns()
  29.   setRollName(EMPTY)
  30.   Set_ToolAnsNumbers(field "ToolAnsNumbers")
  31. end
  32.  
  33. on LoadMenu
  34.   set theMenu to get_PressedLast()
  35.   set startSp to get_menuSprite()
  36.   if theMenu = 1 then
  37.     repeat with i = startSp to startSp + 5
  38.       UpdateCursors(i, 4)
  39.     end repeat
  40.     repeat with i = startSp + 6 to startSp + 7
  41.       UpdateCursors(i, 3)
  42.     end repeat
  43.   else
  44.     if theMenu = 2 then
  45.       repeat with i = startSp to startSp + 5
  46.         UpdateCursors(i, 4)
  47.       end repeat
  48.       repeat with i = startSp + 6 to startSp + 7
  49.         UpdateCursors(i, 3)
  50.       end repeat
  51.     else
  52.       if theMenu = 3 then
  53.         repeat with i = startSp to startSp + 3
  54.           UpdateCursors(i, 4)
  55.         end repeat
  56.         repeat with i = startSp + 4 to startSp + 5
  57.           UpdateCursors(i, 3)
  58.         end repeat
  59.       else
  60.         if theMenu = 4 then
  61.           repeat with i = startSp to startSp + 3
  62.             UpdateCursors(i, 4)
  63.           end repeat
  64.           repeat with i = startSp + 4 to startSp + 5
  65.             UpdateCursors(i, 3)
  66.           end repeat
  67.         else
  68.           if theMenu = 5 then
  69.             repeat with i = startSp to startSp + 1
  70.               UpdateCursors(i, 4)
  71.             end repeat
  72.             repeat with i = startSp + 2 to startSp + 3
  73.               UpdateCursors(i, 3)
  74.             end repeat
  75.           else
  76.             if theMenu = 6 then
  77.               repeat with i = startSp to startSp + 7
  78.                 UpdateCursors(i, 4)
  79.               end repeat
  80.               repeat with i = startSp + 8 to startSp + 9
  81.                 UpdateCursors(i, 3)
  82.               end repeat
  83.             else
  84.               if theMenu = 7 then
  85.                 repeat with i = startSp to startSp + 1
  86.                   UpdateCursors(i, 4)
  87.                 end repeat
  88.                 repeat with i = startSp + 2 to startSp + 3
  89.                   UpdateCursors(i, 3)
  90.                 end repeat
  91.               else
  92.                 if theMenu = 8 then
  93.                   repeat with i = startSp to startSp + 1
  94.                     UpdateCursors(i, 4)
  95.                   end repeat
  96.                   repeat with i = startSp + 2 to startSp + 2
  97.                     UpdateCursors(i, 3)
  98.                   end repeat
  99.                 end if
  100.               end if
  101.             end if
  102.           end if
  103.         end if
  104.       end if
  105.     end if
  106.   end if
  107.   set NumOfItems to line theMenu of Get_ToolAnsNumbers()
  108.   repeat with i = 21 to NumOfItems + 21
  109.     puppetSprite(i, 1)
  110.   end repeat
  111. end
  112.  
  113. on menuItem theItem
  114.   global ReturnToMenu
  115.   set theTool to get_PressedLast()
  116.   set startSp to get_menuSprite()
  117.   set the castNum of sprite (startSp + theItem - 1) to the number of cast (theTool & "-DOWN" & theItem)
  118.   updateStage()
  119.   set theGO to line theItem of field ("pointers-T" & theTool)
  120.   if item 1 of theGO = "go" then
  121.     set ReturnToMenu to "SECTION"
  122.     Set_CurrentTool(item 2 of theGO)
  123.     set movieName to item 3 of theGO
  124.     set toolNum to Get_CurrentTool()
  125.     set theVec to EMPTY
  126.     do("put" && "get_ScreensTool" & toolNum & "()" && "into theVec")
  127.     Set_CurrentSnakeScreens(theVec)
  128.     do("put" && "Get_WasInPathTool" & toolNum & "()" && "into theVec")
  129.     repeat with i = 1 to the number of items in theVec
  130.       put value(item i of theVec) into item i of theVec
  131.     end repeat
  132.     Set_SeenINPath(theVec)
  133.     go("Init" & Get_ScreenSubject(), movieName)
  134.   else
  135.     if item 1 of theGO = "tip" then
  136.       Set_NumOfTips(value(item 2 of theGO))
  137.       Set_WDmode("TIP")
  138.       DisposeMenu()
  139.       Set_WindowSp(1)
  140.       Set_pageNum(1)
  141.       LoadTip()
  142.       go("TIP")
  143.     else
  144.       if item 1 of theGO = "did" then
  145.         Set_NumOfDids(value(item 2 of theGO))
  146.         Set_WDmode("DID")
  147.         DisposeMenu()
  148.         Set_WindowSp(1)
  149.         Set_pageNum(1)
  150.         LoadDID()
  151.         go("DID")
  152.       end if
  153.     end if
  154.   end if
  155. end
  156.  
  157. on DisposeMenu
  158.   set the castNum of sprite (Get_AnsSprite() + get_PressedLast() - 1) to the number of cast ("ANS" & get_PressedLast())
  159.   set theMenu to get_PressedLast()
  160.   set NumOfItems to line theMenu of Get_ToolAnsNumbers()
  161.   repeat with i = 21 to NumOfItems + 21
  162.     UpdateCursors(i, 0)
  163.     puppetSprite(i, 0)
  164.   end repeat
  165. end
  166.  
  167. on InitBtns
  168.   set numOfBtn to Get_NumOfAnswers()
  169.   repeat with i = 1 to numOfBtn
  170.     set the puppet of sprite (Get_AnsSprite() + i - 1) to 1
  171.   end repeat
  172. end
  173.  
  174. on checkScreenStatus
  175.   CheckRollOver()
  176.   go(the frame)
  177. end
  178.  
  179. on PressBtn theBtn
  180.   if get_PressedLast() <> EMPTY then
  181.     DisposeMenu()
  182.   end if
  183.   Set_PressedLast(theBtn)
  184.   switchButt(Get_AnsSprite() + theBtn - 1, "down" & theBtn, "HandleBtn" && theBtn)
  185. end
  186.  
  187. on HandleBtn theBtn
  188.   if theBtn = 1 then
  189.     Set_CurrentTool("01")
  190.   else
  191.     if theBtn = 2 then
  192.       Set_CurrentTool("02")
  193.     else
  194.       if theBtn = 3 then
  195.         Set_CurrentTool("06")
  196.       else
  197.         if theBtn = 4 then
  198.           Set_CurrentTool("03")
  199.         else
  200.           if theBtn = 5 then
  201.             Set_CurrentTool("04")
  202.           else
  203.             if theBtn = 6 then
  204.               Set_CurrentTool("05")
  205.             else
  206.               if theBtn = 7 then
  207.                 Set_CurrentTool("07")
  208.               else
  209.                 if theBtn = 8 then
  210.                   Set_CurrentTool("08")
  211.                 end if
  212.               end if
  213.             end if
  214.           end if
  215.         end if
  216.       end if
  217.     end if
  218.   end if
  219.   go("menu" & theBtn)
  220. end
  221.  
  222. on LoadTip
  223.   set the castNum of sprite 34 to the number of cast (get_PressedLast() & "_tip" & get_PageNum())
  224.   if get_PageNum() < Get_NumOfTips() then
  225.     set the castNum of sprite 36 to the number of cast "NEXT"
  226.     UpdateCursors(36, 3)
  227.   else
  228.     set the castNum of sprite 36 to the number of cast "NEXT_F"
  229.     UpdateCursors(36, 1)
  230.   end if
  231.   if get_PageNum() > 1 then
  232.     set the castNum of sprite 35 to the number of cast "BACK"
  233.     UpdateCursors(35, 3)
  234.   else
  235.     set the castNum of sprite 35 to the number of cast "BACK_F"
  236.     UpdateCursors(35, 1)
  237.   end if
  238. end
  239.  
  240. on LoadDID
  241.   set the castNum of sprite 34 to the number of cast (get_PressedLast() & "_did" & get_PageNum())
  242.   if get_PageNum() < Get_NumOfDIDs() then
  243.     set the castNum of sprite 36 to the number of cast "NEXT"
  244.     UpdateCursors(36, 3)
  245.   else
  246.     set the castNum of sprite 36 to the number of cast "NEXT_F"
  247.     UpdateCursors(36, 1)
  248.   end if
  249.   if get_PageNum() > 1 then
  250.     set the castNum of sprite 35 to the number of cast "BACK"
  251.     UpdateCursors(35, 3)
  252.   else
  253.     set the castNum of sprite 35 to the number of cast "BACK_F"
  254.     UpdateCursors(35, 1)
  255.   end if
  256. end
  257.  
  258. on handleNextpage
  259.   Set_pageNum(get_PageNum() + 1)
  260.   if get_WDmode() = "TIP" then
  261.     LoadTip()
  262.   else
  263.     LoadDID()
  264.   end if
  265.   updateStage()
  266. end
  267.  
  268. on handleBackpage
  269.   Set_pageNum(get_PageNum() - 1)
  270.   if get_WDmode() = "TIP" then
  271.     LoadTip()
  272.   else
  273.     LoadDID()
  274.   end if
  275.   updateStage()
  276. end
  277.  
  278. on InitDID
  279.   initCursorList(2)
  280.   LoadDID()
  281. end
  282.  
  283. on INITTIP
  284.   initCursorList(2)
  285.   LoadTip()
  286. end
  287.  
  288. on handleExit
  289.   set the puppet of sprite 33 to 0
  290.   Set_WindowSp(0)
  291.   repeat with i = 37 to 40
  292.     UpdateCursors(i, 0)
  293.   end repeat
  294.   UpdateCursors(32, 0)
  295.   UpdateCursors(33, 0)
  296.   initCursorList(1)
  297.   go("init")
  298. end
  299.  
  300. on Set_ToolAnsNumbers theNum
  301.   global ToolAnsNumbers
  302.   set ToolAnsNumbers to theNum
  303. end
  304.  
  305. on Get_ToolAnsNumbers theNum
  306.   global ToolAnsNumbers
  307.   return ToolAnsNumbers
  308. end
  309.  
  310. on set_menuSprite theNum
  311.   global menuSprite
  312.   set menuSprite to theNum
  313. end
  314.  
  315. on get_menuSprite theNum
  316.   global menuSprite
  317.   return menuSprite
  318. end
  319.  
  320. on Set_NumOfTips theNum
  321.   global NumOfTips
  322.   set NumOfTips to theNum
  323. end
  324.  
  325. on Get_NumOfTips theNum
  326.   global NumOfTips
  327.   return NumOfTips
  328. end
  329.  
  330. on Set_NumOfDids theNum
  331.   global NumOfDIDs
  332.   set NumOfDIDs to theNum
  333. end
  334.  
  335. on Get_NumOfDIDs theNum
  336.   global NumOfDIDs
  337.   return NumOfDIDs
  338. end
  339.  
  340. on Set_pageNum theNum
  341.   global PageNum
  342.   set PageNum to theNum
  343. end
  344.  
  345. on get_PageNum theNum
  346.   global PageNum
  347.   return PageNum
  348. end
  349.  
  350. on Set_WDmode theNum
  351.   global WDmode
  352.   set WDmode to theNum
  353. end
  354.  
  355. on get_WDmode theNum
  356.   global WDmode
  357.   return WDmode
  358. end
  359.  
  360. on Set_CDcounter theNum
  361.   global CDcounter
  362.   set CDcounter to theNum
  363. end
  364.  
  365. on Add_CDcounter theNum
  366.   global CDcounter
  367.   set CDcounter to theNum
  368. end
  369.  
  370. on Get_CDcounter
  371.   global CDcounter
  372.   return CDcounter
  373. end
  374.  
  375. on Set_AnsSprite theNum
  376.   global AnsSprite
  377.   set AnsSprite to theNum
  378. end
  379.  
  380. on Get_AnsSprite
  381.   global AnsSprite
  382.   return AnsSprite
  383. end
  384.  
  385. on set_NumOfAnswers theNum
  386.   global NumOfAnswers
  387.   set NumOfAnswers to theNum
  388. end
  389.  
  390. on Get_NumOfAnswers
  391.   global NumOfAnswers
  392.   return NumOfAnswers
  393. end
  394.  
  395. on Set_PressedLast theNum
  396.   global PressedLast
  397.   set PressedLast to theNum
  398. end
  399.  
  400. on get_PressedLast
  401.   global PressedLast
  402.   return PressedLast
  403. end
  404.  
  405. on Set_ScreenSubject theNum
  406.   global ScreenSubject
  407.   set ScreenSubject to theNum
  408. end
  409.  
  410. on Get_ScreenSubject
  411.   global ScreenSubject
  412.   return ScreenSubject
  413. end
  414.  
  415. on Set_ScreensTool01 theMode
  416.   global ScreensTool01
  417.   set ScreensTool01 to theMode
  418. end
  419.  
  420. on Get_ScreensTool01
  421.   global ScreensTool01
  422.   return ScreensTool01
  423. end
  424.  
  425. on Set_ScreensTool02 theMode
  426.   global ScreensTool02
  427.   set ScreensTool02 to theMode
  428. end
  429.  
  430. on Get_ScreensTool02
  431.   global ScreensTool02
  432.   return ScreensTool02
  433. end
  434.  
  435. on Set_ScreensTool03 theMode
  436.   global ScreensTool03
  437.   set ScreensTool03 to theMode
  438. end
  439.  
  440. on Get_ScreensTool03
  441.   global ScreensTool03
  442.   return ScreensTool03
  443. end
  444.  
  445. on Set_ScreensTool04 theMode
  446.   global ScreensTool04
  447.   set ScreensTool04 to theMode
  448. end
  449.  
  450. on Get_ScreensTool04
  451.   global ScreensTool04
  452.   return ScreensTool04
  453. end
  454.  
  455. on Set_ScreensTool05 theMode
  456.   global ScreensTool05
  457.   set ScreensTool05 to theMode
  458. end
  459.  
  460. on Get_ScreensTool05
  461.   global ScreensTool05
  462.   return ScreensTool05
  463. end
  464.  
  465. on Set_ScreensTool06 theMode
  466.   global ScreensTool06
  467.   set ScreensTool06 to theMode
  468. end
  469.  
  470. on Get_ScreensTool06
  471.   global ScreensTool06
  472.   return ScreensTool06
  473. end
  474.  
  475. on Set_ScreensTool07 theMode
  476.   global ScreensTool07
  477.   set ScreensTool07 to theMode
  478. end
  479.  
  480. on Get_ScreensTool07
  481.   global ScreensTool07
  482.   return ScreensTool07
  483. end
  484.  
  485. on Set_ScreensTool08 theMode
  486.   global ScreensTool08
  487.   set ScreensTool08 to theMode
  488. end
  489.  
  490. on Get_ScreensTool08
  491.   global ScreensTool08
  492.   return ScreensTool08
  493. end
  494.  
  495. on Set_ScreensTool09 theMode
  496.   global ScreensTool09
  497.   set ScreensTool09 to theMode
  498. end
  499.  
  500. on Get_ScreensTool09
  501.   global ScreensTool09
  502.   return ScreensTool09
  503. end
  504.  
  505. on Set_ScreensTool10 theMode
  506.   global ScreensTool10
  507.   set ScreensTool10 to theMode
  508. end
  509.  
  510. on Get_ScreensTool10
  511.   global ScreensTool10
  512.   return ScreensTool10
  513. end
  514.  
  515. on Set_ScreensTool11 theMode
  516.   global ScreensTool11
  517.   set ScreensTool11 to theMode
  518. end
  519.  
  520. on Get_ScreensTool11
  521.   global ScreensTool11
  522.   return ScreensTool11
  523. end
  524.  
  525. on Set_ScreensTool12 theMode
  526.   global ScreensTool12
  527.   set ScreensTool12 to theMode
  528. end
  529.  
  530. on Get_ScreensTool12
  531.   global ScreensTool12
  532.   return ScreensTool12
  533. end
  534.  
  535. on Set_ScreensTool13 theMode
  536.   global ScreensTool13
  537.   set ScreensTool13 to theMode
  538. end
  539.  
  540. on Get_ScreensTool13
  541.   global ScreensTool13
  542.   return ScreensTool13
  543. end
  544.  
  545. on Set_WasInPathTool01 theMode
  546.   global WasInPathTool01
  547.   set WasInPathTool01 to theMode
  548. end
  549.  
  550. on Get_WasInPathTool01
  551.   global WasInPathTool01
  552.   return WasInPathTool01
  553. end
  554.  
  555. on Set_WasInPathTool02 theMode
  556.   global WasInPathTool02
  557.   set WasInPathTool02 to theMode
  558. end
  559.  
  560. on Get_WasInPathTool02
  561.   global WasInPathTool02
  562.   return WasInPathTool02
  563. end
  564.  
  565. on Set_WasInPathTool03 theMode
  566.   global WasInPathTool03
  567.   set WasInPathTool03 to theMode
  568. end
  569.  
  570. on Get_WasInPathTool03
  571.   global WasInPathTool03
  572.   return WasInPathTool03
  573. end
  574.  
  575. on Set_WasInPathTool04 theMode
  576.   global WasInPathTool04
  577.   set WasInPathTool04 to theMode
  578. end
  579.  
  580. on Get_WasInPathTool04
  581.   global WasInPathTool04
  582.   return WasInPathTool04
  583. end
  584.  
  585. on Set_WasInPathTool05 theMode
  586.   global WasInPathTool05
  587.   set WasInPathTool05 to theMode
  588. end
  589.  
  590. on Get_WasInPathTool05
  591.   global WasInPathTool05
  592.   return WasInPathTool05
  593. end
  594.  
  595. on Set_WasInPathTool06 theMode
  596.   global WasInPathTool06
  597.   set WasInPathTool06 to theMode
  598. end
  599.  
  600. on Get_WasInPathTool06
  601.   global WasInPathTool06
  602.   return WasInPathTool06
  603. end
  604.  
  605. on Set_WasInPathTool07 theMode
  606.   global WasInPathTool07
  607.   set WasInPathTool07 to Get_SeenINPath()
  608. end
  609.  
  610. on Get_WasInPathTool07
  611.   global WasInPathTool07
  612.   return WasInPathTool07
  613. end
  614.  
  615. on Set_WasInPathTool08 theMode
  616.   global WasInPathTool08
  617.   set WasInPathTool08 to Get_SeenINPath()
  618. end
  619.  
  620. on Get_WasInPathTool08
  621.   global WasInPathTool08
  622.   return WasInPathTool08
  623. end
  624.  
  625. on Set_WasInPathTool09 theMode
  626.   global WasInPathTool09
  627.   set WasInPathTool09 to Get_SeenINPath()
  628. end
  629.  
  630. on Get_WasInPathTool09
  631.   global WasInPathTool09
  632.   return WasInPathTool09
  633. end
  634.  
  635. on Set_WasInPathTool10 theMode
  636.   global WasInPathTool10
  637.   set WasInPathTool10 to Get_SeenINPath()
  638. end
  639.  
  640. on Get_WasInPathTool10
  641.   global WasInPathTool10
  642.   return WasInPathTool10
  643. end
  644.  
  645. on Set_WasInPathTool11 theMode
  646.   global WasInPathTool11
  647.   set WasInPathTool11 to Get_SeenINPath()
  648. end
  649.  
  650. on Get_WasInPathTool11
  651.   global WasInPathTool11
  652.   return WasInPathTool11
  653. end
  654.  
  655. on Set_WasInPathTool12 theMode
  656.   global WasInPathTool12
  657.   set WasInPathTool12 to Get_SeenINPath()
  658. end
  659.  
  660. on Get_WasInPathTool12
  661.   global WasInPathTool12
  662.   return WasInPathTool12
  663. end
  664.  
  665. on Set_WasInPathTool13 theMode
  666.   global WasInPathTool13
  667.   set WasInPathTool13 to Get_SeenINPath()
  668. end
  669.  
  670. on Get_WasInPathTool13
  671.   global WasInPathTool13
  672.   return WasInPathTool13
  673. end
  674.  
  675. on Set_CurrentTool theMode
  676.   global CurrentTool
  677.   set CurrentTool to theMode
  678. end
  679.  
  680. on Get_CurrentTool
  681.   global CurrentTool
  682.   return CurrentTool
  683. end
  684.  
  685. on Set_CurrentSnakeScreens theMode
  686.   global CurrentSnakeScreens
  687.   set CurrentSnakeScreens to theMode
  688. end
  689.  
  690. on Get_CurrentSnakeScreens
  691.   global CurrentSnakeScreens
  692.   return CurrentSnakeScreens
  693. end
  694.  
  695. on Set_SeenINPath theNum, theItem
  696.   global SEENINPath
  697.   if paramCount() = 2 then
  698.     put theNum into item theItem of SEENINPath
  699.   else
  700.     set SEENINPath to theNum
  701.   end if
  702. end
  703.  
  704. on Get_SeenINPath theItem
  705.   global SEENINPath
  706.   if paramCount() = 1 then
  707.     return item theItem of SEENINPath
  708.   else
  709.     return SEENINPath
  710.   end if
  711. end
  712.