home *** CD-ROM | disk | FTP | other *** search
- on whichPiece
- global gMov, gPieceList, gCurrentSprite
- repeat with i = 28 to 36
- if the clickOn = i then
- if gMov = 0 then
- getPiece(getAt(gPieceList, i - 27), i)
- end if
- exit repeat
- next repeat
- end if
- if the clickOn = 45 then
- placePiece()
- exit repeat
- end if
- end repeat
- end
-
- on getPiece spritename, thisSprite
- global gMov, gCurrentSprite
- puppetSound("Click")
- set gCurrentSprite to thisSprite
- set the visible of sprite thisSprite to 0
- puppetSprite(45, 1)
- set the castNum of sprite 45 to the number of member spritename
- set the visible of sprite 45 to 1
- set gMov to 1
- set the cursor of sprite 45 to 200
- set the cursor of sprite 1 to 200
- set the locH of sprite 45 to the mouseH
- set the locV of sprite 45 to the mouseV
- updateStage()
- end
-
- on placePiece
- global gMov, gCurrentSprite, gNoPlaced
- set zonenum to gCurrentSprite - 18
- set piecenum to gCurrentSprite - 9
- if sprite zonenum within 45 then
- puppetSound("right")
- set the visible of sprite 45 to 0
- puppetSprite(45, 0)
- set the visible of sprite piecenum to 1
- set gMov to 0
- set gNoPlaced to gNoPlaced + 1
- set the cursor of sprite 1 to 0
- set the cursor of sprite 45 to 0
- else
- puppetSound("wrong")
- end if
- end
-