home *** CD-ROM | disk | FTP | other *** search
/ Inventor Labs: Technology / INVENTORLABS_TECHNOLOGY.BIN / pc / files / invest.dir / 00665_Script_CircuitsParentScript < prev    next >
Text File  |  1997-05-26  |  17KB  |  677 lines

  1. -- Circuits Object
  2.  
  3.  
  4. property pSwitchOnCast
  5. property pSwitchOffCast
  6. property pMaxSprite
  7. property pSwitchFlag
  8. property pSwitchFlag1
  9. property pSwitchFlag2
  10. property pSwitchFlag3
  11. property pSwitchFlag4
  12. property pLight1
  13. property pLight2
  14. property pLight3 
  15. property pLight4
  16. property pLight5
  17. property pFirstResetSprite
  18.  
  19. --Circuit 1
  20. property pCircuit1Switch1
  21. property pcircuit1Light1
  22. property pCircuit1Light2
  23.  
  24. -- Circuit 2
  25. property pCircuit2Switch1
  26. property pCircuit2Switch2
  27. property pCircuit2Light1
  28. property pCircuit2Light2
  29.  
  30. -- Circuit 3
  31. property pCircuit3Switch1
  32. property pCircuit3Switch2
  33. property pCircuit3Switch3
  34. property pCircuit3Light1
  35. property pCircuit3Light2
  36. property pCircuit3Light3
  37.  
  38. --Circuit 4
  39. property pCircuit4Switch1
  40. property pCircuit4Switch2
  41. property pCircuit4Switch3
  42. property pCircuit4Switch4
  43. property pCircuit4Light1
  44. property pCircuit4Light2
  45.  
  46. -- Circuit 5
  47. property pCircuit5Switch1 
  48. property pCircuit5Dial1 
  49. property pCircuit5Light1 
  50. property pCircuit5Light2 
  51. property pDial1
  52. property pDial2
  53. property pDial3
  54.  
  55. -- Circuit 6
  56. property pCircuit6Switch1
  57. property pCircuit6Switch2
  58. property pCircuit6Switch3
  59. property pCircuit6Light1
  60. property pCircuit6Light2
  61. property pCircuit6Light3
  62. property pCircuit6Light4
  63. property pCircuit6Light5
  64.  
  65. -- DL
  66. property pHighestSprite
  67. property pRolloverList
  68. property pCurrentCircuit
  69. property pFirstRolloverCast
  70. property pFirstRolloverSprite
  71. property pLastRolloverSprite
  72. property pRolloverSprite
  73.  
  74. on mInit me
  75.   
  76.   set pFirstResetSprite = 4
  77.   set pSecontResetSprite = 5
  78.   
  79.   set pHighestSprite = 12
  80.   
  81.   set pRolloverSprite = 4
  82.   set pFirstRolloverCast = the number of cast "LABEL -BATTERY"
  83.   
  84.   --Circuit1
  85.   set pCircuit1Switch1 = 5
  86.   set pCircuit1Light1 = 6
  87.   set pCircuit1Light2 = 7
  88.   
  89.   --Circuit 2
  90.   set pCircuit2Switch1 = 5
  91.   set pCircuit2Switch2 = 6
  92.   set pCircuit2Light1 = 7
  93.   set pCircuit2Light2 = 8
  94.   
  95.   --Circuit 3
  96.   set pCircuit3Switch1 = 5
  97.   set pCircuit3Switch2 = 6
  98.   set pCircuit3Switch3 = 7
  99.   set pCircuit3Light1 = 8
  100.   set pCircuit3Light2 = 9
  101.   set pCircuit3Light3 = 10
  102.   
  103.   --Circuit 4
  104.   set pCircuit4Switch1 = 5
  105.   set pCircuit4Switch2 = 6
  106.   set pCircuit4Light1 = 7
  107.   set pCircuit4Light2 = 8
  108.   
  109.   --Circuit 5
  110.   set pCircuit5Switch1 = 5
  111.   set pCircuit5Dial1 = 6
  112.   set pCircuit5Light1 = 7
  113.   set pCircuit5Light2 = 8
  114.   set pDial1 = the number of cast "DIAL 1"
  115.   set pDial2 = the number of cast "DIAL 2"
  116.   set pDial3 = the number of cast "DIAL 3"
  117.   
  118.   --Circuit 6
  119.   set pCircuit6Switch1 = 5
  120.   set pCircuit6Switch2 = 6
  121.   set pCircuit6Switch3 = 7
  122.   set pCircuit6Light1 = 8
  123.   set pCircuit6Light2 = 9
  124.   set pCircuit6Light3 = 10
  125.   set pCircuit6Light4 = 11
  126.   set pCircuit6Light5 = 12
  127.   
  128.   -- set the castnum of of switch art
  129.   set pSwitchOnCast = the number of cast "switch on"
  130.   set pSwitchOffCast = the number of cast "switch off"
  131.   set pLight1 = the number of cast "light 1.pic"
  132.   set pLight2 = the number of cast "light 2.pic"
  133.   set pLight3 = the number of cast "light 3.pic"
  134.   set pLight4 = the number of cast "light 4.pic"
  135.   set pLight5 = the number of cast "light 5.pic"
  136.   
  137.   -- set initial values of switchflags (all off)
  138.   set pSwitchFlag1 = 0
  139.   set pSwitchFlag2 = 0
  140.   set pSwitchFlag3 = 0
  141.   set pSwitchFlag4 = 0
  142.   
  143.   -- the program sets the puppetsprite of only those sprites needed for a particular circuit
  144.   -- set initial value of pMaxSprite
  145.   set pMaxSprite = 4
  146.   
  147.   set pRolloverList = [[3: rect(473, 105, 540, 123), 1: rect(264, 271, 339, 289), 1: rect(467, 271, 542, 289), 0: rect(256, 111, 322, 129)], [3: rect(467, 155, 534, 173), 3: rect(462, 225, 529, 243), 1: rect(311, 289, 386, 307), 1: rect(310, 159, 385, 177), 0: rect(310, 109, 376, 127)], [3: rect(479, 91, 546, 109), 3: rect(386, 213, 453, 231), 3: rect(388, 277, 455, 295), 1: rect(383, 90, 458, 108), 1: rect(470, 213, 545, 231), 1: rect(469, 278, 544, 296), 0: rect(290, 90, 356, 108)], [3: rect(464, 80, 531, 98), 3: rect(452, 215, 519, 233), 1: rect(420, 302, 495, 320), 1: rect(332, 303, 407, 321), 0: rect(312, 150, 378, 168), 0: rect(396, 148, 462, 166), 0: rect(355, 215, 421, 233)], [3: rect(480, 91, 547, 109), 4: rect(360, 233, 472, 251), 1: rect(480, 302, 555, 320), 1: rect(281, 303, 356, 321), 0: rect(377, 88, 443, 106)], [3: rect(553, 157, 620, 175), 3: rect(552, 221, 619, 239), 3: rect(407, 188, 474, 206), 1: rect(452, 126, 527, 144), 1: rect(426, 254, 501, 272), 1: rect(296, 234, 371, 252), 1: rect(239, 126, 314, 144), 1: rect(323, 303, 398, 321), 0: rect(245, 71, 311, 89), 0: rect(516, 70, 582, 88), 2: rect(307, 184, 371, 202), 2: rect(532, 309, 596, 327)]]
  148.   
  149.   return me
  150.   
  151. end mInit
  152.  
  153. -----------------
  154. --DL
  155. on mActivate me
  156.   mInitCircuit me
  157. end
  158.  
  159. -----------------
  160. --DL
  161. on mClose me
  162.   mDoReset me
  163.   
  164.   --tj&dl
  165.   repeat with n = 2 to 20
  166.     set the puppet of sprite n = 0
  167.     set the visible of sprite n = 1
  168.   end repeat
  169.     puppetsprite 33,  false
  170. end
  171.  
  172. -----------------
  173. on mSetRollovers me, CircuitNumber, First, Last
  174.   set pCurrentCircuit = CircuitNumber
  175.   set pFirstRolloverSprite = First
  176.   set pLastRolloverSprite = Last
  177. end mSetRollovers
  178.  
  179. on mDoRollovers me
  180.   repeat with n = pFirstRolloverSprite to pLastRolloverSprite
  181.     if rollover(n) then
  182.       set RolloverIndex = (n - pFirstRolloverSprite + 1)
  183.       set CurrentList = getAt(pRolloverList, pCurrentCircuit)
  184.       set CastIndex = getPropAt(CurrentList, RolloverIndex)
  185.       set RolloverRect = getAt(CurrentList, RolloverIndex)
  186.       set the puppet of sprite pRolloverSprite = 1
  187.       set the castNum of sprite pRolloverSprite = (pFirstRolloverCast + CastIndex)
  188.       set the rect of sprite pRolloverSprite = RolloverRect
  189.       exit repeat
  190.     end if
  191.   end repeat
  192. end mDoRollovers
  193.  
  194. on mMaxSpriteReset me, MaxSprite
  195.   set pMaxSprite = MaxSprite
  196. end
  197.  
  198. -----------------
  199. -- DL  
  200. on mDoReset me
  201.   
  202.   repeat with n = pFirstResetSprite to pHighestSprite
  203.     set the puppet of sprite n = 0
  204.   end repeat
  205.   
  206.   set pSwitchFlag1 = 0
  207.   set pSwitchFlag2 = 0
  208.   set pSwitchFlag3 = 0
  209.   
  210. end mDoReset
  211.  
  212. ---------------------------
  213. --DL 
  214. on mInitCircuit me
  215.   
  216.   repeat with n = pFirstResetSprite to pMaxSprite -- second
  217.     set the puppet of sprite n = 1
  218.   end repeat
  219.   
  220. end mInitCircuit
  221.  
  222. -----------------------------
  223. -- DL
  224. on mDoSwitch11 me
  225.   
  226.   -- because this circuit is simple, I do not follow the standard path of setting
  227.   -- pSwitchFlag and then updating the lights. I do them both in the same handler
  228.   
  229.   if pSwitchFlag = 0 then
  230.     set the castnum of sprite pCircuit1Switch1 to pSwitchOnCast
  231.     set the castnum of sprite pCircuit1Light1 to pLight3 
  232.     set the castnum of sprite pCircuit1Light2 to pLight3 
  233.     set pSwitchFlag = 1
  234.   else
  235.     set the castnum of sprite pCircuit1Switch1 to pSwitchOffCast
  236.     set the castnum of sprite pCircuit1Light1 to pLight1
  237.     set the castnum of sprite pCircuit1Light2 to pLight1
  238.     set pSwitchFlag = 0
  239.   end if
  240.   updateStage
  241.   
  242. end mDoSwitch11
  243.  
  244. ------------------------------
  245. -- DL
  246. on mDoSwitch21 me
  247.   
  248.   if pSwitchFlag1 = 0 then
  249.     set pSwitchFlag1 = 1
  250.     set the castNum of sprite pCircuit2Switch2 to pSwitchOnCast 
  251.   else
  252.     set pSwitchFlag1 = 0
  253.     set the castNum of sprite pCircuit2Switch2 to pSwitchOffCast
  254.   end if
  255.   
  256.   mUpdateLights2
  257.   
  258. end mDoSwitch21
  259.  
  260.  
  261. -------------------------------------
  262. -- DL
  263. on mDoSwitch22 me
  264.   
  265.   
  266.   if pSwitchFlag2 = 0 then
  267.     set pSwitchFlag2 = 1
  268.     set the castnum of sprite pCircuit2Switch1 to pSwitchOnCast
  269.   else
  270.     set pSwitchFlag2 = 0
  271.     set the castnum of sprite pCircuit2Switch1 to pSwitchOffCast
  272.   end if
  273.   
  274.   mUpdateLights2
  275.   
  276. end mDoSwitch22
  277.  
  278. ---------------------------------------
  279. -- DL
  280. on mUpdateLights2 me
  281.   
  282.   
  283.   set testnum = 2*pSwitchFlag2 + pSwitchFlag1
  284.   
  285.   if testnum = 0 then
  286.     set the castnum of sprite pCircuit2Light1 to pLight1 
  287.     set the castnum of sprite pCircuit2Light2 to pLight1 
  288.   end if
  289.   
  290.   if testnum = 1 then
  291.     set the castnum of sprite pCircuit2Light1 to pLight3
  292.     set the castnum of sprite pCircuit2Light2 to pLight1
  293.   end if
  294.   
  295.   if testnum = 2 then
  296.     set the castnum of sprite pCircuit2Light1 to pLight1
  297.     set the castnum of sprite pCircuit2Light2 to pLight3
  298.   end if
  299.   
  300.   if testnum = 3 then 
  301.     set the castnum of sprite pCircuit2Light1 to pLight4
  302.     set the castnum of sprite pCircuit2Light2 to pLight4
  303.   end if
  304.   
  305.   updateStage
  306.   
  307. end mUpdateLights2
  308.  
  309.  
  310.  
  311. ----------------------------------------
  312. -- DL
  313. on mDoSwitch31 me
  314.   
  315.   -- check switch state and toggle
  316.   
  317.   if pSwitchFlag1 = 0 then
  318.     set the castnum of sprite pCircuit3Switch1 to pSwitchOnCast --5
  319.     set pSwitchFlag1 = 1
  320.   else
  321.     set the castnum of sprite pCircuit3Switch1 to pSwitchOffCast
  322.     set pSwitchFlag1 = 0
  323.   end if
  324.   
  325.   -- update lights based on positions of all switches
  326.   mUpdateLights3
  327.   
  328.   updateStage
  329.   
  330. end mDoSwitch31
  331.  
  332. ----------------------------------
  333. -- DL
  334. on mDoSwitch32 me
  335.   
  336.   if pSwitchFlag2 = 0 then
  337.     set pSwitchFlag2 = 1
  338.     set the castnum of sprite pCircuit3Switch2 to pSwitchOnCast
  339.   else
  340.     set pSwitchFlag2 = 0
  341.     set the castnum of sprite pCircuit3Switch2 to pSwitchOffCast
  342.   end if
  343.   
  344.   mUpdateLights3
  345.   
  346.   updateStage
  347.   
  348. end
  349.  
  350. -------------------------------------
  351. -- DL
  352. on mDoSwitch33 me
  353.   
  354.   if pSwitchFlag3 = 0 then
  355.     set pSwitchFlag3 = 1
  356.     set the castnum of sprite pCircuit3Switch3 to pSwitchOnCast
  357.   else
  358.     set pSwitchFlag3 = 0
  359.     set the castnum of sprite pCircuit3Switch3 to pSwitchOffCast
  360.   end if
  361.   
  362.   mUpdateLights3
  363.   
  364.   updateStage
  365.   
  366. end mDoSwitch33
  367.  
  368. ---------------------------------------
  369. -- DL
  370. on mUpdateLights3 me
  371.   
  372.   set testnum = pSwitchFlag3*2+pSwitchFlag2
  373.   put "testNum:" && testnum
  374.   
  375.   if pSwitchFlag1 = 1 then
  376.     
  377.     if testnum = 0 then
  378.       put "O"
  379.       set the castnum of sprite pCircuit3Light1 to pLight1
  380.       set the castnum of sprite pCircuit3Light2 to pLight1
  381.       set the castnum of sprite pCircuit3Light3 to pLight1
  382.     end if
  383.     
  384.     if testnum = 1 then
  385.       put "1"
  386.       set the castnum of sprite pCircuit3Light1 to pLight3
  387.       set the castnum of sprite pCircuit3Light2 to pLight3
  388.       set the castnum of sprite pCircuit3Light3 to pLight1
  389.     end if
  390.     
  391.     if testnum = 2 then
  392.       put "2"
  393.       set the castnum of sprite pCircuit3Light1 to pLight3
  394.       set the castnum of sprite pCircuit3Light2 to pLight1
  395.       set the castnum of sprite pCircuit3Light3 to pLight3
  396.     end if
  397.     
  398.     if testnum = 3 then
  399.       put "3"
  400.       set the castnum of sprite pCircuit3Light1 to pLight4
  401.       set the castnum of sprite pCircuit3Light2 to pLight4
  402.       set the castnum of sprite pCircuit3Light3 to pLight4
  403.     end if
  404.     
  405.   else
  406.     put "4"
  407.     set the castnum of sprite pCircuit3Light1 to pLight1
  408.     set the castnum of sprite pCircuit3Light2 to pLight1
  409.     set the castnum of sprite pCircuit3Light3 to pLight1
  410.     
  411.   end if
  412.   
  413.   updateStage
  414.   
  415.   
  416.   
  417. end mUpdateLights3
  418.  
  419. ---------------------------------
  420. -- DL
  421. on mDoSwitch41 me
  422.   
  423.   if pSwitchFlag1 = 0 then
  424.     set pSwitchFlag1 = 1
  425.     set the castnum of sprite pCircuit4Switch1 to pSwitchOnCast --5
  426.   else
  427.     set pSwitchFlag1 = 0
  428.     set the castnum of sprite pCircuit4Switch1 to pSwitchOffCast
  429.   end if
  430.   
  431.   mUpdateLights4
  432.   
  433.   updateStage
  434.   
  435. end mDoSwitch41
  436.  
  437. ----------------------------------
  438. -- DL
  439. on mDoSwitch42 me
  440.   
  441.   if pSwitchFlag2 = 0 then
  442.     set pSwitchFlag2 = 1
  443.     set the castnum of sprite pCircuit4Switch2 to pSwitchOnCast --6
  444.   else
  445.     set pSwitchFlag2 = 0
  446.     set the castnum of sprite pCircuit4Switch2 to pSwitchOffCast
  447.   end if
  448.   
  449.   mUpdateLights4
  450.   
  451.   updateStage
  452.   
  453. end mDoSwitch42
  454.  
  455. ------------------------------------
  456. -- DL
  457. on mUpdateLights4
  458.   
  459.   set testnum = 2*pSwitchFlag1 + pSwitchFlag2
  460.   
  461.   if testnum = 0 then
  462.     set the castnum of sprite pCircuit4Light1 to pLight1
  463.     set the castnum of sprite pCircuit4Light2 to pLight1
  464.   end if
  465.   
  466.   if testnum = 1 then
  467.     set the castnum of sprite pCircuit4Light1 to pLight3
  468.     set the castnum of sprite pCircuit4Light2 to pLight3
  469.   end if
  470.   
  471.   if testnum = 2 then
  472.     set the castnum of sprite pCircuit4Light1 to pLight5
  473.     set the castnum of sprite pCircuit4Light2 to pLight5
  474.   end if
  475.   
  476.   if testnum = 3 then
  477.     set the castnum of sprite pCircuit4Light1 to pLight5
  478.     set the castnum of sprite pCircuit4Light2 to pLight5
  479.   end if
  480.   
  481. end mUpdateLights4
  482.  
  483. ----------------------------------
  484. -- DL
  485. on mDoSwitch51 me
  486.   
  487.   if pSwitchFlag1 = 0 then
  488.     set pSwitchFlag1 = 1
  489.     set the castnum of sprite pCircuit5Switch1 to pSwitchOnCast --5
  490.   else
  491.     set pSwitchFlag1 = 0
  492.     set the castnum of sprite pCircuit5Switch1 to pSwitchOffCast
  493.   end if
  494.   
  495.   mUpdateLights5
  496.   
  497.   updateStage
  498.   
  499. end mDoSwitch51
  500.  
  501. --------------------------------
  502. -- DL
  503. on mDoSwitch52 me
  504.   
  505.   -- this switch has three states (low, medium and high)
  506.   
  507.   if pSwitchFlag2 = 0 then
  508.     set pSwitchFlag2 = 1
  509.     set the castnum of sprite pCircuit5Dial1 to pDial1
  510.   else
  511.     if pSwitchFlag2 = 1 then
  512.       set the castnum of sprite pCircuit5Dial1 to pDial2
  513.       set pSwitchFlag2 = 2
  514.     else
  515.       set the castnum of sprite pCircuit5Dial1 to pDial3
  516.       set pSwitchFlag2 = 0
  517.     end if
  518.   end if
  519.   
  520.   
  521.   mUpdateLights5
  522.   
  523.   updateStage
  524.   
  525. end mDoSwitch52
  526.  
  527. --------------------------------
  528. -- DL
  529. on mUpdateLights5
  530.   
  531.   if pSwitchFlag1 = 0 then
  532.     set the castnum of sprite pCircuit5Light1 to pLight1 --7
  533.     set the castnum of sprite pCircuit5Light2 to pLight1 --8
  534.   else
  535.     if pSwitchFlag2 = 0 then
  536.       set the castnum of sprite pCircuit5Light1 to pLight5
  537.       set the castnum of sprite pCircuit5Light2 to pLight5
  538.     else
  539.       if pSwitchFlag2 = 1 then
  540.         set the castnum of sprite pCircuit5Light1 to pLight3
  541.         set the castnum of sprite pCircuit5Light2 to pLight3
  542.       else
  543.         set the castnum of sprite pCircuit5Light1 to pLight2
  544.         set the castnum of sprite pCircuit5Light2 to pLight2
  545.       end if
  546.     end if
  547.   end if
  548.   
  549. end mUpdateLights5
  550.  
  551. -----------------------------
  552. -- DL
  553. on mDoSwitch61 me
  554.   
  555.   if pSwitchFlag1 = 0 then
  556.     set pSwitchFlag1 = 1
  557.     set the castnum of sprite pCircuit6Switch1 to pSwitchOnCast --5
  558.   else
  559.     set pSwitchFlag1 = 0
  560.     set the castnum of sprite pCircuit6Switch1 to pSwitchOffCast
  561.   end if
  562.   
  563.   mUpdateLights6
  564.   
  565.   updateStage
  566.   
  567.   
  568. end mDoSwitch61
  569.  
  570. -----------------------------
  571.  
  572. on mDoSwitch62 me
  573.   
  574.   if pSwitchFlag2 = 0 then
  575.     set pSwitchFlag2 = 1
  576.     set the castnum of sprite pCircuit6Switch2 to pSwitchOnCast --6
  577.   else
  578.     set pSwitchFlag2 = 0
  579.     set the castnum of sprite pCircuit6Switch2 to pSwitchOffCast
  580.   end if
  581.   
  582.   mUpdateLights6
  583.   
  584.   updateStage
  585.   
  586. end mDoSwitch62
  587.  
  588. -------------------------------
  589. -- DL
  590. on mDoSwitch63
  591.   
  592.   if pSwitchFlag3 = 0 then
  593.     set pSwitchFlag3 = 1
  594.     set the castnum of sprite pCircuit6Switch3 to pSwitchOnCast --7
  595.   else
  596.     set pSwitchFlag3 = 0
  597.     set the castnum of sprite pCircuit6Switch3 to pSwitchOffCast
  598.   end if
  599.   
  600.   mUpdateLights6
  601.   
  602.   updateStage
  603.   
  604. end mDoSwitch63
  605.  
  606. --------------------------------
  607.  
  608. on mUpdateLights6 me
  609.   
  610.   set testnum = 4*pSwitchFlag3+2*pSwitchFlag2+pSwitchFlag1
  611.   
  612.   -- because there are 8 possible outcomes, I use the temporary values (new8 ... new12)
  613.   -- to store the value of the lights. Then I update the lights at the end of the different
  614.   -- cases.
  615.   
  616.   put testNum
  617.   
  618.   if testnum = 0 then
  619.     set new8 = pLight1
  620.     set new9 = pLight1
  621.     set new10 = pLight1
  622.     set new11 = pLight1
  623.     set new12 = pLight1
  624.   else if testnum = 1 then
  625.     set new8 = pLight3
  626.     set new9 = pLight1
  627.     set new10 = pLight1
  628.     set new11 = pLight3
  629.     set new12 = pLight1
  630.   else if testnum = 2 then
  631.     set new8 = pLight1
  632.     set new9 = pLight3
  633.     set new10 = pLight1
  634.     set new11 = pLight1
  635.     set new12 = pLight3
  636.   else if testnum = 3 then
  637.     set new8 = pLight4
  638.     set new9 = pLight4
  639.     set new10 = pLight1
  640.     set new11 = pLight4
  641.     set new12 = pLight4
  642.   else if testnum = 4 then
  643.     set new8 = pLight1
  644.     set new9 = pLight1
  645.     set new10 = pLight1
  646.     set new11 = pLight1
  647.     set new12 = pLight1
  648.   else if testnum = 5 then
  649.     set new8 = pLight5
  650.     set new9 = pLight1
  651.     set new10 = pLight5
  652.     set new11 = pLight5
  653.     set new12 = pLight5
  654.   else if testnum = 6 then
  655.     set new8 = pLight1
  656.     set new9 = pLight4
  657.     set new10 = pLight4
  658.     set new11 = pLight4
  659.     set new12 = pLight4
  660.   else if testnum = 7 then
  661.     set new8 = pLight3
  662.     set new9 = pLight3
  663.     set new10 = pLight3
  664.     set new11 = pLight3
  665.     set new12 = pLight3
  666.   end if
  667.   
  668.   set the castNum of sprite pCircuit6Light1 to new8 --8
  669.   set the castNum of sprite pCircuit6Light2 to new9 --9
  670.   set the castNum of sprite pCircuit6Light3 to new10 -- 10
  671.   set the castNum of sprite pCircuit6Light4 to new11 -- 11
  672.   set the castNum of sprite pCircuit6Light5 to new12 --12
  673.   
  674.   updateStage
  675.   
  676. end mUpdateLights6
  677.