home *** CD-ROM | disk | FTP | other *** search
/ Mac Ga Ichiban! 1996 May / macgaichiban199605.bin / MOVIES / PTM / 00070.ls < prev    next >
Encoding:
Text File  |  1996-03-05  |  1.4 KB  |  55 lines

  1. global cname
  2.  
  3. on startMovie
  4.   puppetSprite(26, 1)
  5.   puppetSprite(30, 1)
  6. end
  7.  
  8. on button
  9.   set cname to item 1 of the name of cast the castNum of sprite clickOn()
  10.   set the castNum of sprite clickOn() to the number of cast (cname & ",on")
  11.   updateStage()
  12.   repeat while the stillDown
  13.     if rollOver(clickOn()) then
  14.       set the castNum of sprite clickOn() to the number of cast (cname & ",on")
  15.       updateStage()
  16.       next repeat
  17.     end if
  18.     set the castNum of sprite clickOn() to the number of cast (cname & ",off")
  19.     updateStage()
  20.   end repeat
  21.   set the castNum of sprite clickOn() to the number of cast (cname & ",off")
  22.   updateStage()
  23. end
  24.  
  25. on place spnum, castno, h, v
  26.   set the type of sprite spnum to 1
  27.   set the ink of sprite spnum to 36
  28.   set the foreColor of sprite spnum to 255
  29.   set the backColor of sprite spnum to 0
  30.   set the castNum of sprite spnum to castno
  31.   set the locH of sprite spnum to h
  32.   set the locV of sprite spnum to v
  33.   updateStage()
  34. end
  35.  
  36. on changevol
  37.   set nowvol to value(the castNum of sprite 26 - 4)
  38.   set clicksp to value(char 2 of the name of cast the castNum of sprite clickOn())
  39.   if clicksp <> 0 then
  40.     puppetSound("volume")
  41.     updateStage()
  42.     repeat while soundBusy(1)
  43.       nothing()
  44.     end repeat
  45.   end if
  46.   set vol to nowvol + clicksp
  47.   if vol > 7 then
  48.     set vol to vol - 8
  49.   end if
  50.   set the castNum of sprite 26 to 4 + vol
  51.   updateStage()
  52.   set the soundLevel to vol
  53.   set the soundEnabled to 1
  54. end
  55.