Slip, sliding away
Scott Rossi
scott at tactilemedia.com
Mon Jul 25 12:07:12 EDT 2016
This should do what you want, in the script of the group (set the margins
of the group to 0):
local scrollX, clickX, allowDrag
on mouseDown
put hScroll of me into scrollX
put mouseH() into clickX
put true into allowDrag
end mouseDown
on mouseMove X,Y
if not allowDrag then exit mouseMove
set hScroll of me to scrollX + (clickX - X)
end mouseMove
on mouseUp
put false into allowDrag
end mouseUp
on mouseRelease
put false into allowDrag
end mouseRelease
Regards,
Scott Rossi
Creative Director
Tactile Media, UX/UI Design
On 7/25/16, 2:32 AM, "use-livecode on behalf of Richmond"
<use-livecode-bounces at lists.runrev.com on behalf of
richmondmathewson at gmail.com> wrote:
>I made a loooong rectangular image (3 times wider than my stack) and
>grouped it
>
>into a group the width of my stack and gave it a horizontal scrollbar;
>so I can scroll the image
>
>laterally using the scrollbar . . . surprise, surprise; and jolly s*xy
>it looks too.
>
>I would look even s*xier if it had NO scrollbar and I could do some sort
>of
>
>'constrained grab'/scroll by doing a mouseDown & horizontal drag on the
>image within the group.
>
>
>Does anyone know how to do this.
>
>Just to stimulate interest, the reason is that I want to do this sort of
>thing
>
>in Livecode: http://www.stefanv.com/calculators/aristo970/index.html
>
>Richmond.
More information about the use-livecode
mailing list