home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Clips / SelectSoftPublishing-StockClips-MultimediaClips-WinMac.bin / pc / CATALOG / DEMOS / 091 / C.DIR / Internal_31.ls < prev    next >
Encoding:
Text File  |  2006-01-01  |  837 b   |  31 lines

  1. on mouseDown
  2.   set spriteNum to the clickOn
  3.   set dh to the locH of the clickLoc - the locH of sprite spriteNum
  4.   set dv to the locV of the clickLoc - the locV of sprite spriteNum
  5.   repeat while the stillDown
  6.     set the locH of sprite spriteNum to the mouseH - dh
  7.     set the locV of sprite spriteNum to the mouseV - dv
  8.     updateStage()
  9.   end repeat
  10.   if sprite spriteNum intersects (spriteNum - 6) and (the visible of sprite (spriteNum - 6) = 1) then
  11.     set the visible of sprite spriteNum to 0
  12.     set the visible of sprite (spriteNum - 6) to 0
  13.     puppetSound("right")
  14.     updateStage()
  15.   else
  16.     puppetSound("wrong")
  17.   end if
  18.   if hSolved() then
  19.     hPlayAnimation()
  20.   end if
  21. end
  22.  
  23. on hSolved
  24.   repeat with spriteNum = 16 to 20
  25.     if the visible of sprite spriteNum = 1 then
  26.       return 0
  27.     end if
  28.   end repeat
  29.   return 1
  30. end
  31.