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

  1. on InitSnakelogic
  2.   Set_SnakeSprite(3)
  3.   Set_HLSprite(4)
  4.   Set_TagSprite(40)
  5.   Set_TagIsShown(0)
  6.   Set_LastTag(0)
  7.   set the puppet of sprite Get_TagSprite() to 1
  8.   CreateSnakeGrid()
  9. end
  10.  
  11. on CreateSnakeGrid
  12.   Set_BoxSize(14)
  13.   SetGridRef()
  14. end
  15.  
  16. on CheckSnakeStatus
  17.   if rollOver(Get_SnakeSprite()) then
  18.     ShowTag()
  19.   else
  20.     if get_TagIsShown() then
  21.       HideTag()
  22.     end if
  23.   end if
  24. end
  25.  
  26. on RestoreHilites
  27.   set theVec to Get_SeenINPath()
  28.   repeat with i = 1 to the number of items in theVec
  29.     if item i of theVec = 1 then
  30.       set NumOfBox to i
  31.       set tagVLoc to ((NumOfBox - 1) * get_BoxSize()) + get_GridRef(2)
  32.       set the locH of sprite Get_HLSprite() to integer(get_GridRef(1))
  33.       set the locV of sprite Get_HLSprite() to integer(tagVLoc)
  34.       updateStage()
  35.     end if
  36.   end repeat
  37. end
  38.  
  39. on ChooseScreen
  40.   set themouseV to the mouseV
  41.   set NumOfBox to integer(((themouseV - get_GridRef(2)) / get_BoxSize()) - 0.5) + 1
  42.   set tagVLoc to ((NumOfBox - 1) * get_BoxSize()) + get_GridRef(2)
  43.   set the locH of sprite Get_HLSprite() to integer(get_GridRef(1))
  44.   set the locV of sprite Get_HLSprite() to integer(tagVLoc)
  45.   SaveHilite(NumOfBox)
  46.   set movieName to item NumOfBox of Get_CurrentSnakeScreens()
  47.   go("INIT" & Get_ScreenSubject(), movieName & ".GEO")
  48.   updateStage()
  49. end
  50.  
  51. on SaveHilite NumOfBox
  52. end
  53.  
  54. on ShowTag
  55.   set themouseV to the mouseV
  56.   set NumOfBox to integer(((themouseV - get_GridRef(2)) / get_BoxSize()) - 0.5) + 1
  57.   if get_LastTag() <> NumOfBox then
  58.     Set_LastTag(NumOfBox)
  59.     set tagVLoc to ((NumOfBox - 1) * get_BoxSize()) + get_GridRef(2) + integer(get_BoxSize() / 2)
  60.     set the castNum of sprite Get_TagSprite() to the number of cast ("tag-" & NumOfBox)
  61.     set the locH of sprite Get_TagSprite() to integer(get_GridRef(1)) - 3
  62.     set the locV of sprite Get_TagSprite() to integer(tagVLoc)
  63.     updateStage()
  64.     Set_TagIsShown(1)
  65.   end if
  66. end
  67.  
  68. on HideTag
  69.   Set_TagIsShown(0)
  70.   Set_LastTag(0)
  71.   set the locH of sprite Get_TagSprite() to 999
  72.   set the locV of sprite Get_TagSprite() to 999
  73.   updateStage()
  74. end
  75.  
  76. on SetGridRef
  77.   global GridRef
  78.   put the locH of sprite Get_SnakeSprite() into item 1 of GridRef
  79.   put the locV of sprite Get_SnakeSprite() into item 2 of GridRef
  80. end
  81.  
  82. on get_GridRef theItem
  83.   global GridRef
  84.   return item theItem of GridRef
  85. end
  86.  
  87. on Set_TagIsShown theSp
  88.   global TagIsShown
  89.   set TagIsShown to theSp
  90. end
  91.  
  92. on get_TagIsShown
  93.   global TagIsShown
  94.   return TagIsShown
  95. end
  96.  
  97. on Set_LastTag theSp
  98.   global LastTag
  99.   set LastTag to theSp
  100. end
  101.  
  102. on get_LastTag
  103.   global LastTag
  104.   return LastTag
  105. end
  106.  
  107. on Set_BoxSize theSp
  108.   global BoxSize
  109.   set BoxSize to theSp
  110. end
  111.  
  112. on get_BoxSize
  113.   global BoxSize
  114.   return BoxSize
  115. end
  116.  
  117. on Set_SnakeSprite theSp
  118.   global SnakeSprite
  119.   set SnakeSprite to theSp
  120. end
  121.  
  122. on Get_SnakeSprite
  123.   global SnakeSprite
  124.   return SnakeSprite
  125. end
  126.  
  127. on Set_HLSprite theSp
  128.   global HLSprite
  129.   set HLSprite to theSp
  130. end
  131.  
  132. on Get_HLSprite
  133.   global HLSprite
  134.   return HLSprite
  135. end
  136.  
  137. on Set_TagSprite theSp
  138.   global TagSprite
  139.   set TagSprite to theSp
  140. end
  141.  
  142. on Get_TagSprite
  143.   global TagSprite
  144.   return TagSprite
  145. end
  146.  
  147. on Set_CDcounter theNum
  148.   global CDcounter
  149.   set CDcounter to theNum
  150. end
  151.  
  152. on Add_CDcounter theNum
  153.   global CDcounter
  154.   set CDcounter to theNum + CDcounter
  155. end
  156.  
  157. on Get_CDcounter
  158.   global CDcounter
  159.   return CDcounter
  160. end
  161.  
  162. on Set_SeenINPath theNum, theItem
  163.   global SEENINPath
  164.   if paramCount() = 2 then
  165.     put theNum into item theItem of SEENINPath
  166.   else
  167.     set SEENINPath to theNum
  168.   end if
  169. end
  170.  
  171. on Get_SeenINPath theItem
  172.   global SEENINPath
  173.   if paramCount() = 1 then
  174.     return item theItem of SEENINPath
  175.   else
  176.     return SEENINPath
  177.   end if
  178. end
  179.  
  180. on SaveSeenScreens
  181. end
  182.  
  183. on Set_ScreensTool01 theMode
  184.   global ScreensTool01
  185.   set ScreensTool01 to theMode
  186. end
  187.  
  188. on Get_ScreensTool01
  189.   global ScreensTool01
  190.   return ScreensTool01
  191. end
  192.  
  193. on Set_ScreensTool02 theMode
  194.   global ScreensTool02
  195.   set ScreensTool02 to theMode
  196. end
  197.  
  198. on Get_ScreensTool02
  199.   global ScreensTool02
  200.   return ScreensTool02
  201. end
  202.  
  203. on Set_ScreensTool03 theMode
  204.   global ScreensTool03
  205.   set ScreensTool03 to theMode
  206. end
  207.  
  208. on Get_ScreensTool03
  209.   global ScreensTool03
  210.   return ScreensTool03
  211. end
  212.  
  213. on Set_ScreensTool04 theMode
  214.   global ScreensTool04
  215.   set ScreensTool04 to theMode
  216. end
  217.  
  218. on Get_ScreensTool04
  219.   global ScreensTool04
  220.   return ScreensTool04
  221. end
  222.  
  223. on Set_ScreensTool05 theMode
  224.   global ScreensTool05
  225.   set ScreensTool05 to theMode
  226. end
  227.  
  228. on Get_ScreensTool05
  229.   global ScreensTool05
  230.   return ScreensTool05
  231. end
  232.  
  233. on Set_ScreensTool06 theMode
  234.   global ScreensTool06
  235.   set ScreensTool06 to theMode
  236. end
  237.  
  238. on Get_ScreensTool06
  239.   global ScreensTool06
  240.   return ScreensTool06
  241. end
  242.  
  243. on Set_ScreensTool07 theMode
  244.   global ScreensTool07
  245.   set ScreensTool07 to theMode
  246. end
  247.  
  248. on Get_ScreensTool07
  249.   global ScreensTool07
  250.   return ScreensTool07
  251. end
  252.  
  253. on Set_ScreensTool08 theMode
  254.   global ScreensTool08
  255.   set ScreensTool08 to theMode
  256. end
  257.  
  258. on Get_ScreensTool08
  259.   global ScreensTool08
  260.   return ScreensTool08
  261. end
  262.  
  263. on Set_ScreensTool09 theMode
  264.   global ScreensTool09
  265.   set ScreensTool09 to theMode
  266. end
  267.  
  268. on Get_ScreensTool09
  269.   global ScreensTool09
  270.   return ScreensTool09
  271. end
  272.  
  273. on Set_ScreensTool10 theMode
  274.   global ScreensTool10
  275.   set ScreensTool10 to theMode
  276. end
  277.  
  278. on Get_ScreensTool10
  279.   global ScreensTool10
  280.   return ScreensTool10
  281. end
  282.  
  283. on Set_ScreensTool11 theMode
  284.   global ScreensTool11
  285.   set ScreensTool11 to theMode
  286. end
  287.  
  288. on Get_ScreensTool11
  289.   global ScreensTool11
  290.   return ScreensTool11
  291. end
  292.  
  293. on Set_ScreensTool12 theMode
  294.   global ScreensTool12
  295.   set ScreensTool12 to theMode
  296. end
  297.  
  298. on Get_ScreensTool12
  299.   global ScreensTool12
  300.   return ScreensTool12
  301. end
  302.  
  303. on Set_ScreensTool13 theMode
  304.   global ScreensTool13
  305.   set ScreensTool13 to theMode
  306. end
  307.  
  308. on Get_ScreensTool13
  309.   global ScreensTool13
  310.   return ScreensTool13
  311. end
  312.  
  313. on Set_WasInPathTool01 theMode
  314.   global WasInPathTool01
  315.   set WasInPathTool01 to theMode
  316. end
  317.  
  318. on Get_WasInPathTool01
  319.   global WasInPathTool01
  320.   return WasInPathTool01
  321. end
  322.  
  323. on Set_WasInPathTool02 theMode
  324.   global WasInPathTool02
  325.   set WasInPathTool02 to theMode
  326. end
  327.  
  328. on Get_WasInPathTool02
  329.   global WasInPathTool02
  330.   return WasInPathTool02
  331. end
  332.  
  333. on Set_WasInPathTool03 theMode
  334.   global WasInPathTool03
  335.   set WasInPathTool03 to theMode
  336. end
  337.  
  338. on Get_WasInPathTool03
  339.   global WasInPathTool03
  340.   return WasInPathTool03
  341. end
  342.  
  343. on Set_WasInPathTool04 theMode
  344.   global WasInPathTool04
  345.   set WasInPathTool04 to theMode
  346. end
  347.  
  348. on Get_WasInPathTool04
  349.   global WasInPathTool04
  350.   return WasInPathTool04
  351. end
  352.  
  353. on Set_WasInPathTool05 theMode
  354.   global WasInPathTool05
  355.   set WasInPathTool05 to theMode
  356. end
  357.  
  358. on Get_WasInPathTool05
  359.   global WasInPathTool05
  360.   return WasInPathTool05
  361. end
  362.  
  363. on Set_WasInPathTool06 theMode
  364.   global WasInPathTool06
  365.   set WasInPathTool06 to theMode
  366. end
  367.  
  368. on Get_WasInPathTool06
  369.   global WasInPathTool06
  370.   return WasInPathTool06
  371. end
  372.  
  373. on Set_WasInPathTool07 theMode
  374.   global WasInPathTool07
  375.   set WasInPathTool07 to Get_SeenINPath()
  376. end
  377.  
  378. on Get_WasInPathTool07
  379.   global WasInPathTool07
  380.   return WasInPathTool07
  381. end
  382.  
  383. on Set_WasInPathTool08 theMode
  384.   global WasInPathTool08
  385.   set WasInPathTool08 to Get_SeenINPath()
  386. end
  387.  
  388. on Get_WasInPathTool08
  389.   global WasInPathTool08
  390.   return WasInPathTool08
  391. end
  392.  
  393. on Set_WasInPathTool09 theMode
  394.   global WasInPathTool09
  395.   set WasInPathTool09 to Get_SeenINPath()
  396. end
  397.  
  398. on Get_WasInPathTool09
  399.   global WasInPathTool09
  400.   return WasInPathTool09
  401. end
  402.  
  403. on Set_WasInPathTool10 theMode
  404.   global WasInPathTool10
  405.   set WasInPathTool10 to Get_SeenINPath()
  406. end
  407.  
  408. on Get_WasInPathTool10
  409.   global WasInPathTool10
  410.   return WasInPathTool10
  411. end
  412.  
  413. on Set_WasInPathTool11 theMode
  414.   global WasInPathTool11
  415.   set WasInPathTool11 to Get_SeenINPath()
  416. end
  417.  
  418. on Get_WasInPathTool11
  419.   global WasInPathTool11
  420.   return WasInPathTool11
  421. end
  422.  
  423. on Set_WasInPathTool12 theMode
  424.   global WasInPathTool12
  425.   set WasInPathTool12 to Get_SeenINPath()
  426. end
  427.  
  428. on Get_WasInPathTool12
  429.   global WasInPathTool12
  430.   return WasInPathTool12
  431. end
  432.  
  433. on Set_WasInPathTool13 theMode
  434.   global WasInPathTool13
  435.   set WasInPathTool13 to Get_SeenINPath()
  436. end
  437.  
  438. on Get_WasInPathTool13
  439.   global WasInPathTool13
  440.   return WasInPathTool13
  441. end
  442.  
  443. on Set_CurrentTool theMode
  444.   global CurrentTool
  445.   set CurrentTool to theMode
  446. end
  447.  
  448. on Get_CurrentTool
  449.   global CurrentTool
  450.   return CurrentTool
  451. end
  452.  
  453. on Set_CurrentSnakeScreens theMode
  454.   global CurrentSnakeScreens
  455.   set CurrentSnakeScreens to theMode
  456. end
  457.  
  458. on Get_CurrentSnakeScreens
  459.   global CurrentSnakeScreens
  460.   return CurrentSnakeScreens
  461. end
  462.