home *** CD-ROM | disk | FTP | other *** search
- property scr_dragging, scr_direction, scr_units
-
- on beginSprite me
- set scr_dragging to 0
- end
-
- on scr_Hide me
- set the visible of sprite the currentSpriteNum to 0
- end
-
- on scr_Show me
- set the visible of sprite the currentSpriteNum to 1
- end
-
- on getPropertyDescriptionList me
- set pdlist to [:]
- addProp(pdlist, #scr_direction, [#comment: "Direction", #format: #symbol, #range: [#Up, #down], #default: #Up])
- addProp(pdlist, #scr_units, [#comment: "Pixels/cycle", #format: #integer, #default: 10])
- return pdlist
- end
-
- on mouseDown me
- set scr_dragging to 1
- pass()
- end
-
- on mouseUp me
- set scr_dragging to 0
- pass()
- end
-
- on mouseUpOutSide me
- set scr_dragging to 0
- pass()
- end
-
- on exitFrame me
- if scr_dragging then
- if rollOver(the currentSpriteNum) then
- if scr_direction = #Up then
- sendAllSprites(#scr_scrollup, scr_units)
- else
- if scr_direction = #down then
- sendAllSprites(#scr_scrolldown, scr_units)
- end if
- end if
- end if
- end if
- end
-