home *** CD-ROM | disk | FTP | other *** search
/ Computer Music Interactif 2 / cd.iso / mac / share / Funkit / FunKit / funkit16.Dxr / 00033.ls < prev    next >
Encoding:
Text File  |  1997-07-03  |  693 b   |  26 lines

  1. on mouseDown
  2.   global gOnOff, gSliderlength, gSliderTop, gSliderBtm, gSliderFactor
  3.   set mynum to the clickOn
  4.   set myloc to the locV of sprite mynum
  5.   set offset to myloc - the mouseV
  6.   repeat while the mouseDown
  7.     set newloc to the mouseV
  8.     if newloc > gSliderBtm then
  9.       set newloc to gSliderBtm
  10.     else
  11.       if newloc < gSliderTop then
  12.         set newloc to gSliderTop
  13.       end if
  14.     end if
  15.     set travel to newloc - gSliderBtm
  16.     set value to travel * gSliderFactor
  17.     set value to abs(value)
  18.     set the volume of sound 2 to value
  19.     set the locV of sprite mynum to newloc + offset
  20.     updateStage()
  21.     if gOnOff = 1 then
  22.       checksamples()
  23.     end if
  24.   end repeat
  25. end
  26.