home *** CD-ROM | disk | FTP | other *** search
/ NEXT Generation: Maxed Out / Next_Generation_Nov_1996_Demo_Disc.iso / pc / media / main.dxr / 00015.ls < prev    next >
Encoding:
Text File  |  1996-09-12  |  593 b   |  15 lines

  1. on mouseDown
  2.   global soundobj, video, videosprite
  3.   set the constraint of sprite the clickOn to castsprite("soundconstraint")
  4.   set tempsoundlevel to the soundLevel
  5.   setSoundLevel(soundobj)
  6.   set spritenum to castsprite("soundconstraint")
  7.   set startH to the left of sprite spritenum
  8.   set endH to the right of sprite spritenum
  9.   set the volume of sound 1 to min(max((the locH of sprite castsprite("soundThumb") - startH) * 256 / (endH - startH), 0), 255)
  10.   put the volume of sound 1
  11.   if objectp(video) then
  12.     set the volume of sprite videosprite to the soundLevel * 255 / 7
  13.   end if
  14. end
  15.