home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1997 September / Personal_Computer_World_Sep_97.iso / DXRS / RVXPCW09.DXR / 00014_RVXScrollTable.ls < prev    next >
Encoding:
Text File  |  1997-06-25  |  3.7 KB  |  86 lines

  1. on RVXScrollTable
  2.   global RVXScrollBarSprite, RVXScrollBoxSprite, RVXResFieldsList
  3.   if (the mouseV > 110) and (the mouseV < 128) then
  4.     repeat while (the mouseV > 110) and (the mouseV < 128)
  5.       if (the mouseH > 605) and (the mouseH < 641) then
  6.         repeat while (the mouseH > 605) and (the mouseH < 641)
  7.           if the mouseDown then
  8.             repeat while the mouseDown
  9.               if the locH of sprite 20 > 5 then
  10.                 repeat with t = 20 to 29
  11.                   set the locH of sprite t to the locH of sprite t - 6
  12.                 end repeat
  13.                 set the locH of sprite RVXScrollBoxSprite to the locH of sprite RVXScrollBoxSprite + 16
  14.                 updateStage()
  15.               end if
  16.             end repeat
  17.           end if
  18.         end repeat
  19.       end if
  20.       if (the mouseH > 0) and (the mouseH < 36) then
  21.         repeat while (the mouseH > 0) and (the mouseH < 36)
  22.           if the mouseDown then
  23.             repeat while the mouseDown
  24.               if the locH of sprite 20 < 209 then
  25.                 repeat with t = 20 to 29
  26.                   set the locH of sprite t to the locH of sprite t + 6
  27.                 end repeat
  28.                 set the locH of sprite RVXScrollBoxSprite to the locH of sprite RVXScrollBoxSprite - 16
  29.                 updateStage()
  30.               end if
  31.             end repeat
  32.           end if
  33.         end repeat
  34.       end if
  35.       if rollOver(RVXScrollBoxSprite) and the mouseDown then
  36.         set OrigmouseH to the mouseH
  37.         set BoxLocH to the locH of sprite RVXScrollBoxSprite
  38.         set BarLocH to the locH of sprite 20
  39.         set valueBox to OrigmouseH - BoxLocH
  40.         repeat while the mouseDown
  41.           set the locH of sprite RVXScrollBoxSprite to the mouseH - valueBox
  42.           set ValBox to integer((the locH of sprite RVXScrollBoxSprite - 38) / 16)
  43.           if ValBox > 34 then
  44.             set ValBox to 34
  45.           end if
  46.           set the locH of sprite 20 to 209 - (6 * ValBox)
  47.           repeat with t = 1 to count(RVXResFieldsList)
  48.             set the locH of sprite getAt(getAt(RVXResFieldsList, t), 1) to getAt(getAt(RVXResFieldsList, t), 2) - (6 * ValBox)
  49.           end repeat
  50.           if (the locH of sprite RVXScrollBoxSprite > 38) and (the locH of sprite RVXScrollBoxSprite < 582) then
  51.             updateStage()
  52.             next repeat
  53.           end if
  54.           if the locH of sprite RVXScrollBoxSprite < 70 then
  55.             set the locH of sprite RVXScrollBoxSprite to 38
  56.             set the locH of sprite 20 to 209
  57.             repeat with t = 1 to count(RVXResFieldsList)
  58.               set the locH of sprite getAt(getAt(RVXResFieldsList, t), 1) to getAt(getAt(RVXResFieldsList, t), 2)
  59.             end repeat
  60.           else
  61.             set the locH of sprite RVXScrollBoxSprite to 582
  62.             set the locH of sprite 20 to 209 - 204
  63.             repeat with t = 1 to count(RVXResFieldsList)
  64.               set the locH of sprite getAt(getAt(RVXResFieldsList, t), 1) to getAt(getAt(RVXResFieldsList, t), 2) - 204
  65.             end repeat
  66.           end if
  67.           updateStage()
  68.         end repeat
  69.       end if
  70.       if (the mouseH < 605) and (the mouseH > 36) and not rollOver(RVXScrollBoxSprite) and the mouseDown then
  71.         set the locH of sprite RVXScrollBoxSprite to the mouseH
  72.         set ValBox to integer((the mouseH - 38) / 16)
  73.         if ValBox > 34 then
  74.           set ValBox to 34
  75.         end if
  76.         set the locH of sprite RVXScrollBoxSprite to 38 + (16 * ValBox)
  77.         set the locH of sprite 20 to 209 - (6 * ValBox)
  78.         repeat with t = 1 to count(RVXResFieldsList)
  79.           set the locH of sprite getAt(getAt(RVXResFieldsList, t), 1) to getAt(getAt(RVXResFieldsList, t), 2) - (6 * ValBox)
  80.         end repeat
  81.         updateStage()
  82.       end if
  83.     end repeat
  84.   end if
  85. end
  86.