home *** CD-ROM | disk | FTP | other *** search
- property pHand, spriteNum, pTimeout, pOriginalLoc
- global gHands, gCup
-
- on beginSprite me
- pHand = sprite(spriteNum)
- pOriginalLoc = pHand.loc
- gHands.addProp(pHand.member.name.symbol, pHand)
- if pHand.member.name = "left" then
- repeat with w = 1 to 9
- member("arm" & w.string).regPoint = pHand.member.regPoint + point(-10, 10)
- end repeat
- end if
- end
-
- on pushCup me
- pHand.locH = gCup.locH
- pHand.locV = gCup.top
- pTimeout = timeout(string(the ticks + spriteNum)).new(15, #followCup, me)
- gCup.visible = 0
- pHand.member = member("cup and arm")
- gCup.coverBall()
- end
-
- on followCup me
- if gCup.loc <> gCup.pOriginalLoc then
- pHand.locV = gCup.loc[2]
- pHand.locH = gCup.loc[1]
- else
- pTimeout.forget()
- pHand.loc = pOriginalLoc
- end if
- end
-
- on followsCup me, so
- end
-