home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1997 September / Personal_Computer_World_Sep_97.iso / DXRS / RVXPCW09.DXR / 00004_RVXINPUT,RVXSelectDrop.ls < prev    next >
Encoding:
Text File  |  1997-06-25  |  9.5 KB  |  196 lines

  1. on RVXINPUT
  2.   global RVXWhichInputList, RVXDrpMenuList, RVXVariationList, RVXboxnum, RVXTwoRememberSeltextList, RVXNothingfound
  3.   repeat with t = 1 to count(RVXWhichInputList)
  4.     if rollOver(getAt(getAt(RVXWhichInputList, t), 1)) then
  5.       if getAt(getAt(RVXWhichInputList, t), 2) = 1 then
  6.         set RVXMemnum to the memberNum of sprite getAt(getAt(RVXWhichInputList, t), 1)
  7.         set the memberNum of sprite getAt(getAt(RVXWhichInputList, t), 1) to the memberNum of sprite getAt(getAt(RVXWhichInputList, t), 1) + 1
  8.         updateStage()
  9.         repeat while rollOver(getAt(getAt(RVXWhichInputList, t), 1))
  10.           set thisdropbox to getAt(getAt(RVXWhichInputList, t), 1)
  11.           if the mouseDown then
  12.             if RVXNothingfound = 1 then
  13.               set RVXNothingfound to 0
  14.               set the member of sprite 32 to member "RVXIntroText"
  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(RVXDrpMenuList)
  19.               if getAt(getAt(RVXDrpMenuList, s), 1) = thisdropbox then
  20.                 set thismenuList to getAt(RVXDrpMenuList, 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.               RVXSelectDrop(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.             RVXWhichInputBoxes(thisdropbox)
  41.           end if
  42.         end repeat
  43.         if the memberNum of sprite getAt(getAt(RVXWhichInputList, t), 1) <> RVXMemnum then
  44.           set the memberNum of sprite getAt(getAt(RVXWhichInputList, t), 1) to the memberNum of sprite getAt(getAt(RVXWhichInputList, t), 1) - 1
  45.           updateStage()
  46.         end if
  47.         next repeat
  48.       end if
  49.       RVXWhichInputBoxes()
  50.     end if
  51.   end repeat
  52. end
  53.  
  54. on RVXSelectDrop thismenuList, s, x
  55.   global RVXDrpMenuList, RVXVariationList, RVXwhichLine, RVXWhichInputList
  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 <> RVXwhichLine) or (the mouseLine = 1)) then
  64.         set WhichLibTerm to line the mouseLine of field whichSprite
  65.         set RVXwhichLine to the mouseLine
  66.         if RVXwhichLine <> -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) + ((RVXwhichLine - 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.       put line WhichLine of field whichSprite into field getAt(thismenuList, 12)
  76.       updateStage()
  77.       if the machineType > 200 then
  78.         set the boxType of member getAt(thismenuList, 12) to #adjust
  79.         updateStage()
  80.         set the textSize of member getAt(thismenuList, 12) to 12
  81.         set the textStyle of member getAt(thismenuList, 12) to "bold"
  82.         set the textFont of member getAt(thismenuList, 12) to "Arial"
  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.       put line 1 of field getAt(thismenuList, 12) into field getAt(thismenuList, 12)
  92.       set the member of sprite getAt(thismenuList, 11) to member getAt(thismenuList, 12)
  93.       set the loc of sprite getAt(thismenuList, 11) to point(getAt(thismenuList, 13), getAt(thismenuList, 14))
  94.       set the ink of sprite getAt(thismenuList, 11) to 36
  95.       set the locH of sprite getAt(thismenuList, 10) to 2000
  96.       if the member of sprite getAt(thismenuList, 2) = member "DRPINputOne" then
  97.         set the locH of sprite 2 to 2000
  98.         updateStage()
  99.         if WhichLine = 3 then
  100.           set nextmenuList to getAt(RVXDrpMenuList, s + 1)
  101.           put line 2 of field "DRPINputTwo" into field getAt(nextmenuList, 12)
  102.           set the member of sprite getAt(nextmenuList, 11) to member getAt(nextmenuList, 12)
  103.           set the loc of sprite getAt(nextmenuList, 11) to point(getAt(nextmenuList, 13), getAt(nextmenuList, 14))
  104.           set the ink of sprite getAt(nextmenuList, 11) to 36
  105.           RVXDrpOrNot(nextmenuList, 0)
  106.           set ThirdmenuList to getAt(RVXDrpMenuList, s + 2)
  107.           RVXDrpOrNot(ThirdmenuList, 1)
  108.           set the editable of member getAt(ThirdmenuList, 12) to 0
  109.           set the member of sprite getAt(ThirdmenuList, 11) to member "CDDOT"
  110.           set the locH of sprite getAt(ThirdmenuList, 11) to 2000
  111.         else
  112.           if (WhichLine = 1) or (WhichLine = 2) then
  113.             set ThirdmenuList to getAt(RVXDrpMenuList, s + 2)
  114.             set the member of sprite getAt(ThirdmenuList, 11) to member getAt(ThirdmenuList, 12)
  115.             put EMPTY into field getAt(ThirdmenuList, 12)
  116.             set the editable of member getAt(ThirdmenuList, 12) to 1
  117.             set the loc of sprite getAt(ThirdmenuList, 11) to point(getAt(ThirdmenuList, 13), getAt(ThirdmenuList, 14))
  118.             set the ink of sprite getAt(ThirdmenuList, 11) to 36
  119.             RVXDrpOrNot(ThirdmenuList, 0)
  120.             set nextmenuList to getAt(RVXDrpMenuList, s + 1)
  121.             RVXDrpOrNot(nextmenuList, 1)
  122.           end if
  123.         end if
  124.       else
  125.         if the member of sprite getAt(thismenuList, 2) = member "DRPAndOrOne" then
  126.           if (WhichLine = 1) or (WhichLine = 2) then
  127.             if count(RVXWhichInputList) = 4 then
  128.               addAt(RVXWhichInputList, count(RVXWhichInputList) + 1, [8, 1])
  129.               addAt(RVXWhichInputList, count(RVXWhichInputList) + 1, [9, 1])
  130.               addAt(RVXWhichInputList, count(RVXWhichInputList) + 1, [10, 0])
  131.               set the member of sprite 8 to member "RVXInputOneArrow"
  132.               set the member of sprite 9 to member "RVXInputTwoArrow"
  133.               set the member of sprite 10 to member "RVXInputThree"
  134.             else
  135.               if count(RVXWhichInputList) = 8 then
  136.                 addAt(RVXWhichInputList, count(RVXWhichInputList) + 1, [12, 1])
  137.                 addAt(RVXWhichInputList, count(RVXWhichInputList) + 1, [13, 1])
  138.                 addAt(RVXWhichInputList, count(RVXWhichInputList) + 1, [14, 0])
  139.                 set the member of sprite 12 to member "RVXInputOneArrow"
  140.                 set the member of sprite 13 to member "RVXInputTwoArrow"
  141.                 set the member of sprite 14 to member "RVXInputThree"
  142.               else
  143.                 if (getAt(thismenuList, 1) = 11) and (count(RVXTwoRememberSeltextList) = 0) then
  144.                   set the member of sprite 12 to member "RVXInputOneArrow"
  145.                   set the member of sprite 13 to member "RVXInputTwoArrow"
  146.                   set the member of sprite 14 to member "RVXInputThree"
  147.                   setAt(RVXWhichInputList, 9, [12, 1])
  148.                   setAt(RVXWhichInputList, 10, [13, 1])
  149.                   setAt(RVXWhichInputList, 11, [14, 0])
  150.                 end if
  151.               end if
  152.             end if
  153.           else
  154.           end if
  155.         end if
  156.       end if
  157.     end if
  158.   end if
  159. end
  160.  
  161. on RVXDrpOrNot whichList, x
  162.   global RVXWhichInputList
  163.   set thissprite to getAt(whichList, 1)
  164.   set alreadyHere to 0
  165.   repeat with t = 1 to count(RVXWhichInputList)
  166.     if getAt(getAt(RVXWhichInputList, t), 1) = thissprite then
  167.       set alreadyHere to 1
  168.       setAt(getAt(RVXWhichInputList, t), 2, x)
  169.       exit repeat
  170.     end if
  171.   end repeat
  172.   if alreadyHere = 0 then
  173.     addAt(RVXWhichInputList, count(RVXWhichInputList) + 1, [thissprite, x])
  174.   end if
  175.   set Whichnum to the memberNum of sprite thissprite
  176.   if x = 1 then
  177.     case the name of member Whichnum of
  178.       "RVXInputOne":
  179.         set the member of sprite thissprite to member "RVXInputOneArrow"
  180.       "RVXInputTwo":
  181.         set the member of sprite thissprite to member "RVXInputTwoArrow"
  182.       "RVXInputThree":
  183.         set the member of sprite thissprite to member "RVXInputThreeArrow"
  184.     end case
  185.   else
  186.     case the name of member Whichnum of
  187.       "RVXInputOneArrow":
  188.         set the member of sprite thissprite to member "RVXInputOne"
  189.       "RVXInputTwoArrow":
  190.         set the member of sprite thissprite to member "RVXInputTwo"
  191.       "RVXInputThreeArrow":
  192.         set the member of sprite thissprite to member "RVXInputThree"
  193.     end case
  194.   end if
  195. end
  196.