home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 July / macformat-039.iso / MAKERS / MAIN.DIR / 00093.ls < prev    next >
Encoding:
Text File  |  1996-03-12  |  695 b   |  28 lines

  1. on mouseDown
  2.   set me to the clickOn
  3.   set oldlevel to the soundLevel
  4.   set bottom to 25
  5.   set inc to (the height of sprite me - bottom) / 7
  6.   repeat while the mouseDown
  7.     set mv to the mouseV
  8.     set v to mv - the top of sprite me
  9.     set level to 8 - (v / inc)
  10.     if level > 7 then
  11.       set level to 7
  12.     else
  13.       if level < 0 then
  14.         set level to 0
  15.       end if
  16.     end if
  17.     if oldlevel <> level then
  18.       set the soundLevel to level
  19.       if oldlevel = 0 then
  20.         puppetSound(2, the number of cast "interface.iff")
  21.       end if
  22.       set oldlevel to level
  23.     end if
  24.     updateStage()
  25.     set the castNum of sprite me to the number of cast ("v-" & level)
  26.   end repeat
  27. end
  28.