home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1996 November / WPCNOV96.ISO / radio.dxr / 00003_PressButton.ls < prev    next >
Encoding:
Text File  |  1996-09-17  |  1.6 KB  |  36 lines

  1. on PressButton
  2.   global eightButList, LastButt
  3.   if (the mouseH > 233) and (the mouseH < 296) and (the mouseV > 44) and (the mouseV < 145) then
  4.     repeat while (the mouseH > 233) and (the mouseH < 296) and (the mouseV > 44) and (the mouseV < 145)
  5.       repeat with t = 1 to count(eightButList)
  6.         set TemPList to getAt(eightButList, t)
  7.         if (the mouseH > getAt(TemPList, 1)) and (the mouseH < getAt(TemPList, 2)) and (the mouseV > getAt(TemPList, 3)) and (the mouseV < getAt(TemPList, 4)) then
  8.           cursor([33, 34])
  9.           repeat while (the mouseH > getAt(TemPList, 1)) and (the mouseH < getAt(TemPList, 2)) and (the mouseV > getAt(TemPList, 3)) and (the mouseV < getAt(TemPList, 4))
  10.             if the mouseDown then
  11.               case getAt(TemPList, 5) of
  12.                 0:
  13.                   if LastButt > 0 then
  14.                     setAt(getAt(eightButList, LastButt), 5, 0)
  15.                   end if
  16.                   set the loc of sprite 2 to point(getAt(TemPList, 6), getAt(TemPList, 7))
  17.                   setAt(getAt(eightButList, t), 5, 1)
  18.                   set LastButt to t
  19.                   set the loc of sprite 3 to point(getAt(TemPList, 8), getAt(TemPList, 9))
  20.                   puppetSound(getAt(getAt(eightButList, LastButt), 10))
  21.                 1:
  22.                   set the locH of sprite 2 to 2000
  23.                   setAt(getAt(eightButList, t), 5, 0)
  24.               end case
  25.               updateStage()
  26.               repeat while the mouseDown
  27.               end repeat
  28.             end if
  29.           end repeat
  30.           cursor(-1)
  31.         end if
  32.       end repeat
  33.     end repeat
  34.   end if
  35. end
  36.