Messages sent while mouse is down?

Tim Selander selander at tkf.att.ne.jp
Sat Mar 11 04:49:02 EST 2017


Oh ho!

That does it, Mike. Many thanks!

Tim

On 2017.03.11, 18:35, Mike Bonner via use-livecode wrote:
> accidental send before complete. *sigh*
>
> on mousemove
>     put 1 & cr & 2 into objectList -- just using control number for the
> quick example
>     if the mouse is down then
>        repeat for each line tLine  in objectList
>           if within(control tLine,the mouseloc) then
>              put tLine into tResult
>              exit repeat
>           end if
>        end repeat
>     end if
>     if tResult is not empty then
>        put tResult
>     else
>        put "no result"
>     end if
> end mousemove
>
> On Sat, Mar 11, 2017 at 2:30 AM, Mike Bonner <bonnmike at gmail.com> wrote:
>
>> mousemove works.  It does appear that "mousecontrol" doesn't fire when the
>> mouse is down so that is out.
>>
>> You can also use "within" which is pretty fast.
>>
>> Have a variable with a list of the objects you wish to check against (or
>> array, or whatever)
>> on mousemove
>>
>> if the mouse is down then
>>
>> repeat for each line tLine  in objectList
>>
>> if within(tLine,the mouseloc) then
>> put tLine into tResult
>>   exit repeat
>> end repeat
>>
>> end if
>> if tResult
>> end mousemove
>>
>> On Sat, Mar 11, 2017 at 1:02 AM, Tim Selander via use-livecode <
>> use-livecode at lists.runrev.com> wrote:
>>
>>> I miss the Zynga "Pathwords" game on Facebook, so for my own amusement
>>> I'm trying to recreate it in Livecode.
>>>
>>> For those who don't know the game, it had a solid screenful of
>>> Scrabble-like lettered tiles. Click and drag the mouse through adjacent
>>> letters to make words.
>>>
>>> Without clicking, simply moving the mouse through the tiles (fields)
>>> triggers mouseenter, mouseleave, etc. which makes it easy to pick up the
>>> letters.
>>>
>>> But when the mouse is down, it seems mouseloc() is the only thing I can
>>> get. Using a variable what has all the field rectangles, I can use the
>>> mouseloc() to ultimately identify the field under the pointer, but it's too
>>> slow...
>>>
>>> Does a moving mouse with the button down trigger any other messages
>>> besides mouseloc()?
>>>
>>> Thanks,
>>>
>>> Tim Selander
>>> Tokyo, Japan
>>>
>>> _______________________________________________
>>> 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