home *** CD-ROM | disk | FTP | other *** search
/ Better Homes & Gardens: …oking for Today - Chicken / Image.iso / pc / utility.dxr / 00002_GACButton.ls < prev    next >
Encoding:
Text File  |  1995-11-20  |  660 b   |  31 lines

  1. property mySprite, myCast, pressedCast
  2.  
  3. on birth me, spriteNum
  4.   set mySprite to spriteNum
  5.   puppetSprite(mySprite, 1)
  6.   set myCast to the castNum of sprite mySprite
  7.   set pressedCast to myCast + 1
  8.   return me
  9. end
  10.  
  11. on down me
  12.   set the castNum of sprite mySprite to pressedCast
  13.   repeat while the mouseDown
  14.     if rollOver(mySprite) then
  15.       set the castNum of sprite mySprite to pressedCast
  16.     else
  17.       set the castNum of sprite mySprite to myCast
  18.     end if
  19.     updateStage()
  20.   end repeat
  21. end
  22.  
  23. on up me
  24.   if the castNum of sprite mySprite = pressedCast then
  25.     set the castNum of sprite mySprite to myCast
  26.     return 1
  27.   else
  28.     return 0
  29.   end if
  30. end
  31.