home *** CD-ROM | disk | FTP | other *** search
- property ScrollThumbSprite, DownMember, button_active
-
- on getPropertyDescriptionList
- set description to [:]
- if the currentSpriteNum = 0 then
- set memdefault to 0
- else
- set memref to the member of sprite the currentSpriteNum
- set castLibNum to the castLibNum of memref
- set memdefault to member (the memberNum of member memref + 1) of castLib castLibNum
- end if
- addProp(description, #DownMember, [#default: memdefault, #format: #bitmap, #comment: "Pict for Down:"])
- addProp(description, #ScrollThumbSprite, [#default: the currentSpriteNum - 1, #format: #integer, #comment: "Sprite Number of Thumb:"])
- return description
- end
-
- on getBehaviorDescription
- return "Vertical Multiline Textfield Scroll Up Button"
- end
-
- on getAssocMembers
- set myPropList to [DownMember]
- return myPropList
- end
-
- on endSprite me
- puppetSprite(the spriteNum of me, 0)
- end
-
- on mouseUp me
- set the button_active of me to 0
- swap_members(me)
- sendSprite(the ScrollThumbSprite of me, #scroll_a_line, 1)
- end
-
- on mouseUpOutSide me
- set the button_active of me to 0
- end
-
- on mouseDown me
- swap_members(me)
- set the button_active of me to 1
- startTimer()
- end
-
- on mouseLeave me
- if the button_active of me then
- swap_members(me)
- end if
- end
-
- on mouseEnter me
- if the button_active of me then
- swap_members(me)
- startTimer()
- end if
- end
-
- on exitFrame me
- if the button_active of me then
- if the timer > 30 then
- sendSprite(the ScrollThumbSprite of me, #scroll_a_line, 1)
- end if
- end if
- end
-
- on swap_members me
- puppetSprite(the spriteNum of me, 1)
- set temp to the member of sprite the spriteNum of me
- set the member of sprite the spriteNum of me to member the DownMember of me
- set the DownMember of me to temp
- end
-