Moving a stack with no controls
Klaus on-rev
klaus at major.on-rev.com
Thu Jul 19 15:14:34 EDT 2012
Hi Skip,
Am 19.07.2012 um 21:01 schrieb Magicgate Software - Skip Kimpel:
> There is some conflicting functions being called. For instance, I
> have several clickable buttons on that stack. So when you go to click
> on a button, it performs that functions but also tries to relocate
> things and enters into this never ending cycle and competition of
> moving the screen vs performing button function.
>
> Is that clear or do I need to provide more specifics? It is clear in
> my head right now but I have had some TheraFlu so it might only be
> clear to me...
You have two options to avoid the movenemnt in your buttons an other objects:
1. Add dummy "mouseXXX" handlers to your buttons:
on mouseDown
##
end mouseDown
on mouseMove
##
end mouseMove
on mouseUp
## Your commands here...
end mouseUp
on mouserelease
##
end mouserelease
That will "override" the mouseX stuff in the stack script.
2. Add these lines to my script:
################################
local maydrag
on mouseDown
## EXCLUDE buttons
if word 1 of the target = "button"then
put empty into maydrag
else
put mouseH() & "," & mouseV() into maydrag
end if
end mouseDown
on mouseMove
if maydrag is not empty then
set the topLeft of this stack to item 1 of the screenMouseLoc - item 1 of maydrag,item 2 of the screenMouseLoc - item 2 of maydrag
end if
end mouseMove
on mouseUp
put empty into maydrag
end mouseUp
on mouserelease
mouseup
end mouserelease
############################################
> SKIP
Best
Klaus
--
Klaus Major
http://www.major-k.de
klaus at major.on-rev.com
More information about the use-livecode
mailing list