home *** CD-ROM | disk | FTP | other *** search
- property origin, Sp
- global pOffset, pDrag
-
- on beginSprite me
- pDrag = 0
- Sp = sprite(me.spriteNum)
- pOffset = point(0, 0)
- origin = point(0, 0)
- end
-
- on mouseWithin me
- cursor(260)
- end
-
- on mouseLeave me
- cursor(-1)
- end
-
- on mouseDown me
- origin = the mouseLoc
- pDrag = 1
- end
-
- on mouseUp me
- pDrag = 0
- pOffset = Sp.loc
- end
-
- on exitFrame me
- if pDrag then
- Sp.loc = pOffset + (the mouseLoc - origin)
- end if
- end
-