home *** CD-ROM | disk | FTP | other *** search
- property mySprite, isBalloon, balloonID, balloonProps, myDoubleClickTimer, myLastPos
- global gObj1, gObj2
-
- on beginSprite me
- set isBalloon to 0
- set balloonID to 0
- set mySprite to the currentSpriteNum
- set curs to 0
- end
-
- on mouseDown me, blockModKey
- set currentFrameSize to the pCurrentFrameSize of gObj2 - 1
- if inside(the clickLoc, the frameRect of gObj2) then
- if not blockModKey and modKeyPressed() then
- repeat with i = max(1, mySprite - 1) down to 1
- if inside(the clickLoc, the rect of sprite i) then
- mouseDown(sprite(i), 1)
- exit
- end if
- end repeat
- else
- set curs to 1
- set myLastPos to the loc of sprite mySprite
- cursor(260)
- selectGraphic(gObj1, mySprite)
- end if
- else
- deselectAll(gObj1)
- end if
- end
-
- on mouseUp me
- if the ticks < myDoubleClickTimer then
- if isBalloon then
- if count(the theSelection of gObj1) = 1 then
- if (getAt(the theSelection of gObj1, 1) = mySprite) and (myLastPos = the loc of sprite mySprite) then
- cursor(-1)
- editText(gObj3)
- end if
- end if
- end if
- set myDoubleClickTimer to 0
- else
- set myDoubleClickTimer to the ticks + 20
- end if
- end
-