home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1996 August / WPCAUG96.ISO / makers / body / bodymain.dir / 00373.ls < prev    next >
Encoding:
Text File  |  1996-06-12  |  1.1 KB  |  45 lines

  1. on VolumeDrag dir
  2.   global endSection, NextFrame, lastFrame
  3.   set me to the clickOn
  4.   if not (the puppet of sprite me) then
  5.     puppetSprite(me, 1)
  6.   end if
  7.   set inc to (the height of sprite me - 25) / 7
  8.   set bottom to the bottom of sprite me - 25
  9.   repeat while the mouseDown
  10.     if the frame < label("medicin") then
  11.       set f to (the movieTime of sprite 15 / 4) + 20
  12.       set g to (the movieTime of sprite 15 / 4) + 9
  13.       if f > endSection then
  14.         set the movieRate of sprite 15 to 0
  15.         if char 1 to 4 of lastFrame = "fall" then
  16.           EndDance()
  17.         else
  18.           go(the frame)
  19.         end if
  20.       else
  21.         go(g)
  22.       end if
  23.     end if
  24.     set mv to the mouseV
  25.     set v to mv - the top of sprite me
  26.     set level to 8 - (v / inc)
  27.     if level > 7 then
  28.       set level to 7
  29.     else
  30.       if level < 0 then
  31.         set level to 0
  32.       end if
  33.     end if
  34.     set the soundLevel to level
  35.     updateStage()
  36.     set the castNum of sprite me to the number of cast ("vol" & level)
  37.   end repeat
  38. end
  39.  
  40. on SetVolume
  41.   set me to 27
  42.   puppetSprite(me, 1)
  43.   set the castNum of sprite me to the number of cast ("vol" & the soundLevel)
  44. end
  45.