home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Clips / SelectSoftPublishing-StockClips-MultimediaClips-WinMac.bin / pc / CATALOG / DEMOS / 091 / C.DIR / Internal_33.ls < prev    next >
Encoding:
Text File  |  2006-01-01  |  1.1 KB  |  38 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.     if sprite spriteNum intersects (spriteNum - 7) and (the visible of sprite (spriteNum - 7) = 1) then
  17.       set the visible of sprite spriteNum to 0
  18.       set the visible of sprite (spriteNum - 7) to 0
  19.       puppetSound("right")
  20.       updateStage()
  21.     else
  22.       puppetSound("wrong")
  23.     end if
  24.   end if
  25.   if hSolved() then
  26.     hPlayAnimation()
  27.   end if
  28. end
  29.  
  30. on hSolved
  31.   repeat with spriteNum = 16 to 20
  32.     if the visible of sprite spriteNum = 1 then
  33.       return 0
  34.     end if
  35.   end repeat
  36.   return 1
  37. end
  38.