home *** CD-ROM | disk | FTP | other *** search
/ Computer Music Interactif 2 / cd.iso / mac / share / Funkit / FunKit / funkit16.Dxr / 00010.ls < prev    next >
Encoding:
Text File  |  1997-07-03  |  830 b   |  32 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.   set the cursor of sprite mynum to [301, 302]
  7.   repeat while the mouseDown
  8.     set newloc to the mouseV
  9.     if newloc > gSliderBtm then
  10.       set newloc to gSliderBtm
  11.     else
  12.       if newloc < gSliderTop then
  13.         set newloc to gSliderTop
  14.       end if
  15.     end if
  16.     set travel to newloc - gSliderBtm
  17.     set value to travel * gSliderFactor
  18.     set value to abs(value)
  19.     set the volume of sound 1 to value
  20.     set the locV of sprite mynum to newloc + offset
  21.     updateStage()
  22.     if gOnOff = 1 then
  23.       checksamples()
  24.     end if
  25.   end repeat
  26. end
  27.  
  28. on mouseUp
  29.   set mynum to the clickOn
  30.   set the cursor of sprite mynum to [305, 306]
  31. end
  32.