home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1997 September / Personal_Computer_World_Sep_97.iso / DXRS / CDXPCW09.DXR / 00004_CDXINPUT,CDXSelectDrop.ls < prev    next >
Encoding:
Text File  |  1997-06-25  |  12.2 KB  |  258 lines

  1. on CDXINPUT
  2.   global CDXWhichInputList, CDXDrpMenuList, CDXVariationList, CDXboxnum, CDXTwoRememberSeltextList, CDXNothingfound
  3.   repeat with t = 1 to count(CDXWhichInputList)
  4.     if rollOver(getAt(getAt(CDXWhichInputList, t), 1)) then
  5.       if getAt(getAt(CDXWhichInputList, t), 2) = 1 then
  6.         set CDXMemnum to the memberNum of sprite getAt(getAt(CDXWhichInputList, t), 1)
  7.         set the memberNum of sprite getAt(getAt(CDXWhichInputList, t), 1) to the memberNum of sprite getAt(getAt(CDXWhichInputList, t), 1) + 1
  8.         updateStage()
  9.         repeat while rollOver(getAt(getAt(CDXWhichInputList, t), 1))
  10.           set thisdropbox to getAt(getAt(CDXWhichInputList, t), 1)
  11.           if the mouseDown then
  12.             if CDXNothingfound = 1 then
  13.               set CDXNothingfound to 0
  14.               set the member of sprite 32 to member "CDXIntroText"
  15.               set the loc of sprite 32 to point(299, 355)
  16.               set the ink of sprite 32 to 36
  17.             end if
  18.             repeat with s = 1 to count(CDXDrpMenuList)
  19.               if getAt(getAt(CDXDrpMenuList, s), 1) = thisdropbox then
  20.                 set thismenuList to getAt(CDXDrpMenuList, s)
  21.                 exit repeat
  22.               end if
  23.             end repeat
  24.             set the member of sprite getAt(thismenuList, 2) to member getAt(thismenuList, 4)
  25.             set the memberNum of sprite getAt(thismenuList, 3) to the memberNum of sprite getAt(thismenuList, 2) + 1
  26.             set the loc of sprite getAt(thismenuList, 2) to point(getAt(thismenuList, 5), getAt(thismenuList, 6))
  27.             set the loc of sprite getAt(thismenuList, 3) to point(getAt(thismenuList, 5), getAt(thismenuList, 6))
  28.             set the ink of sprite getAt(thismenuList, 2) to 36
  29.             set the ink of sprite getAt(thismenuList, 3) to 0
  30.             updateStage()
  31.             repeat while the mouseDown
  32.               CDXSelectDrop(thismenuList, s)
  33.             end repeat
  34.             set the member of sprite getAt(thismenuList, 2) to member "CDDOT"
  35.             set the member of sprite getAt(thismenuList, 3) to member "CDDOT"
  36.             set the locH of sprite getAt(thismenuList, 2) to 2000
  37.             set the locH of sprite getAt(thismenuList, 3) to 2000
  38.             set the locH of sprite getAt(thismenuList, 10) to 2000
  39.             updateStage()
  40.             CDXWhichInputBoxes(thisdropbox)
  41.           end if
  42.         end repeat
  43.         if the memberNum of sprite getAt(getAt(CDXWhichInputList, t), 1) <> CDXMemnum then
  44.           set the memberNum of sprite getAt(getAt(CDXWhichInputList, t), 1) to the memberNum of sprite getAt(getAt(CDXWhichInputList, t), 1) - 1
  45.           updateStage()
  46.         end if
  47.         next repeat
  48.       end if
  49.       CDXWhichInputBoxes()
  50.     end if
  51.   end repeat
  52. end
  53.  
  54. on CDXSelectDrop thismenuList, s, x
  55.   global CDXDrpMenuList, CDXVariationList, CDXwhichLine, CDXWhichInputList
  56.   if rollOver(getAt(thismenuList, 2)) and the mouseDown then
  57.     set BoxDifference to 16
  58.     set the member of sprite getAt(thismenuList, 10) to member getAt(thismenuList, 7)
  59.     set the ink of sprite getAt(thismenuList, 10) to 0
  60.     updateStage()
  61.     repeat while rollOver(getAt(thismenuList, 2)) and the mouseDown
  62.       set whichSprite to the mouseCast
  63.       if (whichSprite = the memberNum of sprite getAt(thismenuList, 2)) and ((the mouseLine <> CDXwhichLine) or (the mouseLine = 1)) then
  64.         set WhichLibTerm to line the mouseLine of field whichSprite
  65.         set CDXwhichLine to the mouseLine
  66.         if CDXwhichLine <> -1 then
  67.           set the locH of sprite getAt(thismenuList, 10) to getAt(thismenuList, 8)
  68.           set the locV of sprite getAt(thismenuList, 10) to getAt(thismenuList, 9) + ((CDXwhichLine - 1) * BoxDifference)
  69.           updateStage()
  70.         end if
  71.       end if
  72.     end repeat
  73.     if rollOver(sprite(getAt(thismenuList, 2))) then
  74.       set WhichLine to the mouseLine
  75.       if field getAt(thismenuList, 12) = EMPTY then
  76.         put line WhichLine of field whichSprite into field getAt(thismenuList, 12)
  77.         updateStage()
  78.         if the machineType > 200 then
  79.           set the textSize of member getAt(thismenuList, 12) to 12
  80.           set the textFont of member getAt(thismenuList, 12) to "Arial"
  81.           set the boxType of member getAt(thismenuList, 12) to #fixed
  82.           set the textStyle of member getAt(thismenuList, 12) to "bold"
  83.           updateStage()
  84.         else
  85.           set the textSize of member getAt(thismenuList, 12) to 12
  86.           set the textFont of member getAt(thismenuList, 12) to "Geneva"
  87.           set the boxType of member getAt(thismenuList, 12) to #fixed
  88.           set the textStyle of member getAt(thismenuList, 12) to "bold"
  89.           updateStage()
  90.         end if
  91.       else
  92.         put line WhichLine of field whichSprite into field getAt(thismenuList, 12)
  93.       end if
  94.       put line 1 of field getAt(thismenuList, 12) into field getAt(thismenuList, 12)
  95.       set the member of sprite getAt(thismenuList, 11) to member getAt(thismenuList, 12)
  96.       set the loc of sprite getAt(thismenuList, 11) to point(getAt(thismenuList, 13), getAt(thismenuList, 14))
  97.       set the ink of sprite getAt(thismenuList, 11) to 36
  98.       set the locH of sprite getAt(thismenuList, 10) to 2000
  99.       if (the member of sprite getAt(thismenuList, 2) = member "DRPINputOne") or (the member of sprite getAt(thismenuList, 2) = member "DRPINputOneB") then
  100.         set the locH of sprite 2 to 2000
  101.         updateStage()
  102.         if (WhichLine = 2) or (WhichLine = 3) or (WhichLine = 4) then
  103.           set nextmenuList to getAt(CDXDrpMenuList, s + 1)
  104.           put line 2 of field "DRPINputTwo" into field getAt(nextmenuList, 12)
  105.           set the member of sprite getAt(nextmenuList, 11) to member getAt(nextmenuList, 12)
  106.           set the loc of sprite getAt(nextmenuList, 11) to point(getAt(nextmenuList, 13), getAt(nextmenuList, 14))
  107.           set the ink of sprite getAt(nextmenuList, 11) to 36
  108.           CDXDrpOrNot(nextmenuList, 0)
  109.           set ThirdmenuList to getAt(CDXDrpMenuList, s + 2)
  110.           CDXDrpOrNot(ThirdmenuList, 1)
  111.           case WhichLine of
  112.             4:
  113.               setAt(ThirdmenuList, 4, "DRPINputThreeCat")
  114.               setAt(ThirdmenuList, 7, "HiLitThreeCat")
  115.               setAt(ThirdmenuList, 5, 486)
  116.               setAt(ThirdmenuList, 8, 597)
  117.               case getAt(thismenuList, 1) of
  118.                 4:
  119.                   setAt(ThirdmenuList, 6, 125)
  120.                   setAt(ThirdmenuList, 9, 135)
  121.                 8:
  122.                   setAt(ThirdmenuList, 6, 158)
  123.                   setAt(ThirdmenuList, 9, 168)
  124.                 12:
  125.                   setAt(ThirdmenuList, 6, 170)
  126.                   setAt(ThirdmenuList, 9, 180)
  127.               end case
  128.             3:
  129.               setAt(ThirdmenuList, 4, "DRPINputThreeStat")
  130.               setAt(ThirdmenuList, 7, "HiLitThreeStat")
  131.               setAt(ThirdmenuList, 5, 486)
  132.               setAt(ThirdmenuList, 8, 597)
  133.               case getAt(thismenuList, 1) of
  134.                 4:
  135.                   setAt(ThirdmenuList, 6, 125)
  136.                   setAt(ThirdmenuList, 9, 135)
  137.                 8:
  138.                   setAt(ThirdmenuList, 6, 198)
  139.                   setAt(ThirdmenuList, 9, 208)
  140.                 12:
  141.                   setAt(ThirdmenuList, 6, 273)
  142.                   setAt(ThirdmenuList, 9, 283)
  143.               end case
  144.             2:
  145.               setAt(ThirdmenuList, 4, "DRPINputThreeIssue")
  146.               setAt(ThirdmenuList, 7, "HiLitThreeIssue")
  147.               setAt(ThirdmenuList, 5, 486)
  148.               setAt(ThirdmenuList, 8, 597)
  149.               case getAt(thismenuList, 1) of
  150.                 4:
  151.                   setAt(ThirdmenuList, 6, 125)
  152.                   setAt(ThirdmenuList, 9, 135)
  153.                 8:
  154.                   setAt(ThirdmenuList, 6, 198)
  155.                   setAt(ThirdmenuList, 9, 208)
  156.                 12:
  157.                   setAt(ThirdmenuList, 6, 273)
  158.                   setAt(ThirdmenuList, 9, 283)
  159.               end case
  160.           end case
  161.           set the editable of member getAt(ThirdmenuList, 12) to 0
  162.           set the member of sprite getAt(ThirdmenuList, 11) to member "CDDOT"
  163.           set the locH of sprite getAt(ThirdmenuList, 11) to 2000
  164.         else
  165.           if (WhichLine = 1) or (WhichLine = 5) then
  166.             set ThirdmenuList to getAt(CDXDrpMenuList, s + 2)
  167.             set the member of sprite getAt(ThirdmenuList, 11) to member getAt(ThirdmenuList, 12)
  168.             put EMPTY into field getAt(ThirdmenuList, 12)
  169.             set the editable of member getAt(ThirdmenuList, 12) to 1
  170.             set the loc of sprite getAt(ThirdmenuList, 11) to point(getAt(ThirdmenuList, 13), getAt(ThirdmenuList, 14))
  171.             set the ink of sprite getAt(ThirdmenuList, 11) to 36
  172.             CDXDrpOrNot(ThirdmenuList, 0)
  173.             if WhichLine = 5 then
  174.               set nextmenuList to getAt(CDXDrpMenuList, s + 1)
  175.               put line 1 of field "DRPINputTwo" into field getAt(nextmenuList, 12)
  176.               set the member of sprite getAt(nextmenuList, 11) to member getAt(nextmenuList, 12)
  177.               set the loc of sprite getAt(nextmenuList, 11) to point(getAt(nextmenuList, 13), getAt(nextmenuList, 14))
  178.               set the ink of sprite getAt(nextmenuList, 11) to 36
  179.               CDXDrpOrNot(nextmenuList, 0)
  180.             else
  181.               set nextmenuList to getAt(CDXDrpMenuList, s + 1)
  182.               CDXDrpOrNot(nextmenuList, 1)
  183.             end if
  184.           end if
  185.         end if
  186.       else
  187.         if the member of sprite getAt(thismenuList, 2) = member "DRPAndOrOne" then
  188.           if (WhichLine = 1) or (WhichLine = 2) then
  189.             if count(CDXWhichInputList) = 4 then
  190.               addAt(CDXWhichInputList, count(CDXWhichInputList) + 1, [8, 1])
  191.               addAt(CDXWhichInputList, count(CDXWhichInputList) + 1, [9, 1])
  192.               addAt(CDXWhichInputList, count(CDXWhichInputList) + 1, [10, 0])
  193.               set the member of sprite 8 to member "CDXInputOneArrow"
  194.               set the member of sprite 9 to member "CDXInputTwoArrow"
  195.               set the member of sprite 10 to member "CDXInputThree"
  196.             else
  197.               if count(CDXWhichInputList) = 8 then
  198.                 addAt(CDXWhichInputList, count(CDXWhichInputList) + 1, [12, 1])
  199.                 addAt(CDXWhichInputList, count(CDXWhichInputList) + 1, [13, 1])
  200.                 addAt(CDXWhichInputList, count(CDXWhichInputList) + 1, [14, 0])
  201.                 set the member of sprite 12 to member "CDXInputOneArrow"
  202.                 set the member of sprite 13 to member "CDXInputTwoArrow"
  203.                 set the member of sprite 14 to member "CDXInputThree"
  204.               else
  205.                 if (getAt(thismenuList, 1) = 11) and (count(CDXTwoRememberSeltextList) = 0) then
  206.                   set the member of sprite 12 to member "CDXInputOneArrow"
  207.                   set the member of sprite 13 to member "CDXInputTwoArrow"
  208.                   set the member of sprite 14 to member "CDXInputThree"
  209.                   setAt(CDXWhichInputList, 9, [12, 1])
  210.                   setAt(CDXWhichInputList, 10, [13, 1])
  211.                   setAt(CDXWhichInputList, 11, [14, 0])
  212.                 end if
  213.               end if
  214.             end if
  215.           else
  216.           end if
  217.         end if
  218.       end if
  219.     end if
  220.   end if
  221. end
  222.  
  223. on CDXDrpOrNot whichList, x
  224.   global CDXWhichInputList
  225.   set thissprite to getAt(whichList, 1)
  226.   set alreadyHere to 0
  227.   repeat with t = 1 to count(CDXWhichInputList)
  228.     if getAt(getAt(CDXWhichInputList, t), 1) = thissprite then
  229.       set alreadyHere to 1
  230.       setAt(getAt(CDXWhichInputList, t), 2, x)
  231.       exit repeat
  232.     end if
  233.   end repeat
  234.   if alreadyHere = 0 then
  235.     addAt(CDXWhichInputList, count(CDXWhichInputList) + 1, [thissprite, x])
  236.   end if
  237.   set Whichnum to the memberNum of sprite thissprite
  238.   if x = 1 then
  239.     case the name of member Whichnum of
  240.       "CDXInputOne":
  241.         set the member of sprite thissprite to member "CDXInputOneArrow"
  242.       "CDXInputTwo":
  243.         set the member of sprite thissprite to member "CDXInputTwoArrow"
  244.       "CDXInputThree":
  245.         set the member of sprite thissprite to member "CDXInputThreeArrow"
  246.     end case
  247.   else
  248.     case the name of member Whichnum of
  249.       "CDXInputOneArrow":
  250.         set the member of sprite thissprite to member "CDXInputOne"
  251.       "CDXInputTwoArrow":
  252.         set the member of sprite thissprite to member "CDXInputTwo"
  253.       "CDXInputThreeArrow":
  254.         set the member of sprite thissprite to member "CDXInputThree"
  255.     end case
  256.   end if
  257. end
  258.