home *** CD-ROM | disk | FTP | other *** search
/ PC Home 49 / PC_Home_Issue_49.iso / winprogs / childenc / oecdemo / shared.dir / 00388.ls < prev    next >
Encoding:
Text File  |  1996-07-24  |  1.5 KB  |  66 lines

  1. on closeButton inkDown, inkUp
  2.   stopSound(1, 10)
  3.   set me to the clickOn
  4.   set the ink of sprite me to inkDown
  5.   repeat while the mouseDown
  6.     updateStage()
  7.   end repeat
  8.   set the ink of sprite me to inkUp
  9.   updateStage()
  10. end
  11.  
  12. on ButtonClick DownCast, UpCast, keepSprite
  13.   stopSound(1, 10)
  14.   set me to the clickOn
  15.   puppetSprite(me, 1)
  16.   set the immediate of sprite me to 1
  17.   set the castNum of sprite me to DownCast
  18.   repeat while the mouseDown
  19.     updateStage()
  20.   end repeat
  21.   set the castNum of sprite me to UpCast
  22.   if keepSprite <> 1 then
  23.     puppetSprite(me, 0)
  24.   end if
  25.   updateStage()
  26.   if rollOver(me) then
  27.     return 1
  28.   else
  29.     return 0
  30.   end if
  31. end
  32.  
  33. on ButtonSwitch state2, state1, theSpriteNum
  34.   stopSound(1, 10)
  35.   set me to the clickOn
  36.   set x to the castNum of sprite theSpriteNum
  37.   if x = state1 then
  38.     set the castNum of sprite theSpriteNum to state2
  39.   else
  40.     set the castNum of sprite theSpriteNum to state1
  41.   end if
  42.   repeat while the mouseDown
  43.     updateStage()
  44.   end repeat
  45.   updateStage()
  46.   if rollOver(theSpriteNum) then
  47.     return 1
  48.   else
  49.     set the castNum of sprite theSpriteNum to x
  50.     return 0
  51.   end if
  52. end
  53.  
  54. on ButtonToggle otherSprite, otherCast, thisCast
  55.   stopSound(1, 10)
  56.   set me to the clickOn
  57.   if the castNum of sprite me = thisCast then
  58.     set the castNum of sprite me to otherCast
  59.     set the castNum of sprite otherSprite to thisCast
  60.   else
  61.     set the castNum of sprite me to thisCast
  62.     set the castNum of sprite otherSprite to otherCast
  63.   end if
  64.   updateStage()
  65. end
  66.