Moving a stack with no controls
Magicgate Software - Skip Kimpel
skip at magicgate.com
Thu Jul 19 16:41:44 EDT 2012
I thought about that Ross but I went the easy route for right now.
Probably something I am going to need to look at soon so I will not
forget this conversation.
On Thu, Jul 19, 2012 at 3:23 PM, Scott Rossi <scott at tactilemedia.com> wrote:
> Another option is to use a specific control to handle the dragging. This
> allows you to define the region that triggers the drag, and you don't have
> to worry about excluding objects from the script.
>
> Regards,
>
> Scott Rossi
> Creative Director
> Tactile Media, UX Design
>
>
>
> Recently, Klaus on-rev wrote:
>
>> 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
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list