home *** CD-ROM | disk | FTP | other *** search
- property mySprite, myMemb, active, enabled
-
- on new me
- return me
- end
-
- on init me, preferredSpriteNum
- if voidp(preferredSpriteNum) then
- set the mySprite of me to the currentSpriteNum
- else
- set the mySprite of me to preferredSpriteNum
- end if
- set the myMemb of me to the memberNum of sprite the mySprite of me
- set the enabled of me to 1
- end
-
- on mouseDown me
- if not (the enabled of me) then
- exit
- end if
- set the active of me to 1
- set the memberNum of sprite the mySprite of me to the myMemb of me + 1
- if not (the makeSoundDown of me = 0) then
- puppetSound(1, the makeSoundDown of me)
- end if
- updateStage()
- end
-
- on mouseUp me
- if not (the active of me) then
- exit
- end if
- set the active of me to 0
- set the memberNum of sprite the mySprite of me to the myMemb of me
- if not (the makeSoundUp of me = 0) then
- puppetSound(1, the makeSoundUp of me)
- end if
- doAction(me)
- end
-
- on update me
- if not (the enabled of me) then
- exit
- end if
- set the memberNum of sprite the mySprite of me to the myMemb of me
- end
-
- on mouseLeave me
- if not (the active of me) then
- exit
- end if
- set the memberNum of sprite the mySprite of me to the myMemb of me
- updateStage()
- end
-
- on mouseEnter me
- if not (the active of me) then
- exit
- end if
- set the memberNum of sprite the mySprite of me to the myMemb of me + 1
- updateStage()
- end
-
- on mouseUpOutSide me
- if not (the active of me) then
- exit
- end if
- set the memberNum of sprite the mySprite of me to the myMemb of me
- set the active of me to 0
- updateStage()
- end
-
- on enable me
- if the enabled of me then
- exit
- end if
- set the enabled of me to 1
- set the memberNum of sprite the mySprite of me to the myMemb of me
- end
-
- on disable me
- if not (the enabled of me) then
- exit
- end if
- set the enabled of me to 0
- set the memberNum of sprite the mySprite of me to the myMemb of me + 2
- set the active of me to 0
- end
-